+//
+// CD-ROM memory access functions
+//
+
+uint8 CDROMReadByte(uint32 offset, uint32 who/*=UNKNOWN*/)
+{
+#ifdef CDROM_LOG
+ WriteLog("CDROM: reading byte from 0x%.8x\n",offset);
+#endif
+ return cdrom_ram[offset & 0xFF];
+}
+
+uint16 CDROMReadWord(uint32 offset, uint32 who/*=UNKNOWN*/)
+{
+ offset &= 0xFF;
+
+ uint16 data = 0x0000;
+
+ if (offset == 0x00)
+ data = 0x0000;
+ else if (offset == 0x02)
+ data = 0x2000;
+ else if (offset == 0x0A)
+ {
+ if (cdrom_cmd == 0x7001)
+ data = cdrom_cmd;
+ else
+ data = 0x0400;
+ }
+ else
+ data = (cdrom_ram[offset+0] << 8) | cdrom_ram[offset+1];
+
+#ifdef CDROM_LOG
+ WriteLog("CDROM: reading word 0x%.4x from 0x%.8x [68k pc=0x%.8x]\n",data,offset,s68000readPC());
+#endif
+ return data;
+}
+
+void CDROMWriteByte(uint32 offset, uint8 data, uint32 who/*=UNKNOWN*/)