Previous 199869 Revisions Next

r34048 Wednesday 24th December, 2014 at 10:53:36 UTC by Olivier Galibert
Merge pull request #89 from lucab/lucab/mame-lua/mem-v2

luaengine: add memory-reading capabilities [Luca Bruno]
[src/mame/drivers]cps1.c
[src/mame/includes]cps1.h

trunk/src/mame/drivers/cps1.c
r242559r242560
1151811518   m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xff0000, 0xffffff, read16_delegate(FUNC(cps_state::ganbare_ram_r),this), write16_delegate(FUNC(cps_state::ganbare_ram_w),this));
1151911519}
1152011520
11521READ16_MEMBER(cps_state::dinohunt_sound_r)
11522{
11523   /*TODO: understand what's really going on here. According to MT05805;
11524   "I think that the values written are only qsound leftovers (after a lot of 0xFF values,
11525   there is the same qsound starting sequence, eg: 0x88, 0xFF, 0x0B, 0x00, 0x00, 0x00, ...)."*/
11526   return 0xff;
11527}
11528
1152111529DRIVER_INIT_MEMBER(cps_state,dinohunt)
1152211530{
1152311531   // is this shared with the new sound hw?
11524   UINT8* ram = (UINT8*)m_maincpu->space(AS_PROGRAM).install_ram(0xf18000, 0xf19fff);
11525   memset(ram,0xff,0x2000);
11526   m_maincpu->space(AS_PROGRAM).install_read_handler(0xfc0000, 0xfc0001, read16_delegate(FUNC(cps_state::cps1_in2_r), this));
11532   m_maincpu->space(AS_PROGRAM).install_read_handler(0xf18000, 0xf19fff, read16_delegate(FUNC(cps_state::dinohunt_sound_r), this));
11533   m_maincpu->space(AS_PROGRAM).install_read_port(0xfc0000, 0xfc0001, "IN2"); ;
11534   // the ym2151 doesn't seem to be used. Is it actually on the PCB?
11535   
1152711536   DRIVER_INIT_CALL(cps1);
1152811537}
1152911538
trunk/src/mame/includes/cps1.h
r242559r242560
242242   DECLARE_WRITE8_MEMBER(cps1_oki_pin7_w);
243243   DECLARE_WRITE16_MEMBER(sf2m1_layer_w);
244244   DECLARE_WRITE16_MEMBER(sf2m3_layer_w);
245   DECLARE_READ16_MEMBER(dinohunt_sound_r);
245246   DECLARE_DRIVER_INIT(sf2rb);
246247   DECLARE_DRIVER_INIT(sf2rb2);
247248   DECLARE_DRIVER_INIT(sf2thndr);


Previous 199869 Revisions Next


© 1997-2024 The MAME Team