A few easy set_entry additions - now shifting banked ROM loading down from 0x10000 to 0x8000 where they belong. (nw)

This commit is contained in:
andrew-gardner 2015-03-09 16:58:54 +01:00
parent 57b84476bf
commit b5bfb0a9ce
6 changed files with 56 additions and 46 deletions

View File

@ -41,14 +41,14 @@ Notes:
#include "sound/2151intf.h"
#include "includes/sidearms.h"
void sidearms_state::machine_start()
{
membank("bank1")->configure_entries(0, 16, memregion("maincpu")->base() + 0x8000, 0x4000);
}
WRITE8_MEMBER(sidearms_state::sidearms_bankswitch_w)
{
int bankaddress;
UINT8 *RAM = memregion("maincpu")->base();
/* bits 0 and 1 select the ROM bank */
bankaddress = 0x10000 + (data & 0x0f) * 0x4000;
membank("bank1")->set_base(&RAM[bankaddress]);
membank("bank1")->set_entry(data & 0x07);
}
@ -119,10 +119,7 @@ ADDRESS_MAP_END
WRITE8_MEMBER(sidearms_state::whizz_bankswitch_w)
{
int bankaddress;
UINT8 *RAM = memregion("maincpu")->base();
int bank = 0;
int bank = 0;
switch (data & 0xC0)
{
case 0x00 : bank = 0; break;
@ -130,9 +127,7 @@ WRITE8_MEMBER(sidearms_state::whizz_bankswitch_w)
case 0x80 : bank = 1; break;
case 0xC0 : bank = 3; break;
}
bankaddress = 0x10000 + bank * 0x4000;
membank("bank1")->set_base(&RAM[bankaddress]);
membank("bank1")->set_entry(bank);
}
static ADDRESS_MAP_START( whizz_map, AS_PROGRAM, 8, sidearms_state )
@ -726,8 +721,8 @@ MACHINE_CONFIG_END
ROM_START( sidearms )
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "sa03.bin", 0x00000, 0x08000, CRC(e10fe6a0) SHA1(ae59461768d044f14b9aac3e4e491c76cec7adac) ) /* CODE */
ROM_LOAD( "a_14e.rom", 0x10000, 0x08000, CRC(4925ed03) SHA1(b11dbd9889db89cff008ca21beb6b1b70d983e16) ) /* 0+1 */
ROM_LOAD( "a_12e.rom", 0x18000, 0x08000, CRC(81d0ece7) SHA1(5c1d154f9c1de6b5f5d7abf5d413e9c493461e6f) ) /* 2+3 */
ROM_LOAD( "a_14e.rom", 0x08000, 0x08000, CRC(4925ed03) SHA1(b11dbd9889db89cff008ca21beb6b1b70d983e16) ) /* 0+1 */
ROM_LOAD( "a_12e.rom", 0x10000, 0x08000, CRC(81d0ece7) SHA1(5c1d154f9c1de6b5f5d7abf5d413e9c493461e6f) ) /* 2+3 */
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "a_04k.rom", 0x0000, 0x8000, CRC(34efe2d2) SHA1(e1d8895c113e4dee1a132e2471d75dfa6c36b620) )
@ -771,8 +766,8 @@ ROM_END
ROM_START( sidearmsu )
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "SAA_03.15E", 0x00000, 0x08000, CRC(32ef2739) SHA1(15e0535a6e3508c0d1ed73157a052c3716571000) ) /* CODE */
ROM_LOAD( "a_14e.rom", 0x10000, 0x08000, CRC(4925ed03) SHA1(b11dbd9889db89cff008ca21beb6b1b70d983e16) ) /* 0+1 */
ROM_LOAD( "a_12e.rom", 0x18000, 0x08000, CRC(81d0ece7) SHA1(5c1d154f9c1de6b5f5d7abf5d413e9c493461e6f) ) /* 2+3 */
ROM_LOAD( "a_14e.rom", 0x08000, 0x08000, CRC(4925ed03) SHA1(b11dbd9889db89cff008ca21beb6b1b70d983e16) ) /* 0+1 */
ROM_LOAD( "a_12e.rom", 0x10000, 0x08000, CRC(81d0ece7) SHA1(5c1d154f9c1de6b5f5d7abf5d413e9c493461e6f) ) /* 2+3 */
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "a_04k.rom", 0x0000, 0x8000, CRC(34efe2d2) SHA1(e1d8895c113e4dee1a132e2471d75dfa6c36b620) )
@ -816,8 +811,8 @@ ROM_END
ROM_START( sidearmsur1 )
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "03", 0x00000, 0x08000, CRC(9a799c45) SHA1(cf6836108506929ee2449546a4867a7cbf00bcc8) ) /* CODE */
ROM_LOAD( "a_14e.rom", 0x10000, 0x08000, CRC(4925ed03) SHA1(b11dbd9889db89cff008ca21beb6b1b70d983e16) ) /* 0+1 */
ROM_LOAD( "a_12e.rom", 0x18000, 0x08000, CRC(81d0ece7) SHA1(5c1d154f9c1de6b5f5d7abf5d413e9c493461e6f) ) /* 2+3 */
ROM_LOAD( "a_14e.rom", 0x08000, 0x08000, CRC(4925ed03) SHA1(b11dbd9889db89cff008ca21beb6b1b70d983e16) ) /* 0+1 */
ROM_LOAD( "a_12e.rom", 0x10000, 0x08000, CRC(81d0ece7) SHA1(5c1d154f9c1de6b5f5d7abf5d413e9c493461e6f) ) /* 2+3 */
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "a_04k.rom", 0x0000, 0x8000, CRC(34efe2d2) SHA1(e1d8895c113e4dee1a132e2471d75dfa6c36b620) )
@ -861,8 +856,8 @@ ROM_END
ROM_START( sidearmsj )
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "a_15e.rom", 0x00000, 0x08000, CRC(61ceb0cc) SHA1(bacf28e5e02b90a9d404c3ade0267e0a7cd73cd8) ) /* CODE */
ROM_LOAD( "a_14e.rom", 0x10000, 0x08000, CRC(4925ed03) SHA1(b11dbd9889db89cff008ca21beb6b1b70d983e16) ) /* 0+1 */
ROM_LOAD( "a_12e.rom", 0x18000, 0x08000, CRC(81d0ece7) SHA1(5c1d154f9c1de6b5f5d7abf5d413e9c493461e6f) ) /* 2+3 */
ROM_LOAD( "a_14e.rom", 0x08000, 0x08000, CRC(4925ed03) SHA1(b11dbd9889db89cff008ca21beb6b1b70d983e16) ) /* 0+1 */
ROM_LOAD( "a_12e.rom", 0x10000, 0x08000, CRC(81d0ece7) SHA1(5c1d154f9c1de6b5f5d7abf5d413e9c493461e6f) ) /* 2+3 */
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "a_04k.rom", 0x0000, 0x8000, CRC(34efe2d2) SHA1(e1d8895c113e4dee1a132e2471d75dfa6c36b620) )
@ -906,8 +901,8 @@ ROM_END
ROM_START( turtship )
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "t-3.bin", 0x00000, 0x08000, CRC(b73ed7f2) SHA1(bb98fe41b989d6568fe8cf1900a0d15c176b61a0) )
ROM_LOAD( "t-2.3g", 0x10000, 0x08000, CRC(2327b35a) SHA1(bf7b5e11c3f75aff7d09c0fc4ad61fb4bcb38100) )
ROM_LOAD( "t-1.bin", 0x18000, 0x08000, CRC(a258ffec) SHA1(caa689607ebe450a68736933dbfaf6bf9b6d3487) )
ROM_LOAD( "t-2.3g", 0x08000, 0x08000, CRC(2327b35a) SHA1(bf7b5e11c3f75aff7d09c0fc4ad61fb4bcb38100) )
ROM_LOAD( "t-1.bin", 0x10000, 0x08000, CRC(a258ffec) SHA1(caa689607ebe450a68736933dbfaf6bf9b6d3487) )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "t-4.8a", 0x00000, 0x08000, CRC(1cbe48e8) SHA1(6ac5981d36a44595bb8dc847c54c7be7b374f82c) )
@ -939,8 +934,8 @@ ROM_END
ROM_START( turtshipj )
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "t-3.5g", 0x00000, 0x08000, CRC(0863fc1c) SHA1(b583e06e05e466c2344a4a420a47227c9ab8705c) )
ROM_LOAD( "t-2.3g", 0x10000, 0x08000, CRC(2327b35a) SHA1(bf7b5e11c3f75aff7d09c0fc4ad61fb4bcb38100) )
ROM_LOAD( "t-1.3e", 0x18000, 0x08000, CRC(845a9ab0) SHA1(f1455aeca92d129c7ed145d76e5093f41ce62ccb) )
ROM_LOAD( "t-2.3g", 0x08000, 0x08000, CRC(2327b35a) SHA1(bf7b5e11c3f75aff7d09c0fc4ad61fb4bcb38100) )
ROM_LOAD( "t-1.3e", 0x10000, 0x08000, CRC(845a9ab0) SHA1(f1455aeca92d129c7ed145d76e5093f41ce62ccb) )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "t-4.8a", 0x00000, 0x08000, CRC(1cbe48e8) SHA1(6ac5981d36a44595bb8dc847c54c7be7b374f82c) )
@ -972,8 +967,8 @@ ROM_END
ROM_START( turtshipk )
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "turtship.003", 0x00000, 0x08000, CRC(e7a7fc2e) SHA1(1a9147e82a5e56e8e5b68bbce144f96261e88669) )
ROM_LOAD( "turtship.002", 0x10000, 0x08000, CRC(e576f482) SHA1(3be3792cb437bff0345681a3a2fdefefa3439357) )
ROM_LOAD( "turtship.001", 0x18000, 0x08000, CRC(a9b64240) SHA1(38c59877de6055230c3250ef74abc97e4ed88cb6) )
ROM_LOAD( "turtship.002", 0x08000, 0x08000, CRC(e576f482) SHA1(3be3792cb437bff0345681a3a2fdefefa3439357) )
ROM_LOAD( "turtship.001", 0x10000, 0x08000, CRC(a9b64240) SHA1(38c59877de6055230c3250ef74abc97e4ed88cb6) )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "t-4.8a", 0x00000, 0x08000, CRC(1cbe48e8) SHA1(6ac5981d36a44595bb8dc847c54c7be7b374f82c) )
@ -1004,8 +999,8 @@ ROM_END
ROM_START( dyger )
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "d-3.5g", 0x00000, 0x08000, CRC(bae9882e) SHA1(88194e58673ebd0841e9e07482842f6dbb823afc) )
ROM_LOAD( "d-2.3g", 0x10000, 0x08000, CRC(059ac4dc) SHA1(fe46d819946e168b4a8188302737fdde957743ea) )
ROM_LOAD( "d-1.3e", 0x18000, 0x08000, CRC(d8440f66) SHA1(3b2ee8c09d40edbe76d5004ed9074add0d4e4fd0) )
ROM_LOAD( "d-2.3g", 0x08000, 0x08000, CRC(059ac4dc) SHA1(fe46d819946e168b4a8188302737fdde957743ea) )
ROM_LOAD( "d-1.3e", 0x10000, 0x08000, CRC(d8440f66) SHA1(3b2ee8c09d40edbe76d5004ed9074add0d4e4fd0) )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "d-4.8a", 0x0000, 0x8000, CRC(8a256c09) SHA1(2c692af62da7c12b7d4f3f79264ee045a2cfa39f) )
@ -1037,8 +1032,8 @@ ROM_END
ROM_START( dygera )
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "d-3.bin", 0x00000, 0x08000, CRC(fc63da8b) SHA1(f324a314cda167ae05e2eb017da355709489a7a3) )
ROM_LOAD( "d-2.3g", 0x10000, 0x08000, CRC(059ac4dc) SHA1(fe46d819946e168b4a8188302737fdde957743ea) )
ROM_LOAD( "d-1.3e", 0x18000, 0x08000, CRC(d8440f66) SHA1(3b2ee8c09d40edbe76d5004ed9074add0d4e4fd0) )
ROM_LOAD( "d-2.3g", 0x08000, 0x08000, CRC(059ac4dc) SHA1(fe46d819946e168b4a8188302737fdde957743ea) )
ROM_LOAD( "d-1.3e", 0x10000, 0x08000, CRC(d8440f66) SHA1(3b2ee8c09d40edbe76d5004ed9074add0d4e4fd0) )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "d-4.8a", 0x0000, 0x8000, CRC(8a256c09) SHA1(2c692af62da7c12b7d4f3f79264ee045a2cfa39f) )
@ -1070,7 +1065,7 @@ ROM_END
ROM_START( twinfalc ) /* Shows "Notice This game is for use in Korea only..." The real PCB displays the same :-) */
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "t-15.bin", 0x00000, 0x08000, CRC(e1f20144) SHA1(911781232fc1a7d6e36abb1c45e68a4398d8deac) )
ROM_LOAD( "t-14.bin", 0x10000, 0x10000, CRC(c499ff83) SHA1(d99bb8cb04485638c5f05584cffdd2fbbe061af7) )
ROM_LOAD( "t-14.bin", 0x08000, 0x10000, CRC(c499ff83) SHA1(d99bb8cb04485638c5f05584cffdd2fbbe061af7) )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "t-1.b4", 0x0000, 0x8000, CRC(b84bc980) SHA1(d2d302a96a9e3197f27144e525a901cfb9da09e4) )
@ -1102,7 +1097,7 @@ ROM_END
ROM_START( whizz ) /* Whizz Philko 1989. Original pcb. Boardnumber: 01-90 / Serial: WZ-089-00845 */
ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + banked ROMs images */
ROM_LOAD( "t-15.l11", 0x00000, 0x08000, CRC(73161302) SHA1(de815bba66c376cea775139f4285de0b1a589d88) )
ROM_LOAD( "t-14.k11", 0x10000, 0x10000, CRC(bf248879) SHA1(f46f15e3949221e59d8c37de9c23473a74c2927e) )
ROM_LOAD( "t-14.k11", 0x08000, 0x10000, CRC(bf248879) SHA1(f46f15e3949221e59d8c37de9c23473a74c2927e) )
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "t-1.b4", 0x0000, 0x8000, CRC(b84bc980) SHA1(d2d302a96a9e3197f27144e525a901cfb9da09e4) )

View File

@ -31,6 +31,11 @@ Dips verified for Neratte Chu (nratechu) from manual
*
*************************************/
void st0016_state::machine_start()
{
membank("bank1")->configure_entries(0, 256, memregion("maincpu")->base(), 0x4000);
}
static ADDRESS_MAP_START( st0016_mem, AS_PROGRAM, 8, st0016_state )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
@ -76,8 +81,8 @@ WRITE8_MEMBER(st0016_state::mux_select_w)
WRITE8_MEMBER(st0016_state::st0016_rom_bank_w)
{
membank("bank1")->set_base(memregion("maincpu")->base() + (data* 0x4000));
// st0016_rom_bank=data;
membank("bank1")->set_entry(data);
// st0016_rom_bank = data;
}
static ADDRESS_MAP_START( st0016_io, AS_IO, 8, st0016_state )

View File

@ -72,6 +72,7 @@ public:
DECLARE_READ8_MEMBER(subcpu_status_r);
DECLARE_WRITE8_MEMBER(msm_cfg_w);
virtual void machine_start();
virtual void machine_reset();
TIMER_CALLBACK_MEMBER(subcpu_suspend);
TIMER_CALLBACK_MEMBER(subcpu_resume);
@ -98,9 +99,13 @@ public:
/* main Z80 */
void sothello_state::machine_start()
{
membank("bank1")->configure_entries(0, 4, memregion("maincpu")->base() + 0x8000, 0x4000);
}
WRITE8_MEMBER(sothello_state::bank_w)
{
UINT8 *RAM = memregion("maincpu")->base();
int bank=0;
switch(data^0xff)
{
@ -109,7 +114,7 @@ WRITE8_MEMBER(sothello_state::bank_w)
case 4: bank=2; break;
case 8: bank=3; break;
}
membank("bank1")->set_base(&RAM[bank*0x4000+0x10000]);
membank("bank1")->set_entry(bank);
}
TIMER_CALLBACK_MEMBER(sothello_state::subcpu_suspend)
@ -400,9 +405,9 @@ MACHINE_CONFIG_END
ROM_START( sothello )
ROM_REGION( 0x20000, "maincpu", 0 )
ROM_LOAD( "3.7c", 0x0000, 0x8000, CRC(47f97bd4) SHA1(52c9638f098fdcf66903fad7dafe3ab171758572) )
ROM_LOAD( "4.8c", 0x10000, 0x8000, CRC(a98414e9) SHA1(6d14e1f9c79b95101e0aa101034f398af09d7f32) )
ROM_LOAD( "5.9c", 0x18000, 0x8000, CRC(e5b5d61e) SHA1(2e4b3d85f41d0796a4d61eae40dd824769e1db86) )
ROM_LOAD( "3.7c", 0x00000, 0x8000, CRC(47f97bd4) SHA1(52c9638f098fdcf66903fad7dafe3ab171758572) )
ROM_LOAD( "4.8c", 0x08000, 0x8000, CRC(a98414e9) SHA1(6d14e1f9c79b95101e0aa101034f398af09d7f32) )
ROM_LOAD( "5.9c", 0x10000, 0x8000, CRC(e5b5d61e) SHA1(2e4b3d85f41d0796a4d61eae40dd824769e1db86) )
ROM_REGION( 0x10000, "soundcpu", 0 )
ROM_LOAD( "1.7a", 0x0000, 0x8000, CRC(6951536a) SHA1(64d07a692d6a167334c825dc173630b02584fdf6) )

View File

@ -134,6 +134,7 @@ public:
DECLARE_READ32_MEMBER(irq_ack_clear);
DECLARE_DRIVER_INIT(speglsht);
DECLARE_MACHINE_RESET(speglsht);
virtual void machine_start();
DECLARE_VIDEO_START(speglsht);
UINT32 screen_update_speglsht(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
required_device<palette_device> m_palette;
@ -157,10 +158,15 @@ static ADDRESS_MAP_START( st0016_mem, AS_PROGRAM, 8, speglsht_state )
AM_RANGE(0xf000, 0xffff) AM_RAM AM_SHARE("shared")
ADDRESS_MAP_END
void speglsht_state::machine_start()
{
membank("bank1")->configure_entries(0, 256, memregion("maincpu")->base(), 0x4000);
}
// common rombank? should go in machine/st0016 with larger address space exposed?
WRITE8_MEMBER(speglsht_state::st0016_rom_bank_w)
{
membank("bank1")->set_base(memregion("maincpu")->base() + (data* 0x4000));
membank("bank1")->set_entry(data);
}
@ -416,7 +422,6 @@ static MACHINE_CONFIG_START( speglsht, speglsht_state )
MCFG_PALETTE_ADD("palette", 16*16*4+1)
MCFG_VIDEO_START_OVERRIDE(speglsht_state,speglsht)
MACHINE_CONFIG_END
ROM_START( speglsht )
@ -433,11 +438,9 @@ ROM_START( speglsht )
ROM_REGION( 0x200000, "user2",0)
ROM_LOAD32_WORD( "sx004-05.u34", 0x000000, 0x100000, CRC(f3c69468) SHA1(81daef6d0596cb67bb6f87b39874aae1b1ffe6a6) ) /* Noted as "RD0" IE: R3000 Data 0 */
ROM_LOAD32_WORD( "sx004-06.u35", 0x000002, 0x100000, CRC(5af78e44) SHA1(0131d50348fef80c2b100d74b7c967c6a710d548) ) /* Noted as "RD1" */
ROM_END
DRIVER_INIT_MEMBER(speglsht_state,speglsht)
{
m_maincpu->st0016_game=3;

View File

@ -64,7 +64,8 @@ public:
TILE_GET_INFO_MEMBER(get_philko_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
TILEMAP_MAPPER_MEMBER(sidearms_tilemap_scan);
virtual void video_start();
virtual void machine_start();
virtual void video_start();
UINT32 screen_update_sidearms(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
DECLARE_WRITE_LINE_MEMBER(irqhandler);
void draw_sprites_region(bitmap_ind16 &bitmap, const rectangle &cliprect, int start_offset, int end_offset );

View File

@ -12,7 +12,7 @@ public:
{ }
int mux_port;
// UINT32 m_st0016_rom_bank;
// UINT32 m_st0016_rom_bank;
optional_device<st0016_cpu_device> m_maincpu;
DECLARE_READ8_MEMBER(mux_r);
@ -27,6 +27,7 @@ public:
DECLARE_DRIVER_INIT(mayjinsn);
DECLARE_DRIVER_INIT(mayjisn2);
DECLARE_DRIVER_INIT(renju);
virtual void machine_start();
DECLARE_VIDEO_START(st0016);
void st0016_draw_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_st0016(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);