LisaList2

Advanced search  

News:

2019.06.07 fixed NChat for the "Curve" theme, will eventually move it to its own page and add it to the default theme as well. Other plugins are next. see post in the Meta board for details

Pages: 1 2 [3]   Go Down

Author Topic: Cameo/Aphid selector  (Read 590 times)

rayarachelian

  • Administrator
  • Sr. Member
  • *****
  • Karma: +23/-0
  • Offline Offline
  • Posts: 423
  • "But what's puzzling you is the nature of my game"
    • LisaEm
Re: Cameo/Aphid selector
« Reply #30 on: February 12, 2021, 09:40:38 pm »

Found something while looking for the ProFile behavior in the other thread:

Quote
From: https://apple3.org/Documents/Manuals/Profile_Level_2_Manual.pdf page 157:

"CRES - generated by the host - this is used to reset the Z8 back to its initial state. This usually begins at the start of communications, but whenever it happens, it depends on the host."

So there's also an output on the VIA outside the RESET signal that can trigger CRES, but CRES isn't used to reset the ProFile, it's to put the communications state machine back to the first listening state.

This implies there's no need for timeouts because the Lisa can pulse CRES any time to push the state machine back to the idle state.
Logged
Fate whispers to the warrior, 'You can not withstand the storm.'  The warrior whispers back, 'I am the storm.'

stepleton

  • Sr. Member
  • ****
  • Karma: +44/-0
  • Online Online
  • Posts: 157
Re: Cameo/Aphid selector
« Reply #31 on: February 13, 2021, 07:52:31 am »

Quote
This implies there's no need for timeouts because the Lisa can pulse CRES any time to push the state machine back to the idle state.

This is true. Unfortunately, I forgot to make any electrical connection at all between the reset line and the PocketBeagle single-board computer, so I can't use this facility. The only workaround for me is absolutely excellent code that will never get stuck anywhere.

I've made a lot of progress on my "infinite timeout" revision, which is a pretty big change, but which I hope can withstand all kinds of interrupts and delays on the Lisa side (especially from MacWorks). I tried it out last night for the first time, and while it works OK for a first run after a major change, it is obviously still not "absolutely excellent" and can get hung up in at least one spot. The work continues.
Logged

rayarachelian

  • Administrator
  • Sr. Member
  • *****
  • Karma: +23/-0
  • Offline Offline
  • Posts: 423
  • "But what's puzzling you is the nature of my game"
    • LisaEm
Re: Cameo/Aphid selector
« Reply #32 on: February 13, 2021, 09:29:49 am »

You're probably never going to get every weird uncommon edge case, so don't worry too much about it. If you get compatibility with the most common cases, i.e. boot blocks loading boot loaders, and most of LOS, MacWorks, UniPlus/Xenix OS's working it should be good enough. The only way to get 100% compatibility is to emulate the z8 ROM on either a real ProFile or Widget, but that will also cause problems: limits on disk size, limits on how fast you can go.

It's better to have a device that runs much faster than the original and doesn't have limits, IMO. Worst case, if it even comes to that, you can provide patches for the drivers of those OSs like James MacPhail did for the X/ProFile.

But yeah, the big issue is that the 8530 doesn't have much buffer space for incoming chars so it could drop data if the IRQ isn't serviced in time. Which isn't that big of a deal really. If you're running on LocalTalk, it will eventually retransmit the packet. If you're in the middle of an X/Y/Zmodem transfer, it will retransmit. If you're just connected to a BBS and miss some incoming text, oh well, pick a lower bps rate, or use another terminal.

Hope I'm not being insensitive here, but between dropping bytes on a serial port or causing file system damage or OS crashes, I'd rather avoid the file system damage and OS crashes.
Logged
Fate whispers to the warrior, 'You can not withstand the storm.'  The warrior whispers back, 'I am the storm.'

stepleton

  • Sr. Member
  • ****
  • Karma: +44/-0
  • Online Online
  • Posts: 157
Re: Cameo/Aphid selector
« Reply #33 on: February 14, 2021, 06:12:21 pm »

I think I've got the fix done now, and the problem was a bit obvious. You can't get rid of all the timeouts --- if you are willing to wait forever with the ~PBSY (meaning "I'm working, don't bother me") line asserted, then if you get stuck there, Lisa software will usually leave you alone, and you'll stay stuck. If you're holding ~PBSY, you need a timeout to let it go, in other words.

The difference this time is that the "control" coprocessor PRU1 used to be able to wait on the "data pump" coprocessor PRU0 to timeout on transactions that expected to transfer a byte when ~PBSY was low. Now, for the benefit of MacWorks, PRU0 is no longer in the timeout business at all. PRU1 has to take care of those timeouts itself.

Works now with MacWorks Plus, LOS 3.0, and Xenix. I'll update GitHub and compile a new drive image soon.

I was thrown off a bit when testing with MacWorks Plus 1.1h --- I was still seeing boot failures with the Cameo/Aphid installed on the lower port of a parallel port card. Ultimately this may be a problem with MacWorks Plus, since it fails in the same way for an IDEfile. I haven't tried a real Profile yet to compare, and probably won't :)
Logged

stepleton

  • Sr. Member
  • ****
  • Karma: +44/-0
  • Online Online
  • Posts: 157
Re: Cameo/Aphid selector
« Reply #34 on: February 15, 2021, 08:24:03 pm »

A small note for anyone interested that the new code continues to work for me. I don't have my own LocalTalk network set up (though I do have the adaptor for the Lisa end --- and none for any other computer). I haven't tried really any applications, just installation of MW+ 1.1h, which is at least a bit of a workout. LOS 1.0 has now been tried as well.

This is still the biggest low-level firmware update since the initial release in 2018, and it should probably be considered even slightly more beta than usual :)

GitHub is up to date, and an updated version of the Debian 10.0-based microSD card image is available.
Logged

rayarachelian

  • Administrator
  • Sr. Member
  • *****
  • Karma: +23/-0
  • Offline Offline
  • Posts: 423
  • "But what's puzzling you is the nature of my game"
    • LisaEm
Re: Cameo/Aphid selector
« Reply #35 on: February 16, 2021, 12:01:47 pm »

Yeay!
Logged
Fate whispers to the warrior, 'You can not withstand the storm.'  The warrior whispers back, 'I am the storm.'

rayarachelian

  • Administrator
  • Sr. Member
  • *****
  • Karma: +23/-0
  • Offline Offline
  • Posts: 423
  • "But what's puzzling you is the nature of my game"
    • LisaEm
Re: Cameo/Aphid selector
« Reply #36 on: February 16, 2021, 12:31:22 pm »

As an aside, incase you want to make your own Phone Net connectors (RJ11) there's a schematic in glorious ASCII here: http://www.nic.funet.fi/index/mac/doc/phone-net-connectors.txt

This is a snippet of that:
Code: [Select]

 
A "O" means a connection
 
PIN NUMBERS ARE FOR MAC DB-9.
NUMBERS IN () ARE FOR MINI DIN 8 (MAC PLUS)
 
          CapNet Connector  (last update 8/21/90)
 
 J1                                                  J2
       9 (5)                               C1 .1 uF
RCV(-) ----------------------------O----------][------O
                                   !
       8 (                       !       C2 .1 uF
RCV(+) --------------------------------O------][------O
                                   !   !            ^
                                   !   !           TO
       5 (3)                10 ohm !   !         "PHONE"
TX(-)  -----------O-----------R3----   !          LINES
                  !                    !
       4 (6)      !         10 ohm     !
TX(+)  -----------------O-----R4--------
                  !     !
             1K   R     R  1K
                  1     2
                  !     !
       3 (4)      !     !
GND    -----------O------
 
 
PARTS LIST:
 
QTY    DES      ITEM
2    R1,2      1K 1/8W RESISTORS
2    R3,4      10 OHM 1/8W RESISTORS
2    C1,2      .1 uF THREE LAYER CERAMIC CAPS
1    J1        DB-9 MALE OR MINI DIN 8 CONNECTOR
1    J2        2 PIN BERG OR RJ-11 PHONE CONNECTOR
5    WIRE      (NOT SHOWN) 22 GAUGE STRANDED WIRE 6"
 
 
NOTES:
 
C1,2 can be disk type but ceramic is more stable.
The entire unit can be mounted on a 1" X 1" .100 ctr
bread board or smaller. No printed circuit is needed.
Connect all componets lead to lead and connect cable
wires to leads on bottom of board.
Use heat shrink tubing over entire board as a cover
or dip in RTV sealer or put in a old 35MM film case.
 

In the case of the Lisa, since the Mac is RS422, you'd tie TX- and RX- together to data ground on the 25 pin side.

There's a bigger discussion here: https://mac68k.info/forums/message.jspa?messageID=1141
« Last Edit: February 16, 2021, 12:34:54 pm by rayarachelian »
Logged
Fate whispers to the warrior, 'You can not withstand the storm.'  The warrior whispers back, 'I am the storm.'
Pages: 1 2 [3]   Go Up