+ // write(u32 data)
+ map_item(&mem_iowtab[IOMEM32(0x1040)], io_write_sio32, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1070)], psxHwWriteIstat, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1074)], psxHwWriteImask, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1088)], psxHwWriteChcr0, 1);
+ map_item(&mem_iowtab[IOMEM32(0x108c)], psxHwWriteChcr0, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1098)], psxHwWriteChcr1, 1);
+ map_item(&mem_iowtab[IOMEM32(0x109c)], psxHwWriteChcr1, 1);
+ map_item(&mem_iowtab[IOMEM32(0x10a8)], psxHwWriteChcr2, 1);
+ map_item(&mem_iowtab[IOMEM32(0x10ac)], psxHwWriteChcr2, 1);
+ map_item(&mem_iowtab[IOMEM32(0x10b8)], psxHwWriteChcr3, 1);
+ map_item(&mem_iowtab[IOMEM32(0x10bc)], psxHwWriteChcr3, 1);
+ map_item(&mem_iowtab[IOMEM32(0x10c8)], psxHwWriteChcr4, 1);
+ map_item(&mem_iowtab[IOMEM32(0x10cc)], psxHwWriteChcr4, 1);
+ map_item(&mem_iowtab[IOMEM32(0x10e8)], psxHwWriteChcr6, 1);
+ map_item(&mem_iowtab[IOMEM32(0x10ec)], psxHwWriteChcr6, 1);
+ map_item(&mem_iowtab[IOMEM32(0x10f4)], psxHwWriteDmaIcr32, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1100)], io_rcnt_write_count0, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1104)], io_rcnt_write_mode0, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1108)], io_rcnt_write_target0, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1110)], io_rcnt_write_count1, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1114)], io_rcnt_write_mode1, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1118)], io_rcnt_write_target1, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1120)], io_rcnt_write_count2, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1124)], io_rcnt_write_mode2, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1128)], io_rcnt_write_target2, 1);
+// map_item(&mem_iowtab[IOMEM32(0x1810)], GPU_writeData, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1814)], psxHwWriteGpuSR, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1820)], mdecWrite0, 1);
+ map_item(&mem_iowtab[IOMEM32(0x1824)], mdecWrite1, 1);
+
+ map_item(&mem_iowtab[IOMEM16(0x1014)], io_write_force32_1014, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1040)], io_write_sio16, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1044)], sioWriteStat16, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1048)], sioWriteMode16, 1);
+ map_item(&mem_iowtab[IOMEM16(0x104a)], sioWriteCtrl16, 1);
+ map_item(&mem_iowtab[IOMEM16(0x104e)], sioWriteBaud16, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1060)], io_write_force32_1060, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1070)], psxHwWriteIstat, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1074)], psxHwWriteImask, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1080)], io_write_force32_1080, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1088)], psxHwWriteChcr0, 1);
+ map_item(&mem_iowtab[IOMEM16(0x108c)], psxHwWriteChcr0, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1090)], io_write_force32_1090, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1098)], psxHwWriteChcr1, 1);
+ map_item(&mem_iowtab[IOMEM16(0x109c)], psxHwWriteChcr1, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10a0)], io_write_force32_10a0, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10a8)], psxHwWriteChcr2, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10ac)], psxHwWriteChcr2, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10b0)], io_write_force32_10b0, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10b8)], psxHwWriteChcr3, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10bc)], psxHwWriteChcr3, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10c0)], io_write_force32_10c0, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10c8)], psxHwWriteChcr4, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10cc)], psxHwWriteChcr4, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10e0)], io_write_force32_10e0, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10e8)], psxHwWriteChcr6, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10ec)], psxHwWriteChcr6, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10f0)], io_write_force32_10f0, 1);
+ map_item(&mem_iowtab[IOMEM16(0x10f4)], psxHwWriteDmaIcr32, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1100)], io_rcnt_write_count0, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1104)], io_rcnt_write_mode0, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1108)], io_rcnt_write_target0, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1110)], io_rcnt_write_count1, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1114)], io_rcnt_write_mode1, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1118)], io_rcnt_write_target1, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1120)], io_rcnt_write_count2, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1124)], io_rcnt_write_mode2, 1);
+ map_item(&mem_iowtab[IOMEM16(0x1128)], io_rcnt_write_target2, 1);
+
+ map_item(&mem_iowtab[IOMEM8(0x1040)], sioWrite8, 1);
+ map_item(&mem_iowtab[IOMEM8(0x1800)], cdrWrite0, 1);
+ map_item(&mem_iowtab[IOMEM8(0x1801)], cdrWrite1, 1);
+ map_item(&mem_iowtab[IOMEM8(0x1802)], cdrWrite2, 1);
+ map_item(&mem_iowtab[IOMEM8(0x1803)], cdrWrite3, 1);
+
+ for (i = 0x1c00; i < 0x2000; i += 2) {
+ map_item(&mem_iowtab[IOMEM16(i)], io_spu_write16, 1);
+ map_item(&mem_iowtab[IOMEM32(i)], io_spu_write32, 1);