Previous 199869 Revisions Next

r31945 Saturday 6th September, 2014 at 10:30:13 UTC by Fabio Priuli
(MESS) a7800: more accurate POKEY accesses make Beef Drop happier. nw.
[src/emu/bus/a7800]rom.c rom.h

trunk/src/emu/bus/a7800/rom.c
r31944r31945
77 - pokey or not
88 - 9 banks or not
99 etc...
10 But we might merge many of these if they become too many (e.g. could there be banked 32L RAM also
11 in a 9banks cart or in a cart with no bankswitch?)
10 But we might merge many of these if they become too many
11 
12 TODO:
13 - Are POKEY regs readable somewhere in SG 144K + POKEY homebrew? How do they detect
14   the POKEY otherwise?!?
1215
1316***********************************************************************************************************/
1417
r31944r31945
182185 
183186 -------------------------------------------------*/
184187
188READ8_MEMBER(a78_rom_pokey_device::read_40xx)
189{
190   if (offset < 0x4000)
191      return m_pokey->read(space, offset & 0x0f);
192
193   if (offset + 0x4000 < m_base_rom)
194      return 0xff;
195   else
196      return m_rom[offset + 0x4000 - m_base_rom];
197}
198
185199WRITE8_MEMBER(a78_rom_pokey_device::write_40xx)
186200{
187201   if (offset < 0x4000)
r31944r31945
233247 Carts with SuperGame bankswitch + POKEY chip
234248 As above + Pokey chip access
235249 
236 GAMES: Commando
250 GAMES: Commando and Barnyard Blaster
237251 
238252 -------------------------------------------------*/
239253
254READ8_MEMBER(a78_rom_sg_pokey_device::read_40xx)
255{
256   if (offset < 0x4000)
257      return m_pokey->read(space, offset & 0x0f);
258   else if (offset < 0x8000)
259      return m_rom[(offset & 0x3fff) + (m_bank * 0x4000)];
260   else
261      return m_rom[(offset & 0x3fff) + (m_bank_mask * 0x4000)];   // last bank
262}
263
240264WRITE8_MEMBER(a78_rom_sg_pokey_device::write_40xx)
241265{
242266   if (offset < 0x4000)
trunk/src/emu/bus/a7800/rom.h
r31944r31945
3636   virtual machine_config_constructor device_mconfig_additions() const;
3737   
3838   // reading and writing
39   virtual DECLARE_READ8_MEMBER(read_40xx);
3940   virtual DECLARE_WRITE8_MEMBER(write_40xx);
4041   
4142protected:
r31944r31945
7778   virtual machine_config_constructor device_mconfig_additions() const;
7879   
7980   // reading and writing
81   virtual DECLARE_READ8_MEMBER(read_40xx);
8082   virtual DECLARE_WRITE8_MEMBER(write_40xx);
8183   
8284protected:

Previous 199869 Revisions Next


© 1997-2024 The MAME Team