Change Log

24/1/97
Manage to get all the UAE 0.6 68K emulation code generated properly.

25/1/97
Code stubs for hardware (RAM, ROM, IWM, SCSI, SCC, VIA) and manage the memory
mapping functions.

1/2/97
Manage to solve last few problems between the UAE code and the compiler, the
engine in theory should work fine.

2/2/97
Placed the hardware code into the engine, wrote the direct memory access
translation functions for the ROM and RAM hardware portions.

3/2/97
Wrote the custom initialization and reset functions, got the emulator to boot
off the ROMs and try to initalize the hardware. Then wrote some dummy VIA
registers and mapping code to try and trace what's going on inside the
emulation.

7/2/97
Attempted to write some really hacked code to get the Mac to display something
onto the screen, doesn't work properly. PC hands over a copy of the current code
to Gustavo, who will quickly port vMac to the PC's.

8/2/97
Gustavo manages to get the PC port screen working fine, but nothing comes up. PC
writes the RTC emulation, and it seems to work.

9/2/97
PC finds a -major- error in the VIA and memory sections, which he fixes up.

10/2/97
PC manages to get the Mac to display the screen slightly better, and places in
some emulation for VBL interrupts. Sends code to Gustavo.

11/2/97
PC finds a bug in the RTC_Get function, which mangles up RTC return data, fixes
it up again and patches the PRAM to fake being valid.

17/2/97
Gustavo sends PC the new PC vMac ported code to inspect. Meanwhile PC writes in
some partial IWM emulation for the registers, and traces the ROMs through its
checksum, Low Memory System global settings, RAM clearing and other
miscellaneous portions of code. No sign of a boot as of yet, but PC finds that
Mouse button emulation and more RTC emulation must be included. (PC> Hey, I was
tired! I'll do it later! (Well, tired enough to write this and then switch into
a right to left reading mode...))

19/2/97
PC implements Drive Activation in the IWM for correct Status Register emulation,
also implements Mouse Button emulation for MacOS and places a check to pause the
emulation if the mouse button is down during the Screen redraw. PC also writes
RTC emulation register checks into the code, and manages to obtain hardware
access print outs.

20/2/97
PC traces the ROMs to find that they are doing bizarre accesses above the 16 MB
68K memory limit, so writes it to wrap around back down into the 16 MB
correctly, which subsequently speeds up initialization time for the SCC by about
15-20 times. PC also begins to implement portions of the SCC so it can now
sucessfully read and write its own registers. However, the data will have to be
abstracted to a higher level in order to allow communications with host
hardware.

28/2/97
PC implements a vMac.PRAM file so that the PRAM can be read and saved to disk
successfully, and also includes some more information into the ROM loader (ie,
Mac Plus ROM version, code name and checks the CheckSum). The keyboard is also
implemented as much as it can be so far.

6/3/97
PC notices that the ROMs are accessing in $00FFFFF0 to $00FFFFFF which is used
for auto vector reads, and tries to implement interrupts when a read or write
occurs. This seems to work better, as the emulation doesn't busy loop, but
rather busy loops to check if the SCC has got an empty transmit buffer.

11/3/97
PC writes in Interrupt emulation for the VIA since the ROMs have actually
changed the Interrupt Level to below 7, enabling them.

15/3/97
PC finds a chain effect bug in the ROM code which causes the Illegal
Instructions later in the emulation. Basically, the ROM attempts a
NewPtrSysClear call, which fails and the ROM doesn't check to see if it works,
then accesses an offset of A0 (which happens to be NULL) and so wipes out the
illegal instruction handler, causing a endless loop of illegal instructions.

The reason for the NewPtrSysClear failing is because somewhere earlier in the
emulation it has managed to wipe out the SysZone, causing it to fail to allocate
the pointer as the Zone's been mangled beyond all recognition. PC is attempting
to work out where it's going wrong, currently.

20/3/97
After pulling a long debug session, PC manages to trace the portion of code
where the
ROM initializes the SysZone, and it seems to be OK. After tracing into
InitResources,
it comes out mangled. PC checks into it, and eventually traces it down to a
single
BlockMove call which is supposed to copy the ROM Resource Map into the System
Zone.
Instead, it works -backwards- when it copies and hence wipes out the SysZone
header.

21/3/97
PC traces into BlockMove simultaneously with his Mac Plus and vMac to discover
that a
bug in the LSR.W command is wiping out the top word of the result to 0, which
adversely
effects the BlockMove trap into copying backwards instead of forwards like it's
supposed
to be doing. Phew! I hope I don't get much more of these kinds of problems!

27/3/97
PC manages to check the LSR.W command out, and finds that it expects to have
~0xFFFF equal 0xFFFF0000, which doesn't work on CW. PC changes all the incorrect
negations to their 32 bit equivalents, and then runs the emulation. For a
surprise, it passes everything and accesses the IWM more, and then the SCSI, and
for the first time, a Sad Mac shows! (PC> This was about 3:30 pm...). Memory
mapping has been updated to include more constants.

30/3/97
PC hands the code over to Gustavo for the DOS port, as well as Matt Gisher for
the Linux port.

2/4/97
PC fixes up the custom.c custominit routine (error work better now).