From 807c0a050f1be486e3ca453d84f9a05770ee93a8 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Wed, 7 Sep 2022 06:40:24 +1000 Subject: [PATCH] -midway/seattle.cpp: Added San Francisco Rush Boot Code Version L1.12 as a BIOS option. [neSneSgB] -gameboy.xml, gbcolor.xml: Mark HuC-1 cartridges as using non-volatile RAM, and demoted to partially supported for lack of IR transceiver emulation. -Various cleanups: * midway/seattle.cpp: Turned San Francisco Rush Boot Code Version L1.06A into a BIOS option rather than a clone - the game version is the same. * misc/highvideo.cpp: Use a more obvious pixel loop with fewer tests, and cleaned up spacing. * tvgames/micom_mahjong.cpp: Use active low logic for active low key matrix rather than inverting stuff everywhere. * pacific/thief.cpp: Cleaned up indentation gone wild. --- hash/gameboy.xml | 24 +++++++------- hash/gbcolor.xml | 10 +++--- src/emu/video.cpp | 2 +- src/mame/mame.lst | 1 - src/mame/midway/seattle.cpp | 38 ++++++---------------- src/mame/misc/highvdeo.cpp | 45 +++++++++++--------------- src/mame/pacific/thief.cpp | 11 ++++--- src/mame/tvgames/micom_mahjong.cpp | 51 ++++++++++++++++-------------- 8 files changed, 79 insertions(+), 103 deletions(-) diff --git a/hash/gameboy.xml b/hash/gameboy.xml index afbd7f22ae5..92992b37f02 100644 --- a/hash/gameboy.xml +++ b/hash/gameboy.xml @@ -4193,7 +4193,7 @@ license:CC0 - + Chousoku Spinner (Japan) 1998 @@ -4213,7 +4213,7 @@ license:CC0 - + @@ -4704,7 +4704,7 @@ license:CC0 - + + + Pokémon Card GB (Japan) 1998 Nintendo @@ -16459,7 +16459,7 @@ license:CC0 - + diff --git a/src/emu/video.cpp b/src/emu/video.cpp index 5dd1af6faca..bccaac58a00 100644 --- a/src/emu/video.cpp +++ b/src/emu/video.cpp @@ -301,7 +301,7 @@ std::string video_manager::speed_text() // append the speed for all cases except paused if (!paused) - util::stream_format(str, " %3d%%", (int)(100 * m_speed_percent + 0.5)); + util::stream_format(str, " %3d%%", int(100 * m_speed_percent + 0.5)); // display the number of partial updates as well int partials = 0; diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 54845f298db..a5e3ff5f266 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -37900,7 +37900,6 @@ hyprdriv // (c) 1998 Midway Games mace // (c) 1996 Atari Games macea // (c) 1996 Atari Games sfrush // (c) 1996 Atari Games -sfrusha // (c) 1996 Atari Games sfrushrk // (c) 1996 Atari Games sfrushrkw // (c) 1996 Atari Games sfrushrkwo // (c) 1996 Atari Games diff --git a/src/mame/midway/seattle.cpp b/src/mame/midway/seattle.cpp index f40b06affdd..381ed7a6060 100644 --- a/src/mame/midway/seattle.cpp +++ b/src/mame/midway/seattle.cpp @@ -297,7 +297,8 @@ public: m_wheel_driver(*this, "wheel"), m_lamps(*this, "lamp%u", 0U), m_leds(*this, "led%u", 0U) - {} + { + } void seattle_common(machine_config &config); void phoenix(machine_config &config); @@ -2408,31 +2409,13 @@ ROM_END ROM_START( sfrush ) - ROM_REGION32_LE( 0x80000, PCI_ID_GALILEO":rom", 0 ) // Boot Code Version L1.0 - ROM_LOAD( "hdboot.u32", 0x000000, 0x80000, CRC(39a35f1b) SHA1(c46d83448399205d38e6e41dd56abbc362254254) ) - - ROM_REGION32_LE( 0x100000, PCI_ID_GALILEO":update", ROMREGION_ERASEFF ) - - ROM_REGION32_LE( 0x200000, "cage:boot", 0 ) // TMS320C31 boot ROM Version L1.0 - ROM_LOAD32_BYTE( "sndboot.u69", 0x000000, 0x080000, CRC(7e52cdc7) SHA1(f735063e19d2ca672cef6d761a2a47df272e8c59) ) - - ROM_REGION32_LE( 0x1000000, "cage", 0 ) // TMS320C31 sound ROMs - ROM_LOAD32_WORD( "sfrush.u62", 0x400000, 0x200000, CRC(5d66490e) SHA1(bd39ea3b45d44cae6ca5890f365653326bbecd2d) ) - ROM_LOAD32_WORD( "sfrush.u61", 0x400002, 0x200000, CRC(f3a00ee8) SHA1(c1ac780efc32b2e30522d7cc3e6d92e7daaadddd) ) - ROM_LOAD32_WORD( "sfrush.u53", 0x800000, 0x200000, CRC(71f8ddb0) SHA1(c24bef801f43bae68fda043c4356e8cf1298ca97) ) - ROM_LOAD32_WORD( "sfrush.u49", 0x800002, 0x200000, CRC(dfb0a54c) SHA1(ed34f9485f7a7e5bb73bf5c6428b27548e12db12) ) - - DISK_REGION( PCI_ID_IDE":ide:0:hdd:image" ) // Hard Drive Version L1.06 - DISK_IMAGE( "sfrush", 0, SHA1(e2db0270a707fb2115207f988d5751081d6b4994) ) - - ROM_REGION( 0x2000, "serial_security_pic", ROMREGION_ERASEFF ) // security PIC (provides game ID code and serial number) - ROM_LOAD( "315_sf_rush.u96", 0x0000, 0x1000, CRC(e3527a3a) SHA1(5e556e6dfd87df5a895bdf4bd7f77708ac327db7) ) -ROM_END - - -ROM_START( sfrusha ) - ROM_REGION32_LE( 0x80000, PCI_ID_GALILEO":rom", 0 ) // Boot Code Version L1.06A - ROM_LOAD( "hdbootv1_06a.bin", 0x000000, 0x80000, CRC(f247ba60) SHA1(850f97002eb1e362c3df870d7b6a1b5524ab983d) ) + ROM_REGION32_LE( 0x80000, PCI_ID_GALILEO":rom", 0 ) + ROM_SYSTEM_BIOS( 0, "l10", "Boot Code Version L1.0" ) + ROMX_LOAD( "hdboot.u32", 0x000000, 0x80000, CRC(39a35f1b) SHA1(c46d83448399205d38e6e41dd56abbc362254254), ROM_BIOS(0) ) + ROM_SYSTEM_BIOS( 1, "l106a", "Boot Code Version L1.06A" ) + ROMX_LOAD( "hdbootv1_06a.bin", 0x000000, 0x80000, CRC(f247ba60) SHA1(850f97002eb1e362c3df870d7b6a1b5524ab983d), ROM_BIOS(1) ) + ROM_SYSTEM_BIOS( 2, "l112", "Boot Code Version L1.12" ) + ROMX_LOAD( "hdbootv1_12.u32", 0x000000, 0x80000, CRC(efec7dfb) SHA1(3632934dc655867636fd2c5c4e96b3e300d86d68), ROM_BIOS(2) ) ROM_REGION32_LE( 0x100000, PCI_ID_GALILEO":update", ROMREGION_ERASEFF ) @@ -2923,8 +2906,7 @@ GAME( 1996, wg3dh, 0, wg3dh, wg3dh, seattle_state, init_wg3d GAME( 1996, wg3dhfe, wg3dh, wg3dh, wg3dh, seattle_state, init_wg3dh, ROT0, "Atari Games", "Wayne Gretzky's 3D Hockey Fatality Edition (prototype)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, mace, 0, mace, mace, seattle_state, init_mace, ROT0, "Atari Games", "Mace: The Dark Age (boot ROM 1.0ce, HDD 1.0b)", MACHINE_SUPPORTS_SAVE ) GAME( 1997, macea, mace, mace, mace, seattle_state, init_mace, ROT0, "Atari Games", "Mace: The Dark Age (HDD 1.0a)", MACHINE_SUPPORTS_SAVE ) -GAMEL( 1996, sfrush, 0, sfrush, sfrush, seattle_state, init_sfrush, ROT0, "Atari Games", "San Francisco Rush (boot rom L 1.0)", MACHINE_SUPPORTS_SAVE, layout_sfrush ) -GAMEL( 1996, sfrusha, sfrush, sfrush, sfrush, seattle_state, init_sfrush, ROT0, "Atari Games", "San Francisco Rush (boot rom L 1.06A)", MACHINE_SUPPORTS_SAVE, layout_sfrush ) +GAMEL( 1996, sfrush, 0, sfrush, sfrush, seattle_state, init_sfrush, ROT0, "Atari Games", "San Francisco Rush", MACHINE_SUPPORTS_SAVE, layout_sfrush ) GAMEL( 1997, sfrushrk, 0, sfrushrk, sfrushrk, seattle_state, init_sfrushrk, ROT0, "Atari Games", "San Francisco Rush: The Rock (boot rom L 1.0, GUTS Oct 6 1997 / MAIN Oct 16 1997)", MACHINE_SUPPORTS_SAVE, layout_sfrush ) GAMEL( 1997, sfrushrkw, sfrushrk, sfrushrkw, sfrushrk, seattle_state, init_sfrushrk, ROT0, "Atari Games", "San Francisco Rush: The Rock (Wavenet, boot rom L 1.38, GUTS Aug 19 1997 / MAIN Aug 19 1997)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_sfrush ) GAMEL( 1997, sfrushrkwo, sfrushrk, sfrushrkw, sfrushrk, seattle_state, init_sfrushrk, ROT0, "Atari Games", "San Francisco Rush: The Rock (Wavenet, boot rom L 1.38, GUTS Aug 6 1997 / MAIN Aug 5 1997)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE, layout_sfrush ) diff --git a/src/mame/misc/highvdeo.cpp b/src/mame/misc/highvdeo.cpp index c47992dff21..911712748b8 100644 --- a/src/mame/misc/highvdeo.cpp +++ b/src/mame/misc/highvdeo.cpp @@ -239,24 +239,19 @@ void highvdeo_state::machine_reset() uint32_t highvdeo_state::screen_update_tourvisn(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - for(int y=cliprect.min_y;y<=cliprect.max_y;y++) + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { - int count = ((y * (screen.visible_area().max_x+1)) + cliprect.min_x) >> 1; - for(int x=(cliprect.min_x>>1);x<=(cliprect.max_x>>1);x++) + int count = ((y * (screen.visible_area().max_x + 1)) + cliprect.min_x) >> 1; + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) { - uint32_t color; + uint16_t color = m_blit_ram[count]; + if (!BIT(x, 0)) + { + color >>= 8; + count++; + } - color = ((m_blit_ram[count]) & 0x00ff)>>0; - - if(cliprect.contains((x*2)+0, y)) - bitmap.pix(y, (x*2)+0) = m_palette->pen(color); - - color = ((m_blit_ram[count]) & 0xff00)>>8; - - if(cliprect.contains((x*2)+1, y)) - bitmap.pix(y, (x*2)+1) = m_palette->pen(color); - - count++; + bitmap.pix(y, x) = m_palette->pen(color & 0xff); } } @@ -268,13 +263,11 @@ uint32_t highvdeo_state::screen_update_brasil(screen_device &screen, bitmap_rgb3 { pen_t const *const rgb = m_palette->pens(); // 16 bit RGB - for(int y=cliprect.min_y;y<=cliprect.max_y;y++) + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { int count = (y * 400) + cliprect.min_x; - for(int x=cliprect.min_x;x<=cliprect.max_x;x++) - { + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) bitmap.pix(y, x) = rgb[m_blit_ram[count++]]; - } } return 0; @@ -498,7 +491,7 @@ void highvdeo_state::tv_tcf_io(address_map &map) uint16_t highvdeo_state::ciclone_status_r() { - m_resetpulse^=0x10; + m_resetpulse ^= 0x10; return 0 | m_resetpulse; } @@ -538,7 +531,7 @@ uint16_t highvdeo_state::record_status_r() if (!machine().side_effects_disabled()) m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); - m_resetpulse^=0x15; // and 0x07, cmp with 0x05 + m_resetpulse ^= 0x15; // and 0x07, cmp with 0x05 return 0 | m_resetpulse; } @@ -625,7 +618,7 @@ void highvdeo_state::record_io(address_map &map) uint16_t highvdeo_state::brasil_status_r() { - m_resetpulse^=0x10; + m_resetpulse ^= 0x10; return 3 | m_resetpulse; } @@ -668,13 +661,13 @@ uint16_t highvdeo_state::newtiger_prot_r() uint16_t highvdeo_state::magicbom_status_r() { - m_resetpulse^=0x20; + m_resetpulse ^= 0x20; return m_resetpulse; } uint16_t highvdeo_state::magicbom_prot_r() { - return (m_grancapi_prot_latch & 3)|0x0b; + return (m_grancapi_prot_latch & 3) | 0x0b; } @@ -703,11 +696,9 @@ void highvdeo_state::brasil_io(address_map &map) void highvdeo_state::fashion_output_w(uint16_t data) { - int i; - // popmessage("%04x",data); - for(i=0;i<4;i++) + for (int i = 0; i < 4; i++) { machine().bookkeeping().coin_counter_w(i,data & 0x20); machine().bookkeeping().coin_lockout_w(i,~data & 0x01); diff --git a/src/mame/pacific/thief.cpp b/src/mame/pacific/thief.cpp index 04843fcf391..9bc135ce420 100644 --- a/src/mame/pacific/thief.cpp +++ b/src/mame/pacific/thief.cpp @@ -118,11 +118,12 @@ private: struct coprocessor { - coprocessor(device_t &host) : context_ram(host, "context_ram", 0x400, ENDIANNESS_LITTLE), - bank(0), - image_ram(host, "image_ram", 0x2000, ENDIANNESS_LITTLE), - param{} - { } + coprocessor(device_t &host) : + context_ram(host, "context_ram", 0x400, ENDIANNESS_LITTLE), + bank(0), + image_ram(host, "image_ram", 0x2000, ENDIANNESS_LITTLE), + param{} + { } memory_share_creator context_ram; uint8_t bank; diff --git a/src/mame/tvgames/micom_mahjong.cpp b/src/mame/tvgames/micom_mahjong.cpp index a7d2566f5cc..2b0cde0f144 100644 --- a/src/mame/tvgames/micom_mahjong.cpp +++ b/src/mame/tvgames/micom_mahjong.cpp @@ -102,19 +102,19 @@ void mmahjong_state::input_w(u8 data) { // d0-d2: input matrix // d3 is also written, but unused - m_inp_matrix = ~data; + m_inp_matrix = data; } u8 mmahjong_state::input_r() { - u8 data = 0; + u8 data = 0xff; // read keypad for (int i = 0; i < 3; i++) - if (BIT(m_inp_matrix, i)) - data |= m_inputs[i]->read(); + if (!BIT(m_inp_matrix, i)) + data &= m_inputs[i]->read(); - return ~data; + return data; } void mmahjong_state::sound_w(u8 data) @@ -147,29 +147,32 @@ void mmahjong_state::main_map(address_map &map) static INPUT_PORTS_START( mmahjong ) PORT_START("IN.0") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_MAHJONG_A) // 1 - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_B) // 2 - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_C) // 3 - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_D) // 4 - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_E) // 5 - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_F) // 6 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A) // 1 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_B) // 2 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_C) // 3 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_D) // 4 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_E) // 5 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_MAHJONG_F) // 6 + PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_MAHJONG_G) // 7 - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_H) // 8 - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_I) // 9 - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_J) // 10 - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_K) // 11 - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_L) // 12 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_G) // 7 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_H) // 8 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_I) // 9 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_J) // 10 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_K) // 11 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_MAHJONG_L) // 12 + PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED) PORT_START("IN.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_MAHJONG_M) // 13 - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_MAHJONG_N) // 0 (Tsumo) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_MAHJONG_PON) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_MAHJONG_CHI) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_MAHJONG_KAN) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_MAHJONG_REACH) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_MAHJONG_RON) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_MAHJONG_M) // 13 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_MAHJONG_N) // 0 (Tsumo) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_MAHJONG_PON) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_MAHJONG_KAN) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_MAHJONG_REACH) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_MAHJONG_RON) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END