diff options
author | MooglyGuy <MooglyGuy@users.noreply.github.com> | 2018-05-13 15:22:22 +0200 |
---|---|---|
committer | Olivier Galibert <galibert@pobox.com> | 2018-05-13 22:22:22 +0900 |
commit | 5cc2319a2e286735981cb62781e65169ff936a52 (patch) | |
tree | 9465116c1856e052635215df0b98e400cc8bd020 /src/mame/drivers/dambustr.cpp | |
parent | 49803e7418beefbd912d0090884063422888891d (diff) |
Removed DRIVER_INIT-related macros, made driver init entry in GAME/COMP/CONS explicit. (#3565)
* -Removed DRIVER_INIT macros in favor of explicitly-named member functions, nw
* -Removed DRIVER_INIT_related macros. Made init_ prefix on driver initializers explicit. Renamed init_0 to empty_init. Fixed up GAME/COMP/CONS macro spacing. [Ryan Holtz]
* Missed some files, nw
* Fix compile, (nw)
Diffstat (limited to 'src/mame/drivers/dambustr.cpp')
-rw-r--r-- | src/mame/drivers/dambustr.cpp | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/mame/drivers/dambustr.cpp b/src/mame/drivers/dambustr.cpp index 783bdae6fc2..820ca1931b1 100644 --- a/src/mame/drivers/dambustr.cpp +++ b/src/mame/drivers/dambustr.cpp @@ -70,7 +70,7 @@ public: int m_noise_data; DECLARE_WRITE8_MEMBER(dambustr_noise_enable_w); - DECLARE_DRIVER_INIT(dambustr); + void init_dambustr(); void dambustr(machine_config &config); void dambustr_map(address_map &map); }; @@ -213,43 +213,46 @@ static GFXDECODE_START( dambustr ) GFXDECODE_END -DRIVER_INIT_MEMBER(dambustr_state,dambustr) +void dambustr_state::init_dambustr() { - int i, j, tmp; int tmpram[16]; uint8_t *rom = memregion("maincpu")->base(); uint8_t *usr = memregion("user1")->base(); uint8_t *gfx = memregion("gfx1")->base(); // Bit swap addresses - for(i=0; i<4096*4; i++) { + for (int i = 0; i < 4096*4; i++){ rom[i] = usr[bitswap<16>(i,15,14,13,12, 4,10,9,8,7,6,5,3,11,2,1,0)]; - }; + } // Swap program ROMs - for(i=0; i<0x1000; i++) { - tmp = rom[0x5000+i]; + for (int i = 0; i < 0x1000; i++) + { + uint8_t tmp = rom[0x5000+i]; rom[0x5000+i] = rom[0x6000+i]; rom[0x6000+i] = rom[0x1000+i]; rom[0x1000+i] = tmp; - }; + } // Bit swap in $1000-$1fff and $4000-$5fff - for(i=0; i<0x1000; i++) { + for (int i = 0; i < 0x1000; i++) + { rom[0x1000+i] = bitswap<8>(rom[0x1000+i],7,6,5,1,3,2,4,0); rom[0x4000+i] = bitswap<8>(rom[0x4000+i],7,6,5,1,3,2,4,0); rom[0x5000+i] = bitswap<8>(rom[0x5000+i],7,6,5,1,3,2,4,0); - }; + } // Swap graphics ROMs - for(i=0;i<0x4000;i+=16) { - for(j=0; j<16; j++) + for (int i = 0; i < 0x4000; i += 16) + { + for (int j = 0; j < 16; j++) tmpram[j] = gfx[i+j]; - for(j=0; j<8; j++) { + for (int j = 0; j < 8; j++) + { gfx[i+j] = tmpram[j*2]; gfx[i+j+8] = tmpram[j*2+1]; - }; - }; + } + } } @@ -373,6 +376,6 @@ ROM_START( dambustruk ) ROM_END -GAME( 1981, dambustr, 0, dambustr, dambustr, dambustr_state, dambustr, ROT90, "South West Research", "Dambusters (US, set 1)", 0 ) -GAME( 1981, dambustra, dambustr, dambustr, dambustr, dambustr_state, dambustr, ROT90, "South West Research", "Dambusters (US, set 2)", 0 ) -GAME( 1981, dambustruk, dambustr, dambustr, dambustruk, dambustr_state, dambustr, ROT90, "South West Research", "Dambusters (UK)", 0 ) +GAME( 1981, dambustr, 0, dambustr, dambustr, dambustr_state, init_dambustr, ROT90, "South West Research", "Dambusters (US, set 1)", 0 ) +GAME( 1981, dambustra, dambustr, dambustr, dambustr, dambustr_state, init_dambustr, ROT90, "South West Research", "Dambusters (US, set 2)", 0 ) +GAME( 1981, dambustruk, dambustr, dambustr, dambustruk, dambustr_state, init_dambustr, ROT90, "South West Research", "Dambusters (UK)", 0 ) |