[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing emulator...



Dosius wrote:
> Apple II Oasis 2.4 puts it in Slot 5 and it works...  It does find the
> card, because there is a switch to Z80 mode and back.

This code in DAPPLE.C v. 0.72, Wr6502():

// if (Addr>=50432 && Addr<=50687)
 if (Addr==50432)
 {
  if (cpuinuse==emuZ80) /* from manual */
  {
   proc.A=RAM[0x45];
   proc.X=RAM[0x46];
   proc.Y=RAM[0x47];
   proc.P=RAM[0x48];
   proc.S=RAM[0x49];
// proc.PC.W=0x3D0;
   proc.PC.B.l=RAM[0x3D0];
   proc.PC.B.h=RAM[0x3D1];
   cpuinuse=emu6502;
   return;
  }
  cpuinuse=emuZ80;
  return;
 }

The register assignments are handled in the CP/M software.  You shouldn't be 
doing them in the emulator.

Mike