Previous 199869 Revisions Next

r21589 Tuesday 5th March, 2013 at 10:43:09 UTC by Miodrag Milanović
Fix issue with overwriting internal address map for snes. This should be made device_address_map in future but cpu core needs first to be converted to c++ (nw)
[src/emu/cpu/g65816]g65816.c g65816.h
[src/mess/drivers]snes.c

trunk/src/emu/cpu/g65816/g65816.h
r21588r21589
6767
6868void g65816_set_read_vector_callback(device_t *device, read8_delegate read_vector);
6969
70void set_5a22_map(legacy_cpu_device &cpu);
7071
7172/* ======================================================================== */
7273/* ============================== END OF FILE ============================= */
trunk/src/emu/cpu/g65816/g65816.c
r21588r21589
674674
675675ADDRESS_MAP_END
676676
677void set_5a22_map(legacy_cpu_device &cpu)
678{
679   cpu.space(AS_PROGRAM).install_legacy_write_handler(0x4202, 0x4202, 0, 0x3f0000, FUNC(wrmpya_w));
680   cpu.space(AS_PROGRAM).install_legacy_write_handler(0x4203, 0x4203, 0, 0x3f0000, FUNC(wrmpyb_w));
681   cpu.space(AS_PROGRAM).install_legacy_write_handler(0x4204, 0x4204, 0, 0x3f0000, FUNC(wrdivl_w));
682   cpu.space(AS_PROGRAM).install_legacy_write_handler(0x4205, 0x4205, 0, 0x3f0000, FUNC(wrdivh_w));
683   cpu.space(AS_PROGRAM).install_legacy_write_handler(0x4206, 0x4206, 0, 0x3f0000, FUNC(wrdvdd_w));
684   
685   cpu.space(AS_PROGRAM).install_legacy_write_handler(0x420d, 0x420d, 0, 0x3f0000, FUNC(memsel_w));
686   
687   cpu.space(AS_PROGRAM).install_legacy_read_handler(0x4214, 0x4214, 0, 0x3f0000, FUNC(rddivl_r));
688   cpu.space(AS_PROGRAM).install_legacy_read_handler(0x4215, 0x4215, 0, 0x3f0000, FUNC(rddivh_r));
689   cpu.space(AS_PROGRAM).install_legacy_read_handler(0x4216, 0x4216, 0, 0x3f0000, FUNC(rdmpyl_r));
690   cpu.space(AS_PROGRAM).install_legacy_read_handler(0x4217, 0x4217, 0, 0x3f0000, FUNC(rdmpyh_r));
691}
692
677693CPU_SET_INFO( _5a22 )
678694{
679695   g65816i_cpu_struct *cpustate = (device != NULL && device->token() != NULL) ? get_safe_token(device) : NULL;
trunk/src/mess/drivers/snes.c
r21588r21589
23732373      case SNES_MODE21:
23742374      case SNES_MODE25:
23752375      case SNES_DSP_MODE21:
2376//         machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler(0x000000, 0x7dffff, FUNC(snes21_lo_r), FUNC(snes21_lo_w));
2377//         machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler(0x800000, 0xffffff, FUNC(snes21_hi_r), FUNC(snes21_hi_w));
2376         machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler(0x000000, 0x7dffff, FUNC(snes21_lo_r), FUNC(snes21_lo_w));
2377         machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_readwrite_handler(0x800000, 0xffffff, FUNC(snes21_hi_r), FUNC(snes21_hi_w));
2378         set_5a22_map(*state->m_maincpu);
23782379         break;
23792380   }
23802381}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team