Deja IIx was choking on me right at the loading of AW.INITS. That seems extremely strange. I ran the original Deja ][, worked like a charm. OK, so it must be something in the creation of the prodos directory (the code is all new to use modern OS X routines). After looking at the same code over and over again (and walking the same piece of Apple II code that scans the directory) I finally spot the problem. The storage type of the entry is looked at. What was 0x10 originally was changed to 0x1 (very subtle indeed). Bingo!!
OK, the emulator was no longer choking, but it wasn’t loading AW.INITs either (It was loading TimeOut code though). Hmm, very strange indeed. More coffee!! I need more coffee!! So I thought — hey, I haven’t run this on a PPC in a while (and theoretically it should just work). So I run it on the PPC machine and guess what, AW.INITs load up. The light bulb goes off!! There is a endian issue here (PPC stores words and longs in Big-Endian, Intel, and Apple IIs use Little-Endian). After more digging, I managed to find two very different byte swap issues dealing with the filetypes and auxtypes.
So I present to you, your first trip to the Main Menu:
Yes, inverse uppercase isn’t drawing correctly (and keyboard input doesn’t work yet), but we’re going from launch to the Main Menu on Intel AND PPC. That’s a lot of code that has to execute.
Speaking of execution. The emulation is running in debug mode, which basically checks various conditions with each instruction and uses a timer to execute on a regular basis. It does have internal loop that allows it to process a variable number of instructions with each “timer hit”. I cranked this puppy up (from 50 to 5000) and BAM!, not even 0.5 seconds from launch to Main Menu. It was literally so fast that some of the startup screens (AW.INITS, TimeOut) weren’t drawn before they were overwritten with the Main Menu. That was cool!!
Wow! With speeds like this, who’s going to need Word or that renamed ClarisWorks program…..what did they name it again? 🙂
Thanks For continuing to work on this, Mark!
Howard