From 626b566feeea0863644a45232b92568417542af9 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sun, 26 May 2019 13:10:03 +1000 Subject: srcclean (nw) --- hash/apple2_flop_clcracked.xml | 4 +- hash/ekara_japan_ac.xml | 4 +- hash/icanguit.xml | 18 +- hash/neogeo.xml | 2 +- hash/ngpc.xml | 12 +- scripts/genie.lua | 2 +- scripts/src/netlist.lua | 12 +- scripts/src/tools.lua | 12 +- scripts/target/mame/nl.lua | 2 +- src/devices/bus/abcbus/ssa.cpp | 30 +- src/devices/bus/abcbus/ssa.h | 2 +- src/devices/bus/bbc/rom/genie.cpp | 12 +- src/devices/bus/c64/buscard.cpp | 26 +- src/devices/bus/c64/buscard2.cpp | 8 +- src/devices/bus/cbmiec/c1541.cpp | 68 +- src/devices/bus/cbmiec/interpod.cpp | 4 +- src/devices/bus/cbmiec/interpod.h | 2 +- src/devices/bus/coco/dragon_sprites.cpp | 2 +- src/devices/bus/gio/newport.cpp | 1098 +++++++++++++------------- src/devices/bus/gio/newport.h | 76 +- src/devices/bus/isa/asc88.h | 2 +- src/devices/cpu/i386/athlon.cpp | 8 +- src/devices/cpu/m68000/m68k_in.lst | 6 +- src/devices/cpu/m68000/m68kops.cpp | 4 +- src/devices/cpu/sm510/sm590core.cpp | 4 +- src/devices/cpu/unsp/unsp.cpp | 2 +- src/devices/cpu/unsp/unsp_extended.cpp | 12 +- src/devices/cpu/unsp/unsp_fxxx.cpp | 6 +- src/devices/machine/ds1994.h | 202 ++--- src/devices/machine/spg2xx_audio.cpp | 6 +- src/devices/machine/sunplus_gcm394.cpp | 40 +- src/devices/machine/sunplus_gcm394_video.cpp | 16 +- src/devices/machine/sunplus_gcm394_video.h | 4 +- src/devices/sound/mas3507d.cpp | 2 +- src/devices/sound/swp00.h | 2 +- src/devices/video/mc6847.cpp | 6 +- src/frontend/mame/luaengine.cpp | 2 +- src/lib/formats/os9_dsk.cpp | 128 +-- src/lib/formats/os9_dsk.h | 14 +- src/lib/netlist/macro/nlm_ttl74xx.cpp | 14 +- src/lib/netlist/nl_base.h | 6 +- src/lib/netlist/nl_errstr.h | 4 +- src/mame/audio/bally.cpp | 84 +- src/mame/audio/bally.h | 46 +- src/mame/drivers/abc80.cpp | 8 +- src/mame/drivers/amaticmg.cpp | 4 +- src/mame/drivers/at.cpp | 60 +- src/mame/drivers/bnstars.cpp | 32 +- src/mame/drivers/by35.cpp | 22 +- src/mame/drivers/c64.cpp | 30 +- src/mame/drivers/cntsteer.cpp | 2 +- src/mame/drivers/cps2.cpp | 12 +- src/mame/drivers/daryde.cpp | 6 +- src/mame/drivers/jaguar.cpp | 2 +- src/mame/drivers/merit3xx.cpp | 4 +- src/mame/drivers/miniboy7.cpp | 14 +- src/mame/drivers/monon_color.cpp | 2 +- src/mame/drivers/ms32.cpp | 32 +- src/mame/drivers/multi16.cpp | 68 +- src/mame/drivers/mvme162.cpp | 34 +- src/mame/drivers/nemesis.cpp | 42 +- src/mame/drivers/neogeo.cpp | 2 +- src/mame/drivers/segaatom.cpp | 2 +- src/mame/drivers/skimaxx.cpp | 2 +- src/mame/drivers/starrider.cpp | 2 +- src/mame/drivers/sunplus_gcm394.cpp | 2 +- src/mame/drivers/talkingbb.cpp | 2 +- src/mame/drivers/tetrisp2.cpp | 32 +- src/mame/drivers/tmc1800.cpp | 96 +-- src/mame/drivers/trkfldch.cpp | 52 +- src/mame/includes/nemesis.h | 4 +- src/mame/layout/fccpu1.lay | 4 +- src/mame/machine/hpc3.cpp | 2 +- src/mame/machine/ioc2.h | 2 +- src/mame/machine/k573fpga.cpp | 804 +++++++++---------- src/mame/machine/vino.cpp | 156 ++-- src/mame/machine/vino.h | 186 ++--- src/mame/video/galaga.cpp | 48 +- src/mame/video/sknsspr.cpp | 4 +- src/mame/video/tutankhm.cpp | 4 +- 80 files changed, 1898 insertions(+), 1898 deletions(-) mode change 100755 => 100644 src/frontend/mame/luaengine.cpp diff --git a/hash/apple2_flop_clcracked.xml b/hash/apple2_flop_clcracked.xml index 3916ddbfae6..3d03b4762fc 100644 --- a/hash/apple2_flop_clcracked.xml +++ b/hash/apple2_flop_clcracked.xml @@ -1547,7 +1547,7 @@ Mindscape + a duplicate of Hugga Bunch side A. --> @@ -2458,7 +2458,7 @@ Davidson & Associates, Inc. + minor data corruption on side A, track $1C --> diff --git a/hash/ekara_japan_ac.xml b/hash/ekara_japan_ac.xml index 95ac75460be..b7eef1b532d 100644 --- a/hash/ekara_japan_ac.xml +++ b/hash/ekara_japan_ac.xml @@ -2,7 +2,7 @@ - + Sonic the Hedgehog - Pocket Adventure (World, Oct 22 1999 Prototype) diff --git a/scripts/genie.lua b/scripts/genie.lua index b20b8842a66..a4ad02a2a32 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1313,7 +1313,7 @@ configuration { "vs20*" } "_CRT_SECURE_NO_DEPRECATE", "_CRT_STDIO_LEGACY_WIDE_SPECIFIERS", } - + -- Windows Store/Phone projects already link against the available libraries. if _OPTIONS["vs"]==nil or not (string.startswith(_OPTIONS["vs"], "winstore8") or string.startswith(_OPTIONS["vs"], "winphone8")) then links { diff --git a/scripts/src/netlist.lua b/scripts/src/netlist.lua index 5397fc9eaa4..973e9fb2ffc 100644 --- a/scripts/src/netlist.lua +++ b/scripts/src/netlist.lua @@ -32,7 +32,7 @@ project "netlist" includedirs { MAME_DIR .. "src/lib", - MAME_DIR .. "src/lib/netlist", + MAME_DIR .. "src/lib/netlist", } files { @@ -48,7 +48,7 @@ project "netlist" MAME_DIR .. "src/lib/netlist/nl_parser.h", MAME_DIR .. "src/lib/netlist/nl_setup.cpp", MAME_DIR .. "src/lib/netlist/nl_setup.h", - MAME_DIR .. "src/lib/netlist/nl_types.h", + MAME_DIR .. "src/lib/netlist/nl_types.h", MAME_DIR .. "src/lib/netlist/plib/pconfig.h", MAME_DIR .. "src/lib/netlist/plib/palloc.h", MAME_DIR .. "src/lib/netlist/plib/pchrono.cpp", @@ -77,7 +77,7 @@ project "netlist" MAME_DIR .. "src/lib/netlist/plib/pstring.h", MAME_DIR .. "src/lib/netlist/plib/pstream.cpp", MAME_DIR .. "src/lib/netlist/plib/pstream.h", - MAME_DIR .. "src/lib/netlist/plib/ptime.h", + MAME_DIR .. "src/lib/netlist/plib/ptime.h", MAME_DIR .. "src/lib/netlist/plib/ptypes.h", MAME_DIR .. "src/lib/netlist/plib/putil.cpp", MAME_DIR .. "src/lib/netlist/plib/putil.h", @@ -85,9 +85,9 @@ project "netlist" MAME_DIR .. "src/lib/netlist/tools/nl_convert.h", MAME_DIR .. "src/lib/netlist/analog/nld_bjt.cpp", MAME_DIR .. "src/lib/netlist/analog/nld_bjt.h", - MAME_DIR .. "src/lib/netlist/analog/nld_generic_models.h", - MAME_DIR .. "src/lib/netlist/analog/nld_mosfet.cpp", - MAME_DIR .. "src/lib/netlist/analog/nld_mosfet.h", + MAME_DIR .. "src/lib/netlist/analog/nld_generic_models.h", + MAME_DIR .. "src/lib/netlist/analog/nld_mosfet.cpp", + MAME_DIR .. "src/lib/netlist/analog/nld_mosfet.h", MAME_DIR .. "src/lib/netlist/analog/nlid_fourterm.cpp", MAME_DIR .. "src/lib/netlist/analog/nlid_fourterm.h", MAME_DIR .. "src/lib/netlist/analog/nld_fourterm.h", diff --git a/scripts/src/tools.lua b/scripts/src/tools.lua index 564653f5a4a..aa966e7763b 100644 --- a/scripts/src/tools.lua +++ b/scripts/src/tools.lua @@ -803,15 +803,15 @@ if (_OPTIONS["osd"] == "sdl") then project("testkeys") uuid ("b3f5a5b8-3203-11e9-93e4-670b4f4e359d") kind "ConsoleApp" - + flags { "Symbols", -- always include minimum symbols for executables } - + if _OPTIONS["SEPARATE_BIN"]~="1" then targetdir(MAME_DIR) end - + links { "ocore_" .. _OPTIONS["osd"], ext_lib("utf8proc"), @@ -871,17 +871,17 @@ if (_OPTIONS["osd"] == "sdl") then } end end - + dofile("osd/sdl_cfg.lua") includedirs { MAME_DIR .. "src/osd", } - + files { MAME_DIR .. "src/tools/testkeys.cpp", } - + configuration { "mingw*" or "vs*" } targetextension ".exe" diff --git a/scripts/target/mame/nl.lua b/scripts/target/mame/nl.lua index 1ca59014a73..d944ffc78f1 100644 --- a/scripts/target/mame/nl.lua +++ b/scripts/target/mame/nl.lua @@ -194,7 +194,7 @@ files{ MAME_DIR .. "src/mame/drivers/palestra.cpp", MAME_DIR .. "src/mame/machine/nl_palestra.cpp", MAME_DIR .. "src/mame/machine/nl_palestra.h", - + MAME_DIR .. "src/mame/drivers/testpat.cpp", MAME_DIR .. "src/mame/machine/nl_tp1983.cpp", MAME_DIR .. "src/mame/machine/nl_tp1983.h", diff --git a/src/devices/bus/abcbus/ssa.cpp b/src/devices/bus/abcbus/ssa.cpp index 0b86614f5a7..27bbdc3927f 100644 --- a/src/devices/bus/abcbus/ssa.cpp +++ b/src/devices/bus/abcbus/ssa.cpp @@ -2,7 +2,7 @@ // copyright-holders:Curt Coder /********************************************************************** - Luxor ABC-80 Owoco Super Smartaid cartridge emulation + Luxor ABC-80 Owoco Super Smartaid cartridge emulation New BASIC commands: @@ -25,34 +25,34 @@ PCB Layout Super Smartaid / Super Smartaid Magnum 4 [---------------------------------------------------| -| PROM LS155 LS08 | -| | -||-----------CN1----------| LS74 HC32 | -| | -| ROM1 RAM | -| | -|LS245 LS126 LS393 LS00 BAT | -| ROM2 | -| LS260 LS74 LS32 | +| PROM LS155 LS08 | +| | +||-----------CN1----------| LS74 HC32 | +| | +| ROM1 RAM | +| | +|LS245 LS126 LS393 LS00 BAT | +| ROM2 | +| LS260 LS74 LS32 | |---------------------------------------------------| Notes: All IC's shown. - RAM - Hitachi HM6116LP-3 / Fujitsu MB8416A-15 2Kx8 SRAM + RAM - Hitachi HM6116LP-3 / Fujitsu MB8416A-15 2Kx8 SRAM ROM1 - Mitsubishi M5L2764K 8Kx8 EPROM ROM2 - SGS M2716F1 2Kx8 EPROM / NEC D27128D 16Kx8 EPROM - PROM - Signetics N82S131N 512x4 bipolar PROM + PROM - Signetics N82S131N 512x4 bipolar PROM CN1 - ABC bus connector - BAT - Varta 3/V150H 3.6V 140mAh Ni-MH battery + BAT - Varta 3/V150H 3.6V 140mAh Ni-MH battery */ /* - TODO: + TODO: - - entering a bad command locks up the system + - entering a bad command locks up the system */ diff --git a/src/devices/bus/abcbus/ssa.h b/src/devices/bus/abcbus/ssa.h index d87dea32018..86d0afa21f0 100644 --- a/src/devices/bus/abcbus/ssa.h +++ b/src/devices/bus/abcbus/ssa.h @@ -2,7 +2,7 @@ // copyright-holders:Curt Coder /********************************************************************** - Luxor ABC-80 Owoco Super Smartaid cartridge emulation + Luxor ABC-80 Owoco Super Smartaid cartridge emulation *********************************************************************/ diff --git a/src/devices/bus/bbc/rom/genie.cpp b/src/devices/bus/bbc/rom/genie.cpp index 653d874525e..28b9b42644a 100644 --- a/src/devices/bus/bbc/rom/genie.cpp +++ b/src/devices/bus/bbc/rom/genie.cpp @@ -63,12 +63,12 @@ uint8_t bbc_pmsgenie_device::read(offs_t offset) break; case 0x1f: /* &9F00-&9FFF - Bank select latch - Bit - 0-2: RAM bank select - 3: Not used - 4-5: ROM bank select - 6: Not used - 7: Read / NOT Write for internal RAM */ + Bit + 0-2: RAM bank select + 3: Not used + 4-5: ROM bank select + 6: Not used + 7: Read / NOT Write for internal RAM */ m_bank_latch = offset & 0xff; break; } diff --git a/src/devices/bus/c64/buscard.cpp b/src/devices/bus/c64/buscard.cpp index f807522c2fd..b325710a301 100644 --- a/src/devices/bus/c64/buscard.cpp +++ b/src/devices/bus/c64/buscard.cpp @@ -19,11 +19,11 @@ // MACROS/CONSTANTS //************************************************************************** -#define I8255_TAG "u2" +#define I8255_TAG "u2" #define DS75160A_TAG "u3" #define DS75161A_TAG "u4" -#define CENTRONICS_TAG "p4" -#define EXPANSION_TAG "exp" +#define CENTRONICS_TAG "p4" +#define EXPANSION_TAG "exp" @@ -142,10 +142,10 @@ WRITE8_MEMBER( buscard_t::ppi_pb_w ) PB0 BASIC ROM bank bit 0 PB1 BASIC ROM bank bit 1 - PB2 + PB2 PB3 BASIC ROM enable - PB4 - PB5 + PB4 + PB5 PB6 STROBE PB7 DIP switch select @@ -153,7 +153,7 @@ WRITE8_MEMBER( buscard_t::ppi_pb_w ) m_bank = data & 0x03; m_basic = BIT(data, 3); - + m_centronics->write_strobe(BIT(data, 6)); m_dipsw = BIT(data, 7); @@ -166,10 +166,10 @@ READ8_MEMBER( buscard_t::ppi_pc_r ) bit description PC0 BUSY - PC1 + PC1 PC2 DAV PC3 EOI - PC4 + PC4 PC5 ATN PC6 NRFD PC7 NDAC @@ -195,12 +195,12 @@ WRITE8_MEMBER( buscard_t::ppi_pc_w ) bit description - PC0 + PC0 PC1 ATN PC2 DAV PC3 EOI PC4 TE - PC5 + PC5 PC6 NRFD PC7 NDAC @@ -329,7 +329,7 @@ void buscard_t::device_start() void buscard_t::device_reset() { m_ppi->reset(); - + m_ieee2->ifc_w(0); m_ieee2->ifc_w(1); } @@ -342,7 +342,7 @@ void buscard_t::device_reset() uint8_t buscard_t::c64_cd_r(offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) { int cs = BIT(offset, 6) && BIT(offset, 7); - + if (sphi2 && !io1 && cs) { data = m_ppi->read(offset & 0x03); diff --git a/src/devices/bus/c64/buscard2.cpp b/src/devices/bus/c64/buscard2.cpp index 6b14dab78c5..38931c89e79 100644 --- a/src/devices/bus/c64/buscard2.cpp +++ b/src/devices/bus/c64/buscard2.cpp @@ -19,10 +19,10 @@ // MACROS/CONSTANTS //************************************************************************** -#define R6532_TAG "riot" -#define MC6821_TAG "pia" -#define CENTRONICS_TAG "centronics" -#define EXPANSION_TAG "exp" +#define R6532_TAG "riot" +#define MC6821_TAG "pia" +#define CENTRONICS_TAG "centronics" +#define EXPANSION_TAG "exp" diff --git a/src/devices/bus/cbmiec/c1541.cpp b/src/devices/bus/cbmiec/c1541.cpp index 5786e84c7df..04fefe3f096 100644 --- a/src/devices/bus/cbmiec/c1541.cpp +++ b/src/devices/bus/cbmiec/c1541.cpp @@ -489,8 +489,8 @@ const tiny_rom_entry *indus_gt_t::device_rom_region() const //------------------------------------------------- ROM_START( technica ) - ROM_REGION( 0x4000, M6502_TAG, 0 ) // data lines should be scrambled - ROM_LOAD( "technica dos plus.bin", 0x0000, 0x4000, BAD_DUMP CRC(6a1ef3ff) SHA1(1aaa52ed4a3f120ec8664bcefec890c7f9aaecf2) ) + ROM_REGION( 0x4000, M6502_TAG, 0 ) // data lines should be scrambled + ROM_LOAD( "technica dos plus.bin", 0x0000, 0x4000, BAD_DUMP CRC(6a1ef3ff) SHA1(1aaa52ed4a3f120ec8664bcefec890c7f9aaecf2) ) ROM_END @@ -500,7 +500,7 @@ ROM_END const tiny_rom_entry *technica_t::device_rom_region() const { - return ROM_NAME( technica ); + return ROM_NAME( technica ); } @@ -509,11 +509,11 @@ const tiny_rom_entry *technica_t::device_rom_region() const //------------------------------------------------- ROM_START( bluechip ) - ROM_REGION( 0x4000, M6502_TAG, 0 ) - ROM_SYSTEM_BIOS( 0, "1", "1" ) - ROMX_LOAD( "bluechip_fd_stockrom.bin", 0x0000, 0x4000, CRC(d4293619) SHA1(18b3dc4c2f919ac8f288d0199e29993a0b53a9bd), ROM_BIOS(0) ) - ROM_SYSTEM_BIOS( 1, "2", "2" ) - ROMX_LOAD( "amtech_bluechip_rom.bin", 0x0000, 0x4000, CRC(3733ccea) SHA1(c11317cb9370e722950579a610a3effda313aeee), ROM_BIOS(1) ) + ROM_REGION( 0x4000, M6502_TAG, 0 ) + ROM_SYSTEM_BIOS( 0, "1", "1" ) + ROMX_LOAD( "bluechip_fd_stockrom.bin", 0x0000, 0x4000, CRC(d4293619) SHA1(18b3dc4c2f919ac8f288d0199e29993a0b53a9bd), ROM_BIOS(0) ) + ROM_SYSTEM_BIOS( 1, "2", "2" ) + ROMX_LOAD( "amtech_bluechip_rom.bin", 0x0000, 0x4000, CRC(3733ccea) SHA1(c11317cb9370e722950579a610a3effda313aeee), ROM_BIOS(1) ) ROM_END @@ -523,7 +523,7 @@ ROM_END const tiny_rom_entry *blue_chip_t::device_rom_region() const { - return ROM_NAME( bluechip ); + return ROM_NAME( bluechip ); } @@ -532,9 +532,9 @@ const tiny_rom_entry *blue_chip_t::device_rom_region() const //------------------------------------------------- ROM_START( cmdrc2 ) - ROM_REGION( 0x4000, M6502_TAG, 0 ) - ROM_LOAD( "commander_c-ii_8k_rom1.bin", 0x0000, 0x2000, CRC(cb19daf3) SHA1(9fab414451af54d0bed9d4c9fd5fab1b8720c269) ) - ROM_LOAD( "commander_c-ii_8k_rom2.bin", 0x2000, 0x2000, CRC(ed85a390) SHA1(eecf92fb8cc20a6c86e30f897d09d427509dd3d3) ) + ROM_REGION( 0x4000, M6502_TAG, 0 ) + ROM_LOAD( "commander_c-ii_8k_rom1.bin", 0x0000, 0x2000, CRC(cb19daf3) SHA1(9fab414451af54d0bed9d4c9fd5fab1b8720c269) ) + ROM_LOAD( "commander_c-ii_8k_rom2.bin", 0x2000, 0x2000, CRC(ed85a390) SHA1(eecf92fb8cc20a6c86e30f897d09d427509dd3d3) ) ROM_END @@ -544,7 +544,7 @@ ROM_END const tiny_rom_entry *commander_c2_t::device_rom_region() const { - return ROM_NAME( cmdrc2 ); + return ROM_NAME( cmdrc2 ); } @@ -553,8 +553,8 @@ const tiny_rom_entry *commander_c2_t::device_rom_region() const //------------------------------------------------- ROM_START( enh2000 ) - ROM_REGION( 0x4000, M6502_TAG, 0 ) - ROM_LOAD( "enhancer 2000 comtel 2.6.bin", 0x0000, 0x4000, CRC(20353d3b) SHA1(473dd2e06037799e6f562c443165d9b2b9f4a368) ) + ROM_REGION( 0x4000, M6502_TAG, 0 ) + ROM_LOAD( "enhancer 2000 comtel 2.6.bin", 0x0000, 0x4000, CRC(20353d3b) SHA1(473dd2e06037799e6f562c443165d9b2b9f4a368) ) ROM_END @@ -564,7 +564,7 @@ ROM_END const tiny_rom_entry *enhancer_2000_t::device_rom_region() const { - return ROM_NAME( enh2000 ); + return ROM_NAME( enh2000 ); } @@ -573,8 +573,8 @@ const tiny_rom_entry *enhancer_2000_t::device_rom_region() const //------------------------------------------------- ROM_START( fd148 ) - ROM_REGION( 0x4000, M6502_TAG, 0 ) - ROM_LOAD( "rapid access fd148.bin", 0x0000, 0x4000, CRC(3733ccea) SHA1(c11317cb9370e722950579a610a3effda313aeee) ) + ROM_REGION( 0x4000, M6502_TAG, 0 ) + ROM_LOAD( "rapid access fd148.bin", 0x0000, 0x4000, CRC(3733ccea) SHA1(c11317cb9370e722950579a610a3effda313aeee) ) ROM_END @@ -584,7 +584,7 @@ ROM_END const tiny_rom_entry *fd148_t::device_rom_region() const { - return ROM_NAME( fd148 ); + return ROM_NAME( fd148 ); } @@ -593,9 +593,9 @@ const tiny_rom_entry *fd148_t::device_rom_region() const //------------------------------------------------- ROM_START( msdsd1 ) - ROM_REGION( 0x4000, M6502_TAG, 0 ) - ROM_LOAD( "sd-1-1.3-c000.bin", 0x0000, 0x2000, CRC(f399778d) SHA1(c0d939c354d84018038c60a231fc43fb9279d8a4) ) - ROM_LOAD( "sd-1-1.3-e000.bin", 0x2000, 0x2000, CRC(7ac80da4) SHA1(99dd15c6d97938eba73880b18986a037e90742ab) ) + ROM_REGION( 0x4000, M6502_TAG, 0 ) + ROM_LOAD( "sd-1-1.3-c000.bin", 0x0000, 0x2000, CRC(f399778d) SHA1(c0d939c354d84018038c60a231fc43fb9279d8a4) ) + ROM_LOAD( "sd-1-1.3-e000.bin", 0x2000, 0x2000, CRC(7ac80da4) SHA1(99dd15c6d97938eba73880b18986a037e90742ab) ) ROM_END @@ -605,7 +605,7 @@ ROM_END const tiny_rom_entry *msd_sd1_t::device_rom_region() const { - return ROM_NAME( msdsd1 ); + return ROM_NAME( msdsd1 ); } @@ -614,9 +614,9 @@ const tiny_rom_entry *msd_sd1_t::device_rom_region() const //------------------------------------------------- ROM_START( msdsd2 ) - ROM_REGION( 0x4000, M6502_TAG, 0 ) - ROM_LOAD( "sd-2-2.3-c000.bin", 0x0000, 0x2000, CRC(2207560e) SHA1(471e9b4a4ac09ceee9acc1774534510396f98b9a) ) - ROM_LOAD( "sd-2-2.3-e000.bin", 0x2000, 0x2000, CRC(4efd87a2) SHA1(4beec0b7ce2349add3b0a5bceee60826637df8d9) ) + ROM_REGION( 0x4000, M6502_TAG, 0 ) + ROM_LOAD( "sd-2-2.3-c000.bin", 0x0000, 0x2000, CRC(2207560e) SHA1(471e9b4a4ac09ceee9acc1774534510396f98b9a) ) + ROM_LOAD( "sd-2-2.3-e000.bin", 0x2000, 0x2000, CRC(4efd87a2) SHA1(4beec0b7ce2349add3b0a5bceee60826637df8d9) ) ROM_END @@ -626,7 +626,7 @@ ROM_END const tiny_rom_entry *msd_sd2_t::device_rom_region() const { - return ROM_NAME( msdsd2 ); + return ROM_NAME( msdsd2 ); } @@ -1207,7 +1207,7 @@ indus_gt_t::indus_gt_t(const machine_config &mconfig, const char *tag, device_t //------------------------------------------------- technica_t::technica_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : c1541_base_t(mconfig, TECHNICA, tag, owner, clock) { } + : c1541_base_t(mconfig, TECHNICA, tag, owner, clock) { } //------------------------------------------------- @@ -1215,7 +1215,7 @@ technica_t::technica_t(const machine_config &mconfig, const char *tag, device_t //------------------------------------------------- blue_chip_t::blue_chip_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : c1541_base_t(mconfig, BLUE_CHIP, tag, owner, clock) { } + : c1541_base_t(mconfig, BLUE_CHIP, tag, owner, clock) { } //------------------------------------------------- @@ -1223,7 +1223,7 @@ blue_chip_t::blue_chip_t(const machine_config &mconfig, const char *tag, device_ //------------------------------------------------- commander_c2_t::commander_c2_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : c1541_base_t(mconfig, COMMANDER_C2, tag, owner, clock) { } + : c1541_base_t(mconfig, COMMANDER_C2, tag, owner, clock) { } //------------------------------------------------- @@ -1231,7 +1231,7 @@ commander_c2_t::commander_c2_t(const machine_config &mconfig, const char *tag, d //------------------------------------------------- enhancer_2000_t::enhancer_2000_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : c1541_base_t(mconfig, ENHANCER_2000, tag, owner, clock) { } + : c1541_base_t(mconfig, ENHANCER_2000, tag, owner, clock) { } //------------------------------------------------- @@ -1239,7 +1239,7 @@ enhancer_2000_t::enhancer_2000_t(const machine_config &mconfig, const char *tag, //------------------------------------------------- fd148_t::fd148_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : c1541_base_t(mconfig, FD148, tag, owner, clock) { } + : c1541_base_t(mconfig, FD148, tag, owner, clock) { } //------------------------------------------------- @@ -1247,7 +1247,7 @@ fd148_t::fd148_t(const machine_config &mconfig, const char *tag, device_t *owner //------------------------------------------------- msd_sd1_t::msd_sd1_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : c1541_base_t(mconfig, MSD_SD1, tag, owner, clock) { } + : c1541_base_t(mconfig, MSD_SD1, tag, owner, clock) { } //------------------------------------------------- @@ -1255,7 +1255,7 @@ msd_sd1_t::msd_sd1_t(const machine_config &mconfig, const char *tag, device_t *o //------------------------------------------------- msd_sd2_t::msd_sd2_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : c1541_base_t(mconfig, MSD_SD2, tag, owner, clock) { } + : c1541_base_t(mconfig, MSD_SD2, tag, owner, clock) { } //------------------------------------------------- diff --git a/src/devices/bus/cbmiec/interpod.cpp b/src/devices/bus/cbmiec/interpod.cpp index d31b47e406c..ad2c7388476 100644 --- a/src/devices/bus/cbmiec/interpod.cpp +++ b/src/devices/bus/cbmiec/interpod.cpp @@ -70,7 +70,7 @@ Notes: #define R6532_TAG "u3" #define R6522_TAG "u4" #define MC6850_TAG "u5" -#define RS232_TAG "rs232" +#define RS232_TAG "rs232" //************************************************************************** @@ -135,7 +135,7 @@ void interpod_t::device_add_mconfig(machine_config &config) VIA6522(config, m_via, 1000000); MOS6532_NEW(config, m_riot, 1000000); - + ACIA6850(config, m_acia, 0); ieee488_device::add_cbm_devices(config, nullptr); diff --git a/src/devices/bus/cbmiec/interpod.h b/src/devices/bus/cbmiec/interpod.h index bad1a0af660..60f0d728bf9 100644 --- a/src/devices/bus/cbmiec/interpod.h +++ b/src/devices/bus/cbmiec/interpod.h @@ -27,7 +27,7 @@ // ======================> interpod_t -class interpod_t : public device_t, +class interpod_t : public device_t, public device_cbm_iec_interface { public: diff --git a/src/devices/bus/coco/dragon_sprites.cpp b/src/devices/bus/coco/dragon_sprites.cpp index c1f300b8259..b9021e5cdf9 100644 --- a/src/devices/bus/coco/dragon_sprites.cpp +++ b/src/devices/bus/coco/dragon_sprites.cpp @@ -115,4 +115,4 @@ WRITE_LINE_MEMBER(dragon_sprites_device::nmi_w) { // set the NMI line set_line_value(line::NMI, state); -} \ No newline at end of file +} diff --git a/src/devices/bus/gio/newport.cpp b/src/devices/bus/gio/newport.cpp index 970adf4b7e3..9c05b16da79 100644 --- a/src/devices/bus/gio/newport.cpp +++ b/src/devices/bus/gio/newport.cpp @@ -393,94 +393,94 @@ uint32_t newport_base_device::screen_update(screen_device &device, bitmap_rgb32 pixel_replaced = true; } else if (aux_pix_mode != 0) - { - if (BIT(m_xmap0.m_config, 2)) - { - switch (aux_pix_mode) - { - case 1: // 2-Bit Underlay - *dest++ = m_cmap0.m_palette[aux_msb | ((*src_olay >> 8) & 3)]; - pixel_replaced = true; - continue; - case 2: // 2-Bit Overlay - { - const uint32_t pix_in = (*src_olay >> 8) & 3; - if (pix_in) - { - *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; - pixel_replaced = true; + { + if (BIT(m_xmap0.m_config, 2)) + { + switch (aux_pix_mode) + { + case 1: // 2-Bit Underlay + *dest++ = m_cmap0.m_palette[aux_msb | ((*src_olay >> 8) & 3)]; + pixel_replaced = true; + continue; + case 2: // 2-Bit Overlay + { + const uint32_t pix_in = (*src_olay >> 8) & 3; + if (pix_in) + { + *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; + pixel_replaced = true; } - break; + break; } - case 6: // 1-Bit Overlay - { + case 6: // 1-Bit Overlay + { const uint32_t shift = BIT(table_entry, 1) ? 9 : 8; - const uint32_t pix_in = (*src_olay >> shift) & 1; - if (pix_in) - { - *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; - pixel_replaced = true; + const uint32_t pix_in = (*src_olay >> shift) & 1; + if (pix_in) + { + *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; + pixel_replaced = true; } - break; + break; } - case 7: // 1-Bit Overlay, 1-Bit Underlay - { - const uint32_t pix_in = (*src_olay >> 8) & 1; - if (pix_in) - *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; + case 7: // 1-Bit Overlay, 1-Bit Underlay + { + const uint32_t pix_in = (*src_olay >> 8) & 1; + if (pix_in) + *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; else - *dest++ = m_cmap0.m_palette[aux_msb | ((*src_olay >> 9) & 1)]; - pixel_replaced = true; - break; + *dest++ = m_cmap0.m_palette[aux_msb | ((*src_olay >> 9) & 1)]; + pixel_replaced = true; + break; } - default: - break; - } - } - else - { - switch (aux_pix_mode) - { - case 1: // 8-Bit Underlay - *dest++ = m_cmap0.m_palette[aux_msb | ((*src_olay >> 8) & 0xff)]; - pixel_replaced = true; - break; - case 2: // 8-Bit Overlay - { - const uint32_t pix_in = (*src_olay >> 8) & 0xff; - if (pix_in) - { - *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; - pixel_replaced = true; + default: + break; + } + } + else + { + switch (aux_pix_mode) + { + case 1: // 8-Bit Underlay + *dest++ = m_cmap0.m_palette[aux_msb | ((*src_olay >> 8) & 0xff)]; + pixel_replaced = true; + break; + case 2: // 8-Bit Overlay + { + const uint32_t pix_in = (*src_olay >> 8) & 0xff; + if (pix_in) + { + *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; + pixel_replaced = true; } - break; + break; } - case 6: // 4-Bit Overlay - { + case 6: // 4-Bit Overlay + { const uint32_t shift = BIT(table_entry, 1) ? 12 : 8; - const uint32_t pix_in = (*src_olay >> shift) & 0xf; - if (pix_in) - { - *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; - pixel_replaced = true; + const uint32_t pix_in = (*src_olay >> shift) & 0xf; + if (pix_in) + { + *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; + pixel_replaced = true; } - break; + break; } - case 7: // 4-Bit Overlay, 4-Bit Underlay - { - const uint32_t pix_in = (*src_pup >> 8) & 0xf; - if (pix_in) - *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; + case 7: // 4-Bit Overlay, 4-Bit Underlay + { + const uint32_t pix_in = (*src_pup >> 8) & 0xf; + if (pix_in) + *dest++ = m_cmap0.m_palette[aux_msb | pix_in]; else - *dest++ = m_cmap0.m_palette[aux_msb | ((*src_pup >> 12) & 0xf)]; - pixel_replaced = true; - break; + *dest++ = m_cmap0.m_palette[aux_msb | ((*src_pup >> 12) & 0xf)]; + pixel_replaced = true; + break; } - default: - break; - } - } - } + default: + break; + } + } + } if (!pixel_replaced) { @@ -576,122 +576,122 @@ uint32_t newport_base_device::screen_update(screen_device &device, bitmap_rgb32 uint32_t newport_base_device::convert_4bpp_bgr_to_8bpp(uint8_t pix_in) { - const uint8_t r = 0xff * BIT(pix_in, 0); - const uint8_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1)); - const uint8_t b = 0xff * BIT(pix_in, 3); - return (b & 0xc0) | ((g & 0xe0) >> 2) | ((r & 0xe0) >> 5); + const uint8_t r = 0xff * BIT(pix_in, 0); + const uint8_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1)); + const uint8_t b = 0xff * BIT(pix_in, 3); + return (b & 0xc0) | ((g & 0xe0) >> 2) | ((r & 0xe0) >> 5); } uint32_t newport_base_device::convert_4bpp_bgr_to_12bpp(uint8_t pix_in) { - const uint32_t r = 0xff * BIT(pix_in, 0); - const uint32_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1)); - const uint32_t b = 0xff * BIT(pix_in, 3); - return ((b & 0xf0) << 4) | (g & 0xf0) | ((r & 0xf0) >> 4); + const uint32_t r = 0xff * BIT(pix_in, 0); + const uint32_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1)); + const uint32_t b = 0xff * BIT(pix_in, 3); + return ((b & 0xf0) << 4) | (g & 0xf0) | ((r & 0xf0) >> 4); } uint32_t newport_base_device::convert_4bpp_bgr_to_24bpp(uint8_t pix_in) { - const uint8_t r = 0xff * BIT(pix_in, 0); - const uint8_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1)); - const uint8_t b = 0xff * BIT(pix_in, 3); - return (b << 16) | (g << 8) | r; + const uint8_t r = 0xff * BIT(pix_in, 0); + const uint8_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1)); + const uint8_t b = 0xff * BIT(pix_in, 3); + return (b << 16) | (g << 8) | r; } uint32_t newport_base_device::convert_8bpp_bgr_to_4bpp(uint8_t pix_in) { - const uint8_t r = (0x92 * BIT(pix_in, 2)) | (0x49 * BIT(pix_in, 1)) | (0x24 * BIT(pix_in, 0)); - const uint8_t g = (0x92 * BIT(pix_in, 5)) | (0x49 * BIT(pix_in, 4)) | (0x24 * BIT(pix_in, 3)); - const uint8_t b = (0xaa * BIT(pix_in, 7)) | (0x55 * BIT(pix_in, 6)); - return (BIT(b, 7) << 3) | ((g & 0xc0) >> 5) | BIT(r, 7); + const uint8_t r = (0x92 * BIT(pix_in, 2)) | (0x49 * BIT(pix_in, 1)) | (0x24 * BIT(pix_in, 0)); + const uint8_t g = (0x92 * BIT(pix_in, 5)) | (0x49 * BIT(pix_in, 4)) | (0x24 * BIT(pix_in, 3)); + const uint8_t b = (0xaa * BIT(pix_in, 7)) | (0x55 * BIT(pix_in, 6)); + return (BIT(b, 7) << 3) | ((g & 0xc0) >> 5) | BIT(r, 7); } uint32_t newport_base_device::convert_8bpp_bgr_to_12bpp(uint8_t pix_in) { - const uint8_t r = (0x92 * BIT(pix_in, 2)) | (0x49 * BIT(pix_in, 1)) | (0x24 * BIT(pix_in, 0)); - const uint8_t g = (0x92 * BIT(pix_in, 5)) | (0x49 * BIT(pix_in, 4)) | (0x24 * BIT(pix_in, 3)); - const uint8_t b = (0xaa * BIT(pix_in, 7)) | (0x55 * BIT(pix_in, 6)); - return ((b & 0xf0) << 4) | (g & 0xf0) | ((r & 0xf0) >> 4); + const uint8_t r = (0x92 * BIT(pix_in, 2)) | (0x49 * BIT(pix_in, 1)) | (0x24 * BIT(pix_in, 0)); + const uint8_t g = (0x92 * BIT(pix_in, 5)) | (0x49 * BIT(pix_in, 4)) | (0x24 * BIT(pix_in, 3)); + const uint8_t b = (0xaa * BIT(pix_in, 7)) | (0x55 * BIT(pix_in, 6)); + return ((b & 0xf0) << 4) | (g & 0xf0) | ((r & 0xf0) >> 4); } uint32_t newport_base_device::convert_8bpp_bgr_to_24bpp(uint8_t pix_in) { - const uint8_t r = (0x92 * BIT(pix_in, 2)) | (0x49 * BIT(pix_in, 1)) | (0x24 * BIT(pix_in, 0)); - const uint8_t g = (0x92 * BIT(pix_in, 5)) | (0x49 * BIT(pix_in, 4)) | (0x24 * BIT(pix_in, 3)); - const uint8_t b = (0xaa * BIT(pix_in, 7)) | (0x55 * BIT(pix_in, 6)); - return (b << 16) | (g << 8) | r; + const uint8_t r = (0x92 * BIT(pix_in, 2)) | (0x49 * BIT(pix_in, 1)) | (0x24 * BIT(pix_in, 0)); + const uint8_t g = (0x92 * BIT(pix_in, 5)) | (0x49 * BIT(pix_in, 4)) | (0x24 * BIT(pix_in, 3)); + const uint8_t b = (0xaa * BIT(pix_in, 7)) | (0x55 * BIT(pix_in, 6)); + return (b << 16) | (g << 8) | r; } uint32_t newport_base_device::convert_12bpp_bgr_to_4bpp(uint16_t pix_in) { - const uint8_t r = 0x11 * ((pix_in >> 0) & 0xf); - const uint8_t g = 0x11 * ((pix_in >> 4) & 0xf); - const uint8_t b = 0x11 * ((pix_in >> 8) & 0xf); - return (BIT(b, 7) << 3) | ((g & 0xc0) >> 5) | BIT(r, 7); + const uint8_t r = 0x11 * ((pix_in >> 0) & 0xf); + const uint8_t g = 0x11 * ((pix_in >> 4) & 0xf); + const uint8_t b = 0x11 * ((pix_in >> 8) & 0xf); + return (BIT(b, 7) << 3) | ((g & 0xc0) >> 5) | BIT(r, 7); } uint32_t newport_base_device::convert_12bpp_bgr_to_8bpp(uint16_t pix_in) { - const uint8_t r = 0x11 * ((pix_in >> 0) & 0xf); - const uint8_t g = 0x11 * ((pix_in >> 4) & 0xf); - const uint8_t b = 0x11 * ((pix_in >> 8) & 0xf); - return (b & 0xc0) | ((g & 0xe0) >> 2) | ((r & 0xe0) >> 5); + const uint8_t r = 0x11 * ((pix_in >> 0) & 0xf); + const uint8_t g = 0x11 * ((pix_in >> 4) & 0xf); + const uint8_t b = 0x11 * ((pix_in >> 8) & 0xf); + return (b & 0xc0) | ((g & 0xe0) >> 2) | ((r & 0xe0) >> 5); } uint32_t newport_base_device::convert_12bpp_bgr_to_24bpp(uint16_t pix_in) { - const uint8_t r = 0x11 * ((pix_in >> 0) & 0xf); - const uint8_t g = 0x11 * ((pix_in >> 4) & 0xf); - const uint8_t b = 0x11 * ((pix_in >> 8) & 0xf); - return (b << 16) | (g << 8) | r; + const uint8_t r = 0x11 * ((pix_in >> 0) & 0xf); + const uint8_t g = 0x11 * ((pix_in >> 4) & 0xf); + const uint8_t b = 0x11 * ((pix_in >> 8) & 0xf); + return (b << 16) | (g << 8) | r; } uint32_t newport_base_device::convert_24bpp_bgr_to_4bpp(uint32_t pix_in) { - const uint8_t r = (uint8_t)(pix_in >> 0); - const uint8_t g = (uint8_t)(pix_in >> 8); - const uint8_t b = (uint8_t)(pix_in >> 16); - return (BIT(b, 7) << 3) | ((g & 0xc0) >> 5) | BIT(r, 7); + const uint8_t r = (uint8_t)(pix_in >> 0); + const uint8_t g = (uint8_t)(pix_in >> 8); + const uint8_t b = (uint8_t)(pix_in >> 16); + return (BIT(b, 7) << 3) | ((g & 0xc0) >> 5) | BIT(r, 7); } uint32_t newport_base_device::convert_24bpp_bgr_to_8bpp(uint32_t pix_in) { - const uint8_t r = (uint8_t)(pix_in >> 0); - const uint8_t g = (uint8_t)(pix_in >> 8); - const uint8_t b = (uint8_t)(pix_in >> 16); - return (b & 0xc0) | ((g & 0xe0) >> 2) | ((r & 0xe0) >> 5); + const uint8_t r = (uint8_t)(pix_in >> 0); + const uint8_t g = (uint8_t)(pix_in >> 8); + const uint8_t b = (uint8_t)(pix_in >> 16); + return (b & 0xc0) | ((g & 0xe0) >> 2) | ((r & 0xe0) >> 5); } uint32_t newport_base_device::convert_24bpp_bgr_to_12bpp(uint32_t pix_in) { - const uint8_t r = (uint8_t)(pix_in >> 0); - const uint8_t g = (uint8_t)(pix_in >> 8); - const uint8_t b = (uint8_t)(pix_in >> 16); - return ((b & 0xf0) << 4) | (g & 0xf0) | ((r & 0xf0) >> 4); + const uint8_t r = (uint8_t)(pix_in >> 0); + const uint8_t g = (uint8_t)(pix_in >> 8); + const uint8_t b = (uint8_t)(pix_in >> 16); + return ((b & 0xf0) << 4) | (g & 0xf0) | ((r & 0xf0) >> 4); } uint32_t newport_base_device::convert_4bpp_bgr_to_24bpp_rgb(uint8_t pix_in) { - const uint8_t r = 0xff * BIT(pix_in, 0); - const uint8_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1)); - const uint8_t b = 0xff * BIT(pix_in, 3); - return (r << 16) | (g << 8) | b; + const uint8_t r = 0xff * BIT(pix_in, 0); + const uint8_t g = (0xaa * BIT(pix_in, 2)) | (0x55 * BIT(pix_in, 1)); + const uint8_t b = 0xff * BIT(pix_in, 3); + return (r << 16) | (g << 8) | b; } uint32_t newport_base_device::convert_8bpp_bgr_to_24bpp_rgb(uint8_t pix_in) { - const uint8_t r = (0x92 * BIT(pix_in, 2)) | (0x49 * BIT(pix_in, 1)) | (0x24 * BIT(pix_in, 0)); - const uint8_t g = (0x92 * BIT(pix_in, 5)) | (0x49 * BIT(pix_in, 4)) | (0x24 * BIT(pix_in, 3)); - const uint8_t b = (0xaa * BIT(pix_in, 7)) | (0x55 * BIT(pix_in, 6)); - return (r << 16) | (g << 8) | b; + const uint8_t r = (0x92 * BIT(pix_in, 2)) | (0x49 * BIT(pix_in, 1)) | (0x24 * BIT(pix_in, 0)); + const uint8_t g = (0x92 * BIT(pix_in, 5)) | (0x49 * BIT(pix_in, 4)) | (0x24 * BIT(pix_in, 3)); + const uint8_t b = (0xaa * BIT(pix_in, 7)) | (0x55 * BIT(pix_in, 6)); + return (r << 16) | (g << 8) | b; } uint32_t newport_base_device::convert_12bpp_bgr_to_24bpp_rgb(uint16_t pix_in) { - const uint8_t r = 0x11 * ((pix_in >> 0) & 0xf); - const uint8_t g = 0x11 * ((pix_in >> 4) & 0xf); - const uint8_t b = 0x11 * ((pix_in >> 8) & 0xf); - return (r << 16) | (g << 8) | b; + const uint8_t r = 0x11 * ((pix_in >> 0) & 0xf); + const uint8_t g = 0x11 * ((pix_in >> 4) & 0xf); + const uint8_t b = 0x11 * ((pix_in >> 8) & 0xf); + return (r << 16) | (g << 8) | b; } void newport_base_device::cmap0_write(uint32_t data) @@ -1748,47 +1748,47 @@ READ64_MEMBER(newport_base_device::rex3_r) uint32_t newport_base_device::get_host_color() { - static const uint32_t s_color_masks[4] = { 0xf, 0xff, 0xfff, 0xffffff }; - const uint32_t color = (uint32_t)(m_rex3.m_host_dataport >> m_rex3.m_host_shift) & s_color_masks[m_rex3.m_hostdepth]; - if (m_rex3.m_rwpacked) - { - if ((m_rex3.m_rwdouble && m_rex3.m_host_shift > 0) || m_rex3.m_host_shift > 32) - m_rex3.m_host_shift -= s_host_shifts[m_rex3.m_hostdepth]; - else - m_rex3.m_host_shift = 64 - s_host_shifts[m_rex3.m_hostdepth]; + static const uint32_t s_color_masks[4] = { 0xf, 0xff, 0xfff, 0xffffff }; + const uint32_t color = (uint32_t)(m_rex3.m_host_dataport >> m_rex3.m_host_shift) & s_color_masks[m_rex3.m_hostdepth]; + if (m_rex3.m_rwpacked) + { + if ((m_rex3.m_rwdouble && m_rex3.m_host_shift > 0) || m_rex3.m_host_shift > 32) + m_rex3.m_host_shift -= s_host_shifts[m_rex3.m_hostdepth]; + else + m_rex3.m_host_shift = 64 - s_host_shifts[m_rex3.m_hostdepth]; } uint8_t convert_index = (m_rex3.m_hostdepth << 2) | m_rex3.m_plane_depth; - switch (convert_index & 15) - { + switch (convert_index & 15) + { default: // No conversion needed return color; - case 1: // 4bpp -> 8bpp + case 1: // 4bpp -> 8bpp return convert_4bpp_bgr_to_8bpp((uint8_t)color); - case 2: // 4bpp -> 12bpp + case 2: // 4bpp -> 12bpp return convert_4bpp_bgr_to_12bpp((uint8_t)color); - case 3: // 4bpp -> 24bpp + case 3: // 4bpp -> 24bpp return convert_4bpp_bgr_to_24bpp((uint8_t)color); - case 4: // 8bpp -> 4bpp + case 4: // 8bpp -> 4bpp return convert_8bpp_bgr_to_4bpp((uint8_t)color); - case 6: // 8bpp -> 12bpp + case 6: // 8bpp -> 12bpp return convert_8bpp_bgr_to_12bpp((uint8_t)color); - case 7: // 8bpp -> 24bpp + case 7: // 8bpp -> 24bpp return convert_8bpp_bgr_to_24bpp((uint8_t)color); - case 8: // 12bpp -> 4bpp + case 8: // 12bpp -> 4bpp return convert_12bpp_bgr_to_4bpp((uint16_t)color); - case 9: // 12bpp -> 8bpp + case 9: // 12bpp -> 8bpp return convert_12bpp_bgr_to_8bpp((uint16_t)color); - case 11: // 12bpp -> 24bpp + case 11: // 12bpp -> 24bpp return convert_12bpp_bgr_to_24bpp((uint16_t)color); - case 12: // 32bpp -> 4bpp + case 12: // 32bpp -> 4bpp return convert_24bpp_bgr_to_4bpp(color); - case 13: // 32bpp -> 8bpp + case 13: // 32bpp -> 8bpp return convert_24bpp_bgr_to_8bpp(color); - case 14: // 32bpp -> 12bpp + case 14: // 32bpp -> 12bpp return convert_24bpp_bgr_to_12bpp(color); } - return color; + return color; } void newport_base_device::write_pixel(uint32_t color) @@ -2058,22 +2058,22 @@ void newport_base_device::logic_pixel(uint32_t *dest_buf, uint32_t src) switch (m_rex3.m_logicop) { - case 0: store_pixel(dest_buf, 0x000000); break; - case 1: store_pixel(dest_buf, src & dst); break; - case 2: store_pixel(dest_buf, src & ~dst); break; - case 3: store_pixel(dest_buf, src); break; - case 4: store_pixel(dest_buf, ~src & dst); break; - case 5: store_pixel(dest_buf, dst); break; - case 6: store_pixel(dest_buf, src ^ dst); break; - case 7: store_pixel(dest_buf, src | dst); break; - case 8: store_pixel(dest_buf, ~(src | dst)); break; - case 9: store_pixel(dest_buf, ~(src ^ dst)); break; - case 10: store_pixel(dest_buf, ~dst); break; - case 11: store_pixel(dest_buf, src | ~dst); break; - case 12: store_pixel(dest_buf, ~src); break; - case 13: store_pixel(dest_buf, ~src | dst); break; - case 14: store_pixel(dest_buf, ~(src & dst)); break; - case 15: store_pixel(dest_buf, 0xffffff); break; + case 0: store_pixel(dest_buf, 0x000000); break; + case 1: store_pixel(dest_buf, src & dst); break; + case 2: store_pixel(dest_buf, src & ~dst); break; + case 3: store_pixel(dest_buf, src); break; + case 4: store_pixel(dest_buf, ~src & dst); break; + case 5: store_pixel(dest_buf, dst); break; + case 6: store_pixel(dest_buf, src ^ dst); break; + case 7: store_pixel(dest_buf, src | dst); break; + case 8: store_pixel(dest_buf, ~(src | dst)); break; + case 9: store_pixel(dest_buf, ~(src ^ dst)); break; + case 10: store_pixel(dest_buf, ~dst); break; + case 11: store_pixel(dest_buf, src | ~dst); break; + case 12: store_pixel(dest_buf, ~src); break; + case 13: store_pixel(dest_buf, ~src | dst); break; + case 14: store_pixel(dest_buf, ~(src & dst)); break; + case 15: store_pixel(dest_buf, 0xffffff); break; } } @@ -2184,23 +2184,23 @@ uint32_t newport_base_device::get_rgb_color(int16_t x, int16_t y) case 2: // 12bpp { - const uint32_t sr = red - (red >> 4); - const uint32_t sg = green - (green >> 4); - const uint32_t sb = blue - (blue >> 4); + const uint32_t sr = red - (red >> 4); + const uint32_t sg = green - (green >> 4); + const uint32_t sb = blue - (blue >> 4); - uint32_t dr = (sr >> 4) & 15; - uint32_t dg = (sg >> 4) & 15; - uint32_t db = (sb >> 4) & 15; + uint32_t dr = (sr >> 4) & 15; + uint32_t dg = (sg >> 4) & 15; + uint32_t db = (sb >> 4) & 15; - if ((sr & 0xf) > s_bayer[x & 3][y & 3]) dr++; - if ((sg & 0xf) > s_bayer[x & 3][y & 3]) dg++; - if ((sb & 0xf) > s_bayer[x & 3][y & 3]) db++; + if ((sr & 0xf) > s_bayer[x & 3][y & 3]) dr++; + if ((sg & 0xf) > s_bayer[x & 3][y & 3]) dg++; + if ((sb & 0xf) > s_bayer[x & 3][y & 3]) db++; - if (dr > 15) dr = 15; - if (dg > 15) dg = 15; - if (db > 15) db = 15; + if (dr > 15) dr = 15; + if (dg > 15) dg = 15; + if (db > 15) db = 15; - return (db << 8) | (dg << 4) | dr; + return (db << 8) | (dg << 4) | dr; } case 3: // 24bpp @@ -2230,335 +2230,335 @@ uint32_t newport_base_device::get_rgb_color(int16_t x, int16_t y) uint8_t newport_base_device::get_octant(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t dx, int16_t dy) { - if (x1 < x2) - { - if (y2 < y1) - return (dx > dy) ? 0 : 1; - else - return (dx > dy) ? 7 : 6; - } - else - { - if (y2 < y1) - return (dx > dy) ? 3 : 2; - else - return (dx > dy) ? 4 : 5; - } + if (x1 < x2) + { + if (y2 < y1) + return (dx > dy) ? 0 : 1; + else + return (dx > dy) ? 7 : 6; + } + else + { + if (y2 < y1) + return (dx > dy) ? 3 : 2; + else + return (dx > dy) ? 4 : 5; + } } void newport_base_device::do_fline(uint32_t color) { - const int32_t x1 = m_rex3.m_x_start >> 7; - const int32_t y1 = m_rex3.m_y_start >> 7; - const int32_t x2 = m_rex3.m_x_end >> 7; - const int32_t y2 = m_rex3.m_y_end >> 7; - - const int16_t x10 = x1 & ~0xf; - const int16_t y10 = y1 & ~0xf; - const int16_t x20 = x2 & ~0xf; - const int16_t y20 = y2 & ~0xf; - - const bool iterate_one = (m_rex3.m_draw_mode0 & 0x300) == 0; - const bool skip_first = BIT(m_rex3.m_draw_mode0, 10); - const bool skip_last = BIT(m_rex3.m_draw_mode0, 11); - const bool shade = BIT(m_rex3.m_draw_mode0, 18); - const bool rgbmode = BIT(m_rex3.m_draw_mode1, 15); - - int16_t x = x10; - int16_t y = y10; - - int16_t x1_fract = m_rex3.m_x_start_frac; - int16_t y1_fract = m_rex3.m_y_start_frac; - - int32_t dx = abs(x1 - x2); - int32_t dy = abs(y1 - y2); - - const int16_t dx_i = abs(x10 - x20) - 1; - const int16_t dy_i = abs(y10 - y20) - 1; - - static const bresenham_octant_info_t s_bresenham_infos[8] = - { - { 1, 1, 0, 1, 0 }, - { 0, 1, 1, 1, 1 }, - { 0, -1, 1, 1, 1 }, - { -1, -1, 0, 1, 0 }, - { -1, -1, 0, -1, 0 }, - { 0, -1, -1, -1, 1 }, - { 0, 1, -1, -1, 1 }, - { 1, 1, 0, -1, 0 } - }; - - const uint8_t octant = get_octant(x1, y1, x2, y2, dx, dy); - const int16_t incrx1 = s_bresenham_infos[octant].incrx1; - const int16_t incrx2 = s_bresenham_infos[octant].incrx2; - const int16_t incry1 = s_bresenham_infos[octant].incry1; - const int16_t incry2 = s_bresenham_infos[octant].incry2; - int16_t loop = s_bresenham_infos[octant].loop ? dy_i : dx_i; - if (BIT(m_rex3.m_draw_mode0, 15) && loop > 32) - loop = 32; - const int16_t x_major = 1 - s_bresenham_infos[octant].loop; - - const int32_t incr1 = s_bresenham_infos[octant].loop ? (2 * dx) : (2 * dy); - const int32_t incr2 = s_bresenham_infos[octant].loop ? (2 * (dx - dy)) : (2 * (dy - dx)); - int32_t d = s_bresenham_infos[octant].loop ? (3 * dx - 2 * dy) : (3 * dy - 2 * dx); - - switch (octant) - { - case 0: - // Nothing special needed - break; - case 1: - { - const int16_t temp_fract = x1_fract; - x1_fract = y1_fract; - y1_fract = temp_fract; - const int32_t temp_d = dx; - dx = dy; - dy = temp_d; - break; - } - case 2: - { - const int16_t temp_fract = 0x10 - x1_fract; - x1_fract = y1_fract; - y1_fract = temp_fract; - const int32_t temp_d = dx; - dx = dy; - dy = temp_d; - break; - } - case 3: - x1_fract = 0x10 - x1_fract; - break; - case 4: - x1_fract = 0x10 - x1_fract; - y1_fract = 0x10 - y1_fract; - break; - case 5: - { - const int16_t temp_fract = 0x10 - x1_fract; - x1_fract = 0x10 - y1_fract; - y1_fract = temp_fract; - const int32_t temp_d = dx; - dx = dy; - dy = temp_d; - break; - } - case 6: - { - const int16_t temp_fract = 0x10 - y1_fract; - y1_fract = x1_fract; - x1_fract = temp_fract; - const int32_t temp_d = dx; - dx = dy; - dy = temp_d; - break; - } - case 7: - y1_fract = 0x10 - y1_fract; - break; - } - - d += 2 * (((dx * y1_fract) >> 4) - ((dy * x1_fract) >> 4)); // Adjust d due to fractional endpoints - const int32_t E = d - 2 * dx; // Variable used for adjusting the start point up one pixel - if (E > 0) - { - d = E; - x += incrx2 * (1 - x_major); - y += incry2 * x_major; - } - - if (!skip_first || iterate_one) - { - if (shade || rgbmode) - write_pixel(x >> 4, y >> 4, get_rgb_color(x >> 4, y >> 4)); - else - write_pixel(x >> 4, y >> 4, color); - - if (shade) - iterate_shade(); - - if (d < 0) - { - x += incrx1; - y -= incry1; - d += incr1; - } - else - { - x += incrx2; - y -= incry2; - d += incr2; - } - - if (iterate_one) - { - write_x_start(x << 7); - write_y_start(y << 7); - return; - } - } - - for (int16_t i = 1; i < loop; i++) - { - if (shade || rgbmode) - write_pixel(x >> 4, y >> 4, get_rgb_color(x >> 4, y >> 4)); - else - write_pixel(x >> 4, y >> 4, color); - - if (shade) - iterate_shade(); - - if (d < 0) - { - x += incrx1; - y -= incry1; - d += incr1; - } - else - { - x += incrx2; - y -= incry2; - d += incr2; - } - } - - if (!skip_last) - { - if (shade || rgbmode) - write_pixel(x2 >> 4, y2 >> 4, get_rgb_color(x2 >> 4, y2 >> 4)); - else - write_pixel(x2 >> 4, y2 >> 4, color); - - if (shade) - iterate_shade(); - - write_x_start(x2); - write_y_start(y2); - } - else - { - write_x_start(x << 7); - write_y_start(y << 7); - } + const int32_t x1 = m_rex3.m_x_start >> 7; + const int32_t y1 = m_rex3.m_y_start >> 7; + const int32_t x2 = m_rex3.m_x_end >> 7; + const int32_t y2 = m_rex3.m_y_end >> 7; + + const int16_t x10 = x1 & ~0xf; + const int16_t y10 = y1 & ~0xf; + const int16_t x20 = x2 & ~0xf; + const int16_t y20 = y2 & ~0xf; + + const bool iterate_one = (m_rex3.m_draw_mode0 & 0x300) == 0; + const bool skip_first = BIT(m_rex3.m_draw_mode0, 10); + const bool skip_last = BIT(m_rex3.m_draw_mode0, 11); + const bool shade = BIT(m_rex3.m_draw_mode0, 18); + const bool rgbmode = BIT(m_rex3.m_draw_mode1, 15); + + int16_t x = x10; + int16_t y = y10; + + int16_t x1_fract = m_rex3.m_x_start_frac; + int16_t y1_fract = m_rex3.m_y_start_frac; + + int32_t dx = abs(x1 - x2); + int32_t dy = abs(y1 - y2); + + const int16_t dx_i = abs(x10 - x20) - 1; + const int16_t dy_i = abs(y10 - y20) - 1; + + static const bresenham_octant_info_t s_bresenham_infos[8] = + { + { 1, 1, 0, 1, 0 }, + { 0, 1, 1, 1, 1 }, + { 0, -1, 1, 1, 1 }, + { -1, -1, 0, 1, 0 }, + { -1, -1, 0, -1, 0 }, + { 0, -1, -1, -1, 1 }, + { 0, 1, -1, -1, 1 }, + { 1, 1, 0, -1, 0 } + }; + + const uint8_t octant = get_octant(x1, y1, x2, y2, dx, dy); + const int16_t incrx1 = s_bresenham_infos[octant].incrx1; + const int16_t incrx2 = s_bresenham_infos[octant].incrx2; + const int16_t incry1 = s_bresenham_infos[octant].incry1; + const int16_t incry2 = s_bresenham_infos[octant].incry2; + int16_t loop = s_bresenham_infos[octant].loop ? dy_i : dx_i; + if (BIT(m_rex3.m_draw_mode0, 15) && loop > 32) + loop = 32; + const int16_t x_major = 1 - s_bresenham_infos[octant].loop; + + const int32_t incr1 = s_bresenham_infos[octant].loop ? (2 * dx) : (2 * dy); + const int32_t incr2 = s_bresenham_infos[octant].loop ? (2 * (dx - dy)) : (2 * (dy - dx)); + int32_t d = s_bresenham_infos[octant].loop ? (3 * dx - 2 * dy) : (3 * dy - 2 * dx); + + switch (octant) + { + case 0: + // Nothing special needed + break; + case 1: + { + const int16_t temp_fract = x1_fract; + x1_fract = y1_fract; + y1_fract = temp_fract; + const int32_t temp_d = dx; + dx = dy; + dy = temp_d; + break; + } + case 2: + { + const int16_t temp_fract = 0x10 - x1_fract; + x1_fract = y1_fract; + y1_fract = temp_fract; + const int32_t temp_d = dx; + dx = dy; + dy = temp_d; + break; + } + case 3: + x1_fract = 0x10 - x1_fract; + break; + case 4: + x1_fract = 0x10 - x1_fract; + y1_fract = 0x10 - y1_fract; + break; + case 5: + { + const int16_t temp_fract = 0x10 - x1_fract; + x1_fract = 0x10 - y1_fract; + y1_fract = temp_fract; + const int32_t temp_d = dx; + dx = dy; + dy = temp_d; + break; + } + case 6: + { + const int16_t temp_fract = 0x10 - y1_fract; + y1_fract = x1_fract; + x1_fract = temp_fract; + const int32_t temp_d = dx; + dx = dy; + dy = temp_d; + break; + } + case 7: + y1_fract = 0x10 - y1_fract; + break; + } + + d += 2 * (((dx * y1_fract) >> 4) - ((dy * x1_fract) >> 4)); // Adjust d due to fractional endpoints + const int32_t E = d - 2 * dx; // Variable used for adjusting the start point up one pixel + if (E > 0) + { + d = E; + x += incrx2 * (1 - x_major); + y += incry2 * x_major; + } + + if (!skip_first || iterate_one) + { + if (shade || rgbmode) + write_pixel(x >> 4, y >> 4, get_rgb_color(x >> 4, y >> 4)); + else + write_pixel(x >> 4, y >> 4, color); + + if (shade) + iterate_shade(); + + if (d < 0) + { + x += incrx1; + y -= incry1; + d += incr1; + } + else + { + x += incrx2; + y -= incry2; + d += incr2; + } + + if (iterate_one) + { + write_x_start(x << 7); + write_y_start(y << 7); + return; + } + } + + for (int16_t i = 1; i < loop; i++) + { + if (shade || rgbmode) + write_pixel(x >> 4, y >> 4, get_rgb_color(x >> 4, y >> 4)); + else + write_pixel(x >> 4, y >> 4, color); + + if (shade) + iterate_shade(); + + if (d < 0) + { + x += incrx1; + y -= incry1; + d += incr1; + } + else + { + x += incrx2; + y -= incry2; + d += incr2; + } + } + + if (!skip_last) + { + if (shade || rgbmode) + write_pixel(x2 >> 4, y2 >> 4, get_rgb_color(x2 >> 4, y2 >> 4)); + else + write_pixel(x2 >> 4, y2 >> 4, color); + + if (shade) + iterate_shade(); + + write_x_start(x2); + write_y_start(y2); + } + else + { + write_x_start(x << 7); + write_y_start(y << 7); + } } void newport_base_device::do_iline(uint32_t color) { - int16_t x1 = m_rex3.m_x_start_i; - int16_t y1 = m_rex3.m_y_start_i; - int16_t x2 = m_rex3.m_x_end_i; - int16_t y2 = m_rex3.m_y_end_i; - - const bool iterate_one = (m_rex3.m_draw_mode0 & 0x300) == 0; - const bool skip_first = BIT(m_rex3.m_draw_mode0, 10); - const bool skip_last = BIT(m_rex3.m_draw_mode0, 11); - const bool shade = BIT(m_rex3.m_draw_mode0, 18); - const bool rgbmode = BIT(m_rex3.m_draw_mode1, 15); - - int16_t x = x1; - int16_t y = y1; - int16_t dx = abs(x1 - x2); - int16_t dy = abs(y1 - y2); - //const uint8_t coverage = 1; - - static const bresenham_octant_info_t s_bresenham_infos[8] = - { - { 1, 1, 0, 1, 0 }, - { 0, 1, 1, 1, 1 }, - { 0, -1, 1, 1, 1 }, - { -1, -1, 0, 1, 0 }, - { -1, -1, 0, -1, 0 }, - { 0, -1, -1, -1, 1 }, - { 0, 1, -1, -1, 1 }, - { 1, 1, 0, -1, 0 } - }; - - const uint8_t octant = get_octant(x1, y1, x2, y2, dx, dy); - const int16_t incrx1 = s_bresenham_infos[octant].incrx1; - const int16_t incrx2 = s_bresenham_infos[octant].incrx2; - const int16_t incry1 = s_bresenham_infos[octant].incry1; - const int16_t incry2 = s_bresenham_infos[octant].incry2; - int16_t loop = s_bresenham_infos[octant].loop ? dy : dx; - if (BIT(m_rex3.m_draw_mode0, 15) && loop > 32) - loop = 32; - - const int16_t incr1 = 2 * (s_bresenham_infos[octant].loop ? dx : dy); - const int16_t incr2 = 2 * (s_bresenham_infos[octant].loop ? (dx - dy) : (dy - dx)); - int16_t d = incr1 - (s_bresenham_infos[octant].loop ? dy : dx); - - if (!skip_first || iterate_one) - { - if (shade || rgbmode) - write_pixel(x, y, get_rgb_color(x, y)); - else - write_pixel(x, y, color); - - if (shade) - iterate_shade(); - - if (d < 0) - { - x += incrx1; - y -= incry1; - d += incr1; - } - else - { - x += incrx2; - y -= incry2; - d += incr2; - } - - if (iterate_one) - { - write_x_start(x << 11); - write_y_start(y << 11); - return; - } - } - - for (int16_t i = 1; i < loop; i++) - { - if (shade || rgbmode) - write_pixel(x, y, get_rgb_color(x, y)); - else - write_pixel(x, y, color); - - if (shade) - iterate_shade(); - - if (d < 0) - { - x += incrx1; - y -= incry1; - d += incr1; - } - else - { - x += incrx2; - y -= incry2; - d += incr2; - } - } - - if (!skip_last) - { - if (shade || rgbmode) - write_pixel(x2, y2, get_rgb_color(x2, y2)); - else - write_pixel(x2, y2, color); - - if (shade) - iterate_shade(); - - write_x_start(x2 << 11); - write_y_start(y2 << 11); - } - else - { - write_x_start(x << 11); - write_y_start(y << 11); + int16_t x1 = m_rex3.m_x_start_i; + int16_t y1 = m_rex3.m_y_start_i; + int16_t x2 = m_rex3.m_x_end_i; + int16_t y2 = m_rex3.m_y_end_i; + + const bool iterate_one = (m_rex3.m_draw_mode0 & 0x300) == 0; + const bool skip_first = BIT(m_rex3.m_draw_mode0, 10); + const bool skip_last = BIT(m_rex3.m_draw_mode0, 11); + const bool shade = BIT(m_rex3.m_draw_mode0, 18); + const bool rgbmode = BIT(m_rex3.m_draw_mode1, 15); + + int16_t x = x1; + int16_t y = y1; + int16_t dx = abs(x1 - x2); + int16_t dy = abs(y1 - y2); + //const uint8_t coverage = 1; + + static const bresenham_octant_info_t s_bresenham_infos[8] = + { + { 1, 1, 0, 1, 0 }, + { 0, 1, 1, 1, 1 }, + { 0, -1, 1, 1, 1 }, + { -1, -1, 0, 1, 0 }, + { -1, -1, 0, -1, 0 }, + { 0, -1, -1, -1, 1 }, + { 0, 1, -1, -1, 1 }, + { 1, 1, 0, -1, 0 } + }; + + const uint8_t octant = get_octant(x1, y1, x2, y2, dx, dy); + const int16_t incrx1 = s_bresenham_infos[octant].incrx1; + const int16_t incrx2 = s_bresenham_infos[octant].incrx2; + const int16_t incry1 = s_bresenham_infos[octant].incry1; + const int16_t incry2 = s_bresenham_infos[octant].incry2; + int16_t loop = s_bresenham_infos[octant].loop ? dy : dx; + if (BIT(m_rex3.m_draw_mode0, 15) && loop > 32) + loop = 32; + + const int16_t incr1 = 2 * (s_bresenham_infos[octant].loop ? dx : dy); + const int16_t incr2 = 2 * (s_bresenham_infos[octant].loop ? (dx - dy) : (dy - dx)); + int16_t d = incr1 - (s_bresenham_infos[octant].loop ? dy : dx); + + if (!skip_first || iterate_one) + { + if (shade || rgbmode) + write_pixel(x, y, get_rgb_color(x, y)); + else + write_pixel(x, y, color); + + if (shade) + iterate_shade(); + + if (d < 0) + { + x += incrx1; + y -= incry1; + d += incr1; + } + else + { + x += incrx2; + y -= incry2; + d += incr2; + } + + if (iterate_one) + { + write_x_start(x << 11); + write_y_start(y << 11); + return; + } + } + + for (int16_t i = 1; i < loop; i++) + { + if (shade || rgbmode) + write_pixel(x, y, get_rgb_color(x, y)); + else + write_pixel(x, y, color); + + if (shade) + iterate_shade(); + + if (d < 0) + { + x += incrx1; + y -= incry1; + d += incr1; + } + else + { + x += incrx2; + y -= incry2; + d += incr2; + } + } + + if (!skip_last) + { + if (shade || rgbmode) + write_pixel(x2, y2, get_rgb_color(x2, y2)); + else + write_pixel(x2, y2, color); + + if (shade) + iterate_shade(); + + write_x_start(x2 << 11); + write_y_start(y2 << 11); + } + else + { + write_x_start(x << 11); + write_y_start(y << 11); } } @@ -2581,40 +2581,40 @@ uint32_t newport_base_device::do_pixel_read() default: // No conversion needed break; - case 1: // 4bpp -> 8bpp + case 1: // 4bpp -> 8bpp ret = convert_4bpp_bgr_to_8bpp((uint8_t)ret); break; - case 2: // 4bpp -> 12bpp + case 2: // 4bpp -> 12bpp ret = convert_4bpp_bgr_to_12bpp((uint8_t)ret); break; - case 3: // 4bpp -> 24bpp + case 3: // 4bpp -> 24bpp ret = convert_4bpp_bgr_to_24bpp((uint8_t)ret); break; - case 4: // 8bpp -> 4bpp + case 4: // 8bpp -> 4bpp ret = convert_8bpp_bgr_to_4bpp((uint8_t)ret); break; - case 6: // 8bpp -> 12bpp + case 6: // 8bpp -> 12bpp ret = convert_8bpp_bgr_to_12bpp((uint8_t)ret); break; - case 7: // 8bpp -> 24bpp + case 7: // 8bpp -> 24bpp ret = convert_8bpp_bgr_to_24bpp((uint8_t)ret); break; - case 8: // 12bpp -> 4bpp + case 8: // 12bpp -> 4bpp ret = convert_12bpp_bgr_to_4bpp((uint16_t)ret); break; - case 9: // 12bpp -> 8bpp + case 9: // 12bpp -> 8bpp ret = convert_12bpp_bgr_to_8bpp((uint16_t)ret); break; - case 11: // 12bpp -> 24bpp + case 11: // 12bpp -> 24bpp ret = convert_12bpp_bgr_to_24bpp((uint16_t)ret); break; - case 12: // 32bpp -> 4bpp + case 12: // 32bpp -> 4bpp ret = convert_24bpp_bgr_to_4bpp(ret); break; - case 13: // 32bpp -> 8bpp + case 13: // 32bpp -> 8bpp ret = convert_24bpp_bgr_to_8bpp(ret); break; - case 14: // 32bpp -> 12bpp + case 14: // 32bpp -> 12bpp ret = convert_24bpp_bgr_to_12bpp(ret); break; } @@ -2719,9 +2719,9 @@ uint64_t newport_base_device::do_pixel_word_read() void newport_base_device::iterate_shade() { - m_rex3.m_color_red += m_rex3.m_slope_red; - m_rex3.m_color_green += m_rex3.m_slope_green; - m_rex3.m_color_blue += m_rex3.m_slope_blue; + m_rex3.m_color_red += m_rex3.m_slope_red; + m_rex3.m_color_green += m_rex3.m_slope_green; + m_rex3.m_color_blue += m_rex3.m_slope_blue; } void newport_base_device::do_rex3_command() @@ -2761,23 +2761,23 @@ void newport_base_device::do_rex3_command() if (BIT(mode0, 19) && dx < 0) // LROnly break; - end_x += dx; + end_x += dx; int16_t prim_end_x = end_x; - bool stop_on_x = BIT(mode0, 8); + bool stop_on_x = BIT(mode0, 8); if (BIT(mode0, 15) && abs(end_x - start_x) > 32) prim_end_x = start_x + 32 * dx; - if (m_rex3.m_color_host && m_rex3.m_rwpacked) - { - stop_on_x = true; - static const int16_t s_max_host_lengths[2][4] = { { 4, 4, 2, 1 }, { 8, 8, 4, 2 } }; - const int16_t max_length = s_max_host_lengths[m_rex3.m_rwdouble ? 1 : 0][m_rex3.m_hostdepth]; - int16_t length = abs(prim_end_x - start_x); - if (length > max_length) - prim_end_x = start_x + dx * max_length; - } + if (m_rex3.m_color_host && m_rex3.m_rwpacked) + { + stop_on_x = true; + static const int16_t s_max_host_lengths[2][4] = { { 4, 4, 2, 1 }, { 8, 8, 4, 2 } }; + const int16_t max_length = s_max_host_lengths[m_rex3.m_rwdouble ? 1 : 0][m_rex3.m_hostdepth]; + int16_t length = abs(prim_end_x - start_x); + if (length > max_length) + prim_end_x = start_x + dx * max_length; + } const bool shade = BIT(mode0, 18); const bool rgbmode = BIT(mode1, 15); @@ -2840,25 +2840,25 @@ void newport_base_device::do_rex3_command() if (BIT(mode0, 19) && dx < 0) // LROnly break; - end_x += dx; + end_x += dx; end_y += dy; int16_t prim_end_x = end_x; - bool stop_on_x = BIT(mode0, 8); + bool stop_on_x = BIT(mode0, 8); const bool stop_on_y = BIT(mode0, 9); if (BIT(mode0, 15) && (end_x - start_x) >= 32) prim_end_x = start_x + 32 * dx; - if (m_rex3.m_color_host && m_rex3.m_rwpacked) - { - stop_on_x = true; - static const int16_t s_max_host_lengths[2][4] = { { 4, 4, 2, 1 }, { 8, 8, 4, 2 } }; - const int16_t max_length = s_max_host_lengths[m_rex3.m_rwdouble ? 1 : 0][m_rex3.m_hostdepth]; - int16_t length = abs(prim_end_x - start_x); - if (length > max_length) - prim_end_x = start_x + dx * max_length; - } + if (m_rex3.m_color_host && m_rex3.m_rwpacked) + { + stop_on_x = true; + static const int16_t s_max_host_lengths[2][4] = { { 4, 4, 2, 1 }, { 8, 8, 4, 2 } }; + const int16_t max_length = s_max_host_lengths[m_rex3.m_rwdouble ? 1 : 0][m_rex3.m_hostdepth]; + int16_t length = abs(prim_end_x - start_x); + if (length > max_length) + prim_end_x = start_x + dx * max_length; + } const bool shade = BIT(mode0, 18); const bool rgbmode = BIT(mode1, 15); @@ -2999,7 +2999,7 @@ void newport_base_device::do_rex3_command() void newport_base_device::write_x_start(int32_t val) { m_rex3.m_x_start = val & 0x07ffff80; - m_rex3.m_x_start_frac = (val >> 7) & 0xf; + m_rex3.m_x_start_frac = (val >> 7) & 0xf; m_rex3.m_x_start_i = (int16_t)(val >> 11); m_rex3.m_x_start_f = (uint32_t)val & 0x007fff80; m_rex3.m_xy_start_i = (m_rex3.m_xy_start_i & 0x0000ffff) | (m_rex3.m_x_start_i << 16); @@ -3008,7 +3008,7 @@ void newport_base_device::write_x_start(int32_t val) void newport_base_device::write_y_start(int32_t val) { m_rex3.m_y_start = val & 0x07ffff80; - m_rex3.m_y_start_frac = (val >> 7) & 0xf; + m_rex3.m_y_start_frac = (val >> 7) & 0xf; m_rex3.m_y_start_i = (int16_t)(val >> 11); m_rex3.m_y_start_f = (uint32_t)val & 0x007fff80; m_rex3.m_xy_start_i = (m_rex3.m_xy_start_i & 0xffff0000) | (uint16_t)m_rex3.m_y_start_i; @@ -3017,7 +3017,7 @@ void newport_base_device::write_y_start(int32_t val) void newport_base_device::write_x_end(int32_t val) { m_rex3.m_x_end = val & 0x07ffff80; - m_rex3.m_x_end_frac = (val >> 7) & 0xf; + m_rex3.m_x_end_frac = (val >> 7) & 0xf; m_rex3.m_x_end_i = (int16_t)(val >> 11); m_rex3.m_x_end_f = (uint32_t)val & 0x007fff80; m_rex3.m_xy_end_i = (m_rex3.m_xy_end_i & 0x0000ffff) | (m_rex3.m_x_end_i << 16); @@ -3026,7 +3026,7 @@ void newport_base_device::write_x_end(int32_t val) void newport_base_device::write_y_end(int32_t val) { m_rex3.m_y_end = val & 0x07ffff80; - m_rex3.m_y_end_frac = (val >> 7) & 0xf; + m_rex3.m_y_end_frac = (val >> 7) & 0xf; m_rex3.m_y_end_i = (int16_t)(val >> 11); m_rex3.m_y_end_f = (uint32_t)val & 0x007fff80; m_rex3.m_xy_end_i = (m_rex3.m_xy_end_i & 0xffff0000) | (uint16_t)m_rex3.m_y_end_i; @@ -3343,7 +3343,7 @@ WRITE64_MEMBER(newport_base_device::rex3_w) if (ACCESSING_BITS_0_31) { LOGMASKED(LOG_REX3, "REX3 VRAM Fastclear Color Write: %08x\n", (uint32_t)data); - m_rex3.m_color_vram = (uint32_t)data; + m_rex3.m_color_vram = (uint32_t)data; } break; case 0x0020/8: diff --git a/src/devices/bus/gio/newport.h b/src/devices/bus/gio/newport.h index 77d37ce5f03..bed96892cd7 100644 --- a/src/devices/bus/gio/newport.h +++ b/src/devices/bus/gio/newport.h @@ -15,8 +15,8 @@ #define ENABLE_NEWVIEW_LOG (0) class newport_base_device : public device_t - , public device_palette_interface - , public device_gio_card_interface + , public device_palette_interface + , public device_gio_card_interface { public: newport_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t global_mask); @@ -97,9 +97,9 @@ protected: uint32_t m_draw_mode1; uint8_t m_plane_enable; uint8_t m_plane_depth; - bool m_rwpacked; - bool m_rwdouble; - uint8_t m_hostdepth; + bool m_rwpacked; + bool m_rwdouble; + uint8_t m_hostdepth; uint8_t m_sfactor; uint8_t m_dfactor; uint8_t m_logicop; @@ -107,7 +107,7 @@ protected: uint32_t m_store_shift; uint32_t m_host_shift; - uint32_t m_write_width; + uint32_t m_write_width; uint32_t m_ls_mode; uint32_t m_ls_pattern; uint32_t m_ls_pattern_saved; @@ -121,10 +121,10 @@ protected: int32_t m_y_start; int32_t m_x_end; int32_t m_y_end; - int16_t m_x_start_frac; - int16_t m_y_start_frac; - int16_t m_x_end_frac; - int16_t m_y_end_frac; + int16_t m_x_start_frac; + int16_t m_y_start_frac; + int16_t m_x_end_frac; + int16_t m_y_end_frac; int16_t m_x_save; uint32_t m_xy_move; int16_t m_x_move; @@ -175,7 +175,7 @@ protected: uint32_t m_config; uint32_t m_status; uint8_t m_xfer_width; - }; + }; struct cmap_t { @@ -217,33 +217,33 @@ protected: uint32_t get_host_color(); uint32_t get_rgb_color(int16_t x, int16_t y); - uint32_t convert_4bpp_bgr_to_8bpp(uint8_t pix_in); - uint32_t convert_4bpp_bgr_to_12bpp(uint8_t pix_in); - uint32_t convert_4bpp_bgr_to_24bpp(uint8_t pix_in); - uint32_t convert_8bpp_bgr_to_4bpp(uint8_t pix_in); - uint32_t convert_8bpp_bgr_to_12bpp(uint8_t pix_in); - uint32_t convert_8bpp_bgr_to_24bpp(uint8_t pix_in); - uint32_t convert_12bpp_bgr_to_4bpp(uint16_t pix_in); - uint32_t convert_12bpp_bgr_to_8bpp(uint16_t pix_in); - uint32_t convert_12bpp_bgr_to_24bpp(uint16_t pix_in); - uint32_t convert_24bpp_bgr_to_4bpp(uint32_t pix_in); - uint32_t convert_24bpp_bgr_to_8bpp(uint32_t pix_in); - uint32_t convert_24bpp_bgr_to_12bpp(uint32_t pix_in); - - uint32_t convert_4bpp_bgr_to_24bpp_rgb(uint8_t pix_in); - uint32_t convert_8bpp_bgr_to_24bpp_rgb(uint8_t pix_in); - uint32_t convert_12bpp_bgr_to_24bpp_rgb(uint16_t pix_in); - - struct bresenham_octant_info_t - { - int16_t incrx1; - int16_t incrx2; - int16_t incry1; - int16_t incry2; - uint8_t loop; - }; - uint8_t get_octant(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t dx, int16_t dy); - void do_fline(uint32_t color); + uint32_t convert_4bpp_bgr_to_8bpp(uint8_t pix_in); + uint32_t convert_4bpp_bgr_to_12bpp(uint8_t pix_in); + uint32_t convert_4bpp_bgr_to_24bpp(uint8_t pix_in); + uint32_t convert_8bpp_bgr_to_4bpp(uint8_t pix_in); + uint32_t convert_8bpp_bgr_to_12bpp(uint8_t pix_in); + uint32_t convert_8bpp_bgr_to_24bpp(uint8_t pix_in); + uint32_t convert_12bpp_bgr_to_4bpp(uint16_t pix_in); + uint32_t convert_12bpp_bgr_to_8bpp(uint16_t pix_in); + uint32_t convert_12bpp_bgr_to_24bpp(uint16_t pix_in); + uint32_t convert_24bpp_bgr_to_4bpp(uint32_t pix_in); + uint32_t convert_24bpp_bgr_to_8bpp(uint32_t pix_in); + uint32_t convert_24bpp_bgr_to_12bpp(uint32_t pix_in); + + uint32_t convert_4bpp_bgr_to_24bpp_rgb(uint8_t pix_in); + uint32_t convert_8bpp_bgr_to_24bpp_rgb(uint8_t pix_in); + uint32_t convert_12bpp_bgr_to_24bpp_rgb(uint16_t pix_in); + + struct bresenham_octant_info_t + { + int16_t incrx1; + int16_t incrx2; + int16_t incry1; + int16_t incry2; + uint8_t loop; + }; + uint8_t get_octant(int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t dx, int16_t dy); + void do_fline(uint32_t color); void do_iline(uint32_t color); uint32_t do_pixel_read(); diff --git a/src/devices/bus/isa/asc88.h b/src/devices/bus/isa/asc88.h index 2cf370f0084..068f416112e 100644 --- a/src/devices/bus/isa/asc88.h +++ b/src/devices/bus/isa/asc88.h @@ -47,7 +47,7 @@ private: u8 m_control; bool m_irq; bool m_drq; - std::unique_ptr m_ram; + std::unique_ptr m_ram; }; // device type declaration diff --git a/src/devices/cpu/i386/athlon.cpp b/src/devices/cpu/i386/athlon.cpp index d315e5a3428..f8f419577f0 100644 --- a/src/devices/cpu/i386/athlon.cpp +++ b/src/devices/cpu/i386/athlon.cpp @@ -841,10 +841,10 @@ uint64_t athlonxp_device::opcode_rdmsr(bool &valid_msr) /* Access to the ASeg (a0000-bffff) depends on bit 0 of smm_mask if the bit is 0 use the associated fixed mtrr if the bit is 1 - if smm is active - access goes to dram (wrmem 1 rdmem 1) - if smm not active - access goes to mmio (wrmem 0 rdmem 0) */ + if smm is active + access goes to dram (wrmem 1 rdmem 1) + if smm not active + access goes to mmio (wrmem 0 rdmem 0) */ ret = m_msr_smm_mask; break; } diff --git a/src/devices/cpu/m68000/m68k_in.lst b/src/devices/cpu/m68000/m68k_in.lst index 61a28bf7b8a..f7d292e0962 100644 --- a/src/devices/cpu/m68000/m68k_in.lst +++ b/src/devices/cpu/m68000/m68k_in.lst @@ -37,7 +37,7 @@ # 4: 68040 # f: fcpu # c: coldfire -# +# # A suffix of 'p' indicates the instruction is priviledged for these # particular CPU variants. # @@ -8061,8 +8061,8 @@ e5c0 ffc0 roxl w A+-DXWL 071:8 234fc:5 f400 ff20 cinv l . 4:16 u16 ir = m_ir; u8 cache = (ir >> 6) & 3; - // u8 scope = (ir >> 3) & 3; - // logerror("68040 %s: pc=%08x ir=%04x cache=%d scope=%d register=%d\n", ir & 0x0020 ? "cpush" : "cinv", m_ppc, ir, cache, scope, ir & 7); + // u8 scope = (ir >> 3) & 3; + // logerror("68040 %s: pc=%08x ir=%04x cache=%d scope=%d register=%d\n", ir & 0x0020 ? "cpush" : "cinv", m_ppc, ir, cache, scope, ir & 7); switch (cache) { case 2: case 3: diff --git a/src/devices/cpu/m68000/m68kops.cpp b/src/devices/cpu/m68000/m68kops.cpp index 6c53dfca9c3..b66253e4e00 100644 --- a/src/devices/cpu/m68000/m68kops.cpp +++ b/src/devices/cpu/m68000/m68kops.cpp @@ -31242,8 +31242,8 @@ void m68000_base_device::xf400_cinv_l_4() { u16 ir = m_ir; u8 cache = (ir >> 6) & 3; - // u8 scope = (ir >> 3) & 3; - // logerror("68040 %s: pc=%08x ir=%04x cache=%d scope=%d register=%d\n", ir & 0x0020 ? "cpush" : "cinv", m_ppc, ir, cache, scope, ir & 7); + // u8 scope = (ir >> 3) & 3; + // logerror("68040 %s: pc=%08x ir=%04x cache=%d scope=%d register=%d\n", ir & 0x0020 ? "cpush" : "cinv", m_ppc, ir, cache, scope, ir & 7); switch (cache) { case 2: case 3: diff --git a/src/devices/cpu/sm510/sm590core.cpp b/src/devices/cpu/sm510/sm590core.cpp index 54e4267d7de..0763af6e654 100644 --- a/src/devices/cpu/sm510/sm590core.cpp +++ b/src/devices/cpu/sm510/sm590core.cpp @@ -40,11 +40,11 @@ sm590_device::sm590_device(const machine_config &mconfig, const char *tag, devic { } //sm591_device::sm591_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : -// sm510_base_device(mconfig, SM591, tag, owner, clock, 4 /* stack levels */, 10 /* prg width */, address_map_constructor(FUNC(sm591_device::program_2x128x4), this), 6 /* data width */, address_map_constructor(FUNC(sm591_device::data_16x3.5x4), this)) +// sm510_base_device(mconfig, SM591, tag, owner, clock, 4 /* stack levels */, 10 /* prg width */, address_map_constructor(FUNC(sm591_device::program_2x128x4), this), 6 /* data width */, address_map_constructor(FUNC(sm591_device::data_16x3.5x4), this)) //{ } //sm595_device::sm595_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : -// sm510_base_device(mconfig, SM595, tag, owner, clock, 4 /* stack levels */, 10 /* prg width */, address_map_constructor(FUNC(sm595_device::program_1x128x4_1x128x2), this), 5 /* data width */, address_map_constructor(FUNC(sm595_device::data_16x2x4), this)) +// sm510_base_device(mconfig, SM595, tag, owner, clock, 4 /* stack levels */, 10 /* prg width */, address_map_constructor(FUNC(sm595_device::program_1x128x4_1x128x2), this), 5 /* data width */, address_map_constructor(FUNC(sm595_device::data_16x2x4), this)) //{ } sm590_device::sm590_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, int stack_levels, int prgwidth, address_map_constructor program, int datawidth, address_map_constructor data) : diff --git a/src/devices/cpu/unsp/unsp.cpp b/src/devices/cpu/unsp/unsp.cpp index 2bf39b507f8..2f8999363cb 100644 --- a/src/devices/cpu/unsp/unsp.cpp +++ b/src/devices/cpu/unsp/unsp.cpp @@ -25,7 +25,7 @@ #include "unspdasm.h" DEFINE_DEVICE_TYPE(UNSP, unsp_device, "unsp", "SunPlus u'nSP (ISA 1.0)") -// 1.1 is just 1.0 with better CPI? +// 1.1 is just 1.0 with better CPI? DEFINE_DEVICE_TYPE(UNSP_11, unsp_11_device, "unsp_11", "SunPlus u'nSP (ISA 1.1)") // it's possible that most unSP systems we emulate are 1.2, but are not using 99% of the additional features / instructions over 1.0 (only enable_irq and enable_fiq are meant to be 1.2 specific and used, but that could be a research error) DEFINE_DEVICE_TYPE(UNSP_12, unsp_12_device, "unsp_12", "SunPlus u'nSP (ISA 1.2)") diff --git a/src/devices/cpu/unsp/unsp_extended.cpp b/src/devices/cpu/unsp/unsp_extended.cpp index eacf1c281d4..caa66763a00 100644 --- a/src/devices/cpu/unsp/unsp_extended.cpp +++ b/src/devices/cpu/unsp/unsp_extended.cpp @@ -57,10 +57,10 @@ void unsp_20_device::execute_extended_group(uint16_t op) size -= 1; if ((rx-size) >= 0) - logerror("(Ext) push %s, %s to [%s]\n", - extregs[rx-size], extregs[rx], (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); + logerror("(Ext) push %s, %s to [%s]\n", + extregs[rx-size], extregs[rx], (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); else - logerror("(Ext) push \n"); + logerror("(Ext) push \n"); */ //unimplemented_opcode(op, ximm); return; @@ -78,10 +78,10 @@ void unsp_20_device::execute_extended_group(uint16_t op) if ((rx-size) >= 0) - logerror("(Ext) pop %s, %s from [%s]\n", - extregs[rx-size], extregs[rx], (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); + logerror("(Ext) pop %s, %s from [%s]\n", + extregs[rx-size], extregs[rx], (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); else - logerror("(Ext) pop \n"); + logerror("(Ext) pop \n"); */ //unimplemented_opcode(op, ximm); return; diff --git a/src/devices/cpu/unsp/unsp_fxxx.cpp b/src/devices/cpu/unsp/unsp_fxxx.cpp index ea9ad1a2751..2c98161e847 100644 --- a/src/devices/cpu/unsp/unsp_fxxx.cpp +++ b/src/devices/cpu/unsp/unsp_fxxx.cpp @@ -385,14 +385,14 @@ void unsp_device::execute_fxxx_101_group(uint16_t op) inline void unsp_device::execute_fxxx_110_group(uint16_t op) { //uint32_t len = 1; - + // some sources say this is FFc0, but smartfp clearly uses ff80 // EXTOP 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 (+16 bit imm) if ((op == 0xff80) && m_iso >= 20) { return execute_extended_group(op); - } - + } + // | | | // signed * signed (size 16,1,2,3,4,5,6,7) // MULS 1 1 1 1* r r r 1* 1 0*s s s r r r (1* = sign bit, 1* = sign bit 0* = upper size bit) diff --git a/src/devices/machine/ds1994.h b/src/devices/machine/ds1994.h index a91c1d4525b..a65f1b7d688 100644 --- a/src/devices/machine/ds1994.h +++ b/src/devices/machine/ds1994.h @@ -17,115 +17,115 @@ class ds1994_device : public device_t, public device_nvram_interface { public: - // construction/destruction - ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner) - : ds1994_device(mconfig, tag, owner, uint32_t(0)) - { - } + // construction/destruction + ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner) + : ds1994_device(mconfig, tag, owner, uint32_t(0)) + { + } - ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + ds1994_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - // inline configuration helpers - void ref_year(uint32_t year) { m_ref_year = year; } - void ref_month(uint8_t month) { m_ref_month = month; } - void ref_day(uint8_t day) { m_ref_day = day; } + // inline configuration helpers + void ref_year(uint32_t year) { m_ref_year = year; } + void ref_month(uint8_t month) { m_ref_month = month; } + void ref_day(uint8_t day) { m_ref_day = day; } - DECLARE_WRITE_LINE_MEMBER(write); - DECLARE_READ_LINE_MEMBER(read); + DECLARE_WRITE_LINE_MEMBER(write); + DECLARE_READ_LINE_MEMBER(read); protected: - // device-level overrides - virtual void device_start() override; - virtual void device_reset() override; - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - // device_nvram_interface overrides - virtual void nvram_default() override; - virtual void nvram_read(emu_file &file) override; - virtual void nvram_write(emu_file &file) override; + // device_nvram_interface overrides + virtual void nvram_default() override; + virtual void nvram_read(emu_file &file) override; + virtual void nvram_write(emu_file &file) override; private: - enum { - ROM_SIZE = 8, - DATA_SIZE = 0x202, - SPD_SIZE = 0x20, - RTC_SIZE = 0x05, - REGS_SIZE = 0x19, - // Rom Commands - ROMCMD_READROM = 0x33, - ROMCMD_MATCHROM = 0x55, - ROMCMD_SEARCHROM = 0xf0, - ROMCMD_SEARCHINT = 0xec, - ROMCMD_SKIPROM = 0xcc, - // Memory Commands - COMMAND_READ_MEMORY = 0xf0, - COMMAND_WRITE_SCRATCHPAD = 0x0f, - COMMAND_READ_SCRATCHPAD = 0xaa, - COMMAND_COPY_SCRATCHPAD = 0x55 - }; - - enum { - TIMER_MAIN, - TIMER_RESET, - TIMER_CLOCK - }; - - enum { - STATE_IDLE, - STATE_RESET, - STATE_RESET1, - STATE_RESET2, - STATE_ROMCMD, - STATE_READROM, - STATE_SKIPROM, - STATE_MATCHROM, - STATE_COMMAND, - STATE_ADDRESS1, - STATE_ADDRESS2, - STATE_OFFSET, - STATE_TXADDRESS1, - STATE_TXADDRESS2, - STATE_TXOFFSET, - STATE_INIT_COMMAND, - STATE_READ_MEMORY, - STATE_WRITE_SCRATCHPAD, - STATE_READ_SCRATCHPAD, - STATE_COPY_SCRATCHPAD - }; - - void ds1994_rom_cmd(void); - void ds1994_cmd(void); - bool one_wire_tx_bit(uint8_t value); - bool one_wire_rx_bit(void); - uint8_t ds1994_readmem(); - void ds1994_writemem(uint8_t value); - - emu_timer *m_timer_main, *m_timer_reset, *m_timer_clock; - - uint32_t m_ref_year; - uint8_t m_ref_month; - uint8_t m_ref_day; - - uint16_t m_address; - uint16_t m_offset; - uint8_t m_a1; - uint8_t m_a2; - int m_bit, m_shift; - uint8_t m_byte; - bool m_rx, m_tx; - uint8_t m_rom[ROM_SIZE]; - uint8_t m_sram[DATA_SIZE]; - uint8_t m_ram[SPD_SIZE]; - uint8_t m_rtc[RTC_SIZE]; - uint8_t m_regs[REGS_SIZE]; - int m_state[6]; - int m_state_ptr; - bool m_auth; - bool m_offs_ro; - - attotime t_samp, t_rdv, t_rstl, t_pdh, t_pdl; - - inline void verboselog(int n_level, const char *s_fmt, ...) ATTR_PRINTF(3, 4); + enum { + ROM_SIZE = 8, + DATA_SIZE = 0x202, + SPD_SIZE = 0x20, + RTC_SIZE = 0x05, + REGS_SIZE = 0x19, + // Rom Commands + ROMCMD_READROM = 0x33, + ROMCMD_MATCHROM = 0x55, + ROMCMD_SEARCHROM = 0xf0, + ROMCMD_SEARCHINT = 0xec, + ROMCMD_SKIPROM = 0xcc, + // Memory Commands + COMMAND_READ_MEMORY = 0xf0, + COMMAND_WRITE_SCRATCHPAD = 0x0f, + COMMAND_READ_SCRATCHPAD = 0xaa, + COMMAND_COPY_SCRATCHPAD = 0x55 + }; + + enum { + TIMER_MAIN, + TIMER_RESET, + TIMER_CLOCK + }; + + enum { + STATE_IDLE, + STATE_RESET, + STATE_RESET1, + STATE_RESET2, + STATE_ROMCMD, + STATE_READROM, + STATE_SKIPROM, + STATE_MATCHROM, + STATE_COMMAND, + STATE_ADDRESS1, + STATE_ADDRESS2, + STATE_OFFSET, + STATE_TXADDRESS1, + STATE_TXADDRESS2, + STATE_TXOFFSET, + STATE_INIT_COMMAND, + STATE_READ_MEMORY, + STATE_WRITE_SCRATCHPAD, + STATE_READ_SCRATCHPAD, + STATE_COPY_SCRATCHPAD + }; + + void ds1994_rom_cmd(void); + void ds1994_cmd(void); + bool one_wire_tx_bit(uint8_t value); + bool one_wire_rx_bit(void); + uint8_t ds1994_readmem(); + void ds1994_writemem(uint8_t value); + + emu_timer *m_timer_main, *m_timer_reset, *m_timer_clock; + + uint32_t m_ref_year; + uint8_t m_ref_month; + uint8_t m_ref_day; + + uint16_t m_address; + uint16_t m_offset; + uint8_t m_a1; + uint8_t m_a2; + int m_bit, m_shift; + uint8_t m_byte; + bool m_rx, m_tx; + uint8_t m_rom[ROM_SIZE]; + uint8_t m_sram[DATA_SIZE]; + uint8_t m_ram[SPD_SIZE]; + uint8_t m_rtc[RTC_SIZE]; + uint8_t m_regs[REGS_SIZE]; + int m_state[6]; + int m_state_ptr; + bool m_auth; + bool m_offs_ro; + + attotime t_samp, t_rdv, t_rstl, t_pdh, t_pdl; + + inline void verboselog(int n_level, const char *s_fmt, ...) ATTR_PRINTF(3, 4); }; // device type definition diff --git a/src/devices/machine/spg2xx_audio.cpp b/src/devices/machine/spg2xx_audio.cpp index 2e3d53c3612..3fb15b07213 100644 --- a/src/devices/machine/spg2xx_audio.cpp +++ b/src/devices/machine/spg2xx_audio.cpp @@ -12,8 +12,8 @@ SPG110 Beat interrupt frequency might be different too, seems to trigger an FIQ, but music is very slow in jak_spdmo - GCM394 has 32 channels, and potentially a different register layout - it looks close but might be different enough to split off + GCM394 has 32 channels, and potentially a different register layout + it looks close but might be different enough to split off **********************************************************************/ @@ -1332,4 +1332,4 @@ void sunplus_gcm394_audio_device::device_start() for (int j = 0; j < 0x20; j++) m_control[i][j] = 0x0000; -} \ No newline at end of file +} diff --git a/src/devices/machine/sunplus_gcm394.cpp b/src/devices/machine/sunplus_gcm394.cpp index 4c50147c57f..36852099090 100644 --- a/src/devices/machine/sunplus_gcm394.cpp +++ b/src/devices/machine/sunplus_gcm394.cpp @@ -105,22 +105,22 @@ READ16_MEMBER(sunplus_gcm394_base_device::unkarea_78fb_status_r) } // sets bit 0x0002 then expects it to have cleared -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7819_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7819_r\n", machine().describe_context()); return m_7819 & ~ 0x0002; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7819_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7819_r\n", machine().describe_context()); return m_7819 & ~ 0x0002; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7819_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7819_w %04x\n", machine().describe_context(), data); m_7819 = data; } // **************************************** 78xx region stubs ************************************************* READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7868_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7868_r\n", machine().describe_context()); return 0x0000; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_782d_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_782d_r\n", machine().describe_context()); return m_782d; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_782d_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_782d_r\n", machine().describe_context()); return m_782d; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_782d_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_782d_w %04x\n", machine().describe_context(), data); m_782d = data; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7803_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7803_r\n", machine().describe_context()); return m_7803; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7803_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7803_r\n", machine().describe_context()); return m_7803; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7803_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7803_w %04x\n", machine().describe_context(), data); m_7803 = data; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7807_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7807_w %04x\n", machine().describe_context(), data); m_7807 = data; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7810_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7810_r\n", machine().describe_context()); return m_7810; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7810_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7810_r\n", machine().describe_context()); return m_7810; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7810_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7810_w %04x\n", machine().describe_context(), data); m_7810 = data; } @@ -140,30 +140,30 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7835_w) { LOGMASKED(LOG_GCM39 READ16_MEMBER(sunplus_gcm394_base_device::ioport_a_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioport_a_r\n", machine().describe_context()); return m_porta_in(); } WRITE16_MEMBER(sunplus_gcm394_base_device::ioport_a_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::ioport_a_w %04x\n", machine().describe_context(), data); m_7860 = data; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7861_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7861_r\n", machine().describe_context()); return m_7861; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7861_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7861_r\n", machine().describe_context()); return m_7861; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7862_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7862_r\n", machine().describe_context()); return m_7862; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7862_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7862_r\n", machine().describe_context()); return m_7862; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7862_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7862_w %04x\n", machine().describe_context(), data); m_7862 = data; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7863_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7863_r\n", machine().describe_context()); return m_7863; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7863_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7863_r\n", machine().describe_context()); return m_7863; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7863_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7863_w %04x\n", machine().describe_context(), data); m_7863 = data; } // similar read/write pattern to above, 2nd group? -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7870_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7870_r\n", machine().describe_context()); return m_portb_in(); } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7870_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7870_r\n", machine().describe_context()); return m_portb_in(); } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7870_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7870_w %04x\n", machine().describe_context(), data); m_7870 = data; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7871_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7871_r\n", machine().describe_context()); return m_7871; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7871_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7871_r\n", machine().describe_context()); return m_7871; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7872_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7872_r\n", machine().describe_context()); return m_7872; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7872_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7872_r\n", machine().describe_context()); return m_7872; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7872_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7872_w %04x\n", machine().describe_context(), data); m_7872 = data; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7873_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7873_r\n", machine().describe_context()); return m_7873; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7873_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7873_r\n", machine().describe_context()); return m_7873; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7873_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7873_w %04x\n", machine().describe_context(), data); m_7873 = data; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7882_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7882_r\n", machine().describe_context()); return m_7882; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7882_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7882_r\n", machine().describe_context()); return m_7882; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7882_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7882_w %04x\n", machine().describe_context(), data); m_7882 = data; } -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7883_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7883_r\n", machine().describe_context()); return m_7883; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7883_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7883_r\n", machine().describe_context()); return m_7883; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7883_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7883_w %04x\n", machine().describe_context(), data); m_7883 = data; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_78a0_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_78a0_w %04x\n", machine().describe_context(), data); m_78a0 = data; } @@ -184,7 +184,7 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_78f0_w) { LOGMASKED(LOG_GCM39 // **************************************** 79xx region stubs ************************************************* -READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7934_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7934_r\n", machine().describe_context()); return 0x0000; } +READ16_MEMBER(sunplus_gcm394_base_device::unkarea_7934_r) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7934_r\n", machine().describe_context()); return 0x0000; } WRITE16_MEMBER(sunplus_gcm394_base_device::unkarea_7934_w) { LOGMASKED(LOG_GCM394, "%s:sunplus_gcm394_base_device::unkarea_7934_w %04x\n", machine().describe_context(), data); m_7934 = data; } // value of 7935 is read then written in irq6, nothing happens unless bit 0x0100 was set, which could be some kind of irq source being acked? @@ -298,7 +298,7 @@ void sunplus_gcm394_base_device::map(address_map &map) map(0x007400, 0x0077ff).ram().share("spriteram"); // ###################################################################################################################################################################################### - // 78xx region = io + other? + // 78xx region = io + other? // ###################################################################################################################################################################################### map(0x007803, 0x007803).rw(FUNC(sunplus_gcm394_base_device::unkarea_7803_r), FUNC(sunplus_gcm394_base_device::unkarea_7803_w)); @@ -306,7 +306,7 @@ void sunplus_gcm394_base_device::map(address_map &map) map(0x007807, 0x007807).w(FUNC(sunplus_gcm394_base_device::unkarea_7807_w)); map(0x00780f, 0x00780f).r(FUNC(sunplus_gcm394_base_device::unkarea_780f_status_r)); - + map(0x007810, 0x007810).rw(FUNC(sunplus_gcm394_base_device::unkarea_7810_r), FUNC(sunplus_gcm394_base_device::unkarea_7810_w)); map(0x007819, 0x007819).rw(FUNC(sunplus_gcm394_base_device::unkarea_7819_r), FUNC(sunplus_gcm394_base_device::unkarea_7819_w)); @@ -347,7 +347,7 @@ void sunplus_gcm394_base_device::map(address_map &map) map(0x0078a4, 0x0078a4).w(FUNC(sunplus_gcm394_base_device::unkarea_78a4_w)); map(0x0078a5, 0x0078a5).w(FUNC(sunplus_gcm394_base_device::unkarea_78a5_w)); map(0x0078a6, 0x0078a6).w(FUNC(sunplus_gcm394_base_device::unkarea_78a6_w)); - + map(0x0078a8, 0x0078a8).w(FUNC(sunplus_gcm394_base_device::unkarea_78a8_w)); map(0x0078b0, 0x0078b0).w(FUNC(sunplus_gcm394_base_device::unkarea_78b0_w)); @@ -359,13 +359,13 @@ void sunplus_gcm394_base_device::map(address_map &map) map(0x0078f0, 0x0078f0).w(FUNC(sunplus_gcm394_base_device::unkarea_78f0_w)); map(0x0078fb, 0x0078fb).r(FUNC(sunplus_gcm394_base_device::unkarea_78fb_status_r)); - + // ###################################################################################################################################################################################### // 79xx region = timers? // ###################################################################################################################################################################################### map(0x007934, 0x007934).rw(FUNC(sunplus_gcm394_base_device::unkarea_7934_r), FUNC(sunplus_gcm394_base_device::unkarea_7934_w)); - map(0x007935, 0x007935).rw(FUNC(sunplus_gcm394_base_device::unkarea_7935_r), FUNC(sunplus_gcm394_base_device::unkarea_7935_w)); + map(0x007935, 0x007935).rw(FUNC(sunplus_gcm394_base_device::unkarea_7935_r), FUNC(sunplus_gcm394_base_device::unkarea_7935_w)); map(0x007936, 0x007936).rw(FUNC(sunplus_gcm394_base_device::unkarea_7936_r), FUNC(sunplus_gcm394_base_device::unkarea_7936_w)); map(0x007960, 0x007960).w(FUNC(sunplus_gcm394_base_device::unkarea_7960_w)); @@ -376,7 +376,7 @@ void sunplus_gcm394_base_device::map(address_map &map) // ###################################################################################################################################################################################### map(0x007a80, 0x007a86).w(FUNC(sunplus_gcm394_base_device::system_dma_params_w)); - map(0x007abf, 0x007abf).rw(FUNC(sunplus_gcm394_base_device::system_dma_status_r), FUNC(sunplus_gcm394_base_device::system_dma_trigger_w)); + map(0x007abf, 0x007abf).rw(FUNC(sunplus_gcm394_base_device::system_dma_status_r), FUNC(sunplus_gcm394_base_device::system_dma_trigger_w)); // ###################################################################################################################################################################################### // 7bxx-7fxx = audio diff --git a/src/devices/machine/sunplus_gcm394_video.cpp b/src/devices/machine/sunplus_gcm394_video.cpp index 5f3a7a53eb3..5875c4eb9e7 100644 --- a/src/devices/machine/sunplus_gcm394_video.cpp +++ b/src/devices/machine/sunplus_gcm394_video.cpp @@ -26,7 +26,7 @@ gcm394_base_video_device::gcm394_base_video_device(const machine_config &mconfig , device_video_interface(mconfig, *this) , m_cpu(*this, finder_base::DUMMY_TAG) , m_screen(*this, finder_base::DUMMY_TAG) -// , m_scrollram(*this, "scrollram") +// , m_scrollram(*this, "scrollram") , m_spriteram(*this, "^spriteram") , m_video_irq_cb(*this) , m_palette(*this, "palette") @@ -190,7 +190,7 @@ void gcm394_base_video_device::device_reset() m_703a = 0x0000; m_7062 = 0x0000; m_7063 = 0x0000; - + m_702a = 0x0000; m_7030 = 0x0000; m_703c = 0x0000; @@ -311,8 +311,8 @@ void gcm394_base_video_device::draw(const rectangle &cliprect, uint32_t line, ui { /* m_screenbuf[pix_index] = (mix_channel((uint8_t)(m_screenbuf[pix_index] >> 16), m_rgb5_to_rgb8[(rgb >> 10) & 0x1f]) << 16) | - (mix_channel((uint8_t)(m_screenbuf[pix_index] >> 8), m_rgb5_to_rgb8[(rgb >> 5) & 0x1f]) << 8) | - (mix_channel((uint8_t)(m_screenbuf[pix_index] >> 0), m_rgb5_to_rgb8[rgb & 0x1f])); + (mix_channel((uint8_t)(m_screenbuf[pix_index] >> 8), m_rgb5_to_rgb8[(rgb >> 5) & 0x1f]) << 8) | + (mix_channel((uint8_t)(m_screenbuf[pix_index] >> 0), m_rgb5_to_rgb8[rgb & 0x1f])); */ m_screenbuf[pix_index] = m_rgb555_to_rgb888[rgb]; } @@ -360,7 +360,7 @@ void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t sca uint32_t yy = ((tile_h * y0 - yscroll + 0x10) & 0xff) - 0x10; uint32_t xx = (tile_w * x0 - xscroll) & 0x1ff; uint32_t tile = (ctrl & PAGE_WALLPAPER_MASK) ? space.read_word(tilemap) : space.read_word(tilemap + tile_address); - + uint16_t palette = (ctrl & PAGE_WALLPAPER_MASK) ? space.read_word(palette_map) : space.read_word(palette_map + tile_address / 2); if (x0 & 1) palette >>= 8; @@ -463,8 +463,8 @@ void gcm394_base_video_device::draw_sprite(const rectangle &cliprect, uint32_t s /* if (!(m_video_regs[0x42] & SPRITE_COORD_TL_MASK)) { - x = (160 + x) - w / 2; - y = (120 - y) - (h / 2) + 8; + x = (160 + x) - w / 2; + y = (120 - y) - (h / 2) + 8; } */ @@ -802,7 +802,7 @@ READ16_MEMBER(gcm394_base_video_device::video_7083_r) { LOGMASKED(LOG_GCM394_VID WRITE16_MEMBER(gcm394_base_video_device::palette_w) { - LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::palette_w %04x : %04x (value of 0x703a is %04x)\n", machine().describe_context().c_str(), offset, data, m_703a); + LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::palette_w %04x : %04x (value of 0x703a is %04x)\n", machine().describe_context().c_str(), offset, data, m_703a); if (m_703a & 0xfff0) { diff --git a/src/devices/machine/sunplus_gcm394_video.h b/src/devices/machine/sunplus_gcm394_video.h index 3918f4cf0bd..473acfb188f 100644 --- a/src/devices/machine/sunplus_gcm394_video.h +++ b/src/devices/machine/sunplus_gcm394_video.h @@ -83,7 +83,7 @@ public: DECLARE_WRITE16_MEMBER(video_7088_w); DECLARE_READ16_MEMBER(video_7083_r); - + DECLARE_READ16_MEMBER(palette_r); DECLARE_WRITE16_MEMBER(palette_w); @@ -151,7 +151,7 @@ protected: required_device m_cpu; required_device m_screen; -// required_shared_ptr m_scrollram; +// required_shared_ptr m_scrollram; required_shared_ptr m_spriteram; uint16_t m_page1_addr; diff --git a/src/devices/sound/mas3507d.cpp b/src/devices/sound/mas3507d.cpp index d1a4e380609..519136cfb4c 100644 --- a/src/devices/sound/mas3507d.cpp +++ b/src/devices/sound/mas3507d.cpp @@ -319,4 +319,4 @@ void mas3507d_device::run_program(uint32_t adr) void mas3507d_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { -} \ No newline at end of file +} diff --git a/src/devices/sound/swp00.h b/src/devices/sound/swp00.h index 5afc6cea369..f440c96d46e 100644 --- a/src/devices/sound/swp00.h +++ b/src/devices/sound/swp00.h @@ -25,7 +25,7 @@ protected: virtual void device_add_mconfig(machine_config &config) override; private: - // required_device m_meg; + // required_device m_meg; sound_stream *m_stream; diff --git a/src/devices/video/mc6847.cpp b/src/devices/video/mc6847.cpp index 3360a48c0e5..bb0079a2271 100644 --- a/src/devices/video/mc6847.cpp +++ b/src/devices/video/mc6847.cpp @@ -559,7 +559,7 @@ mc6847_base_device::mc6847_base_device(const machine_config &mconfig, device_typ m_bw_palette[i] = black_and_white(s_palette[i]); } - m_artifacter.create_color_blend_table( s_palette ); + m_artifacter.create_color_blend_table( s_palette ); } @@ -1684,7 +1684,7 @@ ioport_constructor mc6847_base_device::device_input_ports() const mc6847_base_device::artifacter::artifacter() { - m_palartifacting = false; + m_palartifacting = false; m_config = nullptr; m_artifacting = 0; m_saved_artifacting = 0; @@ -1808,7 +1808,7 @@ mc6847_base_device::pixel_t mc6847_base_device::artifacter::mix_color(double fac void mc6847_base_device::artifacter::create_color_blend_table( const pixel_t *palette ) { // PAL color blend map - m_palcolorblendmap.insert(std::pair,pixel_t>(std::pair(palette[3],palette[2]),rgb_t(0x7c, 0x2e, 0x81))); /* RED-BLUE */ + m_palcolorblendmap.insert(std::pair,pixel_t>(std::pair(palette[3],palette[2]),rgb_t(0x7c, 0x2e, 0x81))); /* RED-BLUE */ m_palcolorblendmap.insert(std::pair,pixel_t>(std::pair(palette[2],palette[3]),rgb_t(0x6b, 0x3e, 0x6b))); /* BLUE-RED */ m_palcolorblendmap.insert(std::pair,pixel_t>(std::pair(palette[7],palette[6]),rgb_t(0xbe, 0x73, 0x65))); /* ORANGE-MAGENTA */ m_palcolorblendmap.insert(std::pair,pixel_t>(std::pair(palette[6],palette[7]),rgb_t(0xde, 0x5f, 0x6a))); /* MAGENTA-ORANGE */ diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp old mode 100755 new mode 100644 index 80706f0b7f5..06bda8b713c --- a/src/frontend/mame/luaengine.cpp +++ b/src/frontend/mame/luaengine.cpp @@ -1726,7 +1726,7 @@ void lua_engine::initialize() * manager:machine():ioport().ports[port_tag].fields[field_name] * * field:set_value(value) - * + * * field.device - get associated device_t * field.live - get ioport_field_live diff --git a/src/lib/formats/os9_dsk.cpp b/src/lib/formats/os9_dsk.cpp index 8cd2bd985bf..4a56054a7ff 100644 --- a/src/lib/formats/os9_dsk.cpp +++ b/src/lib/formats/os9_dsk.cpp @@ -26,90 +26,90 @@ os9_format::os9_format() : wd177x_format(formats) const char *os9_format::name() const { - return "os9"; + return "os9"; } const char *os9_format::description() const { - return "OS-9 floppy disk image"; + return "OS-9 floppy disk image"; } const char *os9_format::extensions() const { - return "dsk,os9"; + return "dsk,os9"; } int os9_format::identify(io_generic *io, uint32_t form_factor) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor); - if (type != -1) - return 75; - return 0; + if (type != -1) + return 75; + return 0; } int os9_format::find_size(io_generic *io, uint32_t form_factor) { - uint64_t size = io_generic_size(io); - - uint8_t os9_header[0x20]; - io_generic_read(io, os9_header, 0, 0x20); - - int os9_total_sectors = pick_integer_be(os9_header, 0x00, 3); - int os9_heads = BIT(os9_header[0x10], 0) ? 2 : 1; - int os9_sectors = pick_integer_be(os9_header, 0x11, 2); - - if (os9_total_sectors > 0 && os9_heads > 0 && os9_sectors > 0) { - int os9_tracks = os9_total_sectors / os9_sectors / os9_heads; - - // now let's see if we have valid info - if ((os9_tracks * os9_heads * os9_sectors * 256) == size) { - for(int i=0; formats[i].form_factor; i++) { - const format &f = formats[i]; - - if(form_factor != floppy_image::FF_UNKNOWN && form_factor != f.form_factor) - continue; - - if(os9_tracks == f.track_count) { - if( os9_heads == f.head_count ) { - if(os9_sectors == f.sector_count ) { - return i; - } - } - } - } - } - } - - return -1; + uint64_t size = io_generic_size(io); + + uint8_t os9_header[0x20]; + io_generic_read(io, os9_header, 0, 0x20); + + int os9_total_sectors = pick_integer_be(os9_header, 0x00, 3); + int os9_heads = BIT(os9_header[0x10], 0) ? 2 : 1; + int os9_sectors = pick_integer_be(os9_header, 0x11, 2); + + if (os9_total_sectors > 0 && os9_heads > 0 && os9_sectors > 0) { + int os9_tracks = os9_total_sectors / os9_sectors / os9_heads; + + // now let's see if we have valid info + if ((os9_tracks * os9_heads * os9_sectors * 256) == size) { + for(int i=0; formats[i].form_factor; i++) { + const format &f = formats[i]; + + if(form_factor != floppy_image::FF_UNKNOWN && form_factor != f.form_factor) + continue; + + if(os9_tracks == f.track_count) { + if( os9_heads == f.head_count ) { + if(os9_sectors == f.sector_count ) { + return i; + } + } + } + } + } + } + + return -1; } const os9_format::format os9_format::formats[] = { - { // 5"25 160K double density - floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, - 2000, 18, 35, 1, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 - }, - { // 5"25 160K double density - floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, - 2000, 18, 35, 2, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 - }, - { // 5"25 160K double density - floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, - 2000, 18, 40, 1, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 - }, - { // 5"25 160K double density - floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, - 2000, 18, 40, 2, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 - }, - { // 5"25 160K double density - floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, - 2000, 18, 80, 1, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 - }, - { // 5"25 160K double density - floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, - 2000, 18, 80, 2, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 - }, - {} + { // 5"25 160K double density + floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, + 2000, 18, 35, 1, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 + }, + { // 5"25 160K double density + floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, + 2000, 18, 35, 2, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 + }, + { // 5"25 160K double density + floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, + 2000, 18, 40, 1, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 + }, + { // 5"25 160K double density + floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, + 2000, 18, 40, 2, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 + }, + { // 5"25 160K double density + floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, + 2000, 18, 80, 1, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 + }, + { // 5"25 160K double density + floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, + 2000, 18, 80, 2, 256, {}, -1, {1, 7, 13, 2, 8, 14, 3, 9, 15, 4, 10, 16, 5, 11, 17, 6, 12, 18}, 18, 28, 20 + }, + {} }; const floppy_format_type FLOPPY_OS9_FORMAT = &floppy_image_format_creator; diff --git a/src/lib/formats/os9_dsk.h b/src/lib/formats/os9_dsk.h index cd0ab645914..47f3521f85d 100644 --- a/src/lib/formats/os9_dsk.h +++ b/src/lib/formats/os9_dsk.h @@ -16,16 +16,16 @@ class os9_format : public wd177x_format { public: - os9_format(); + os9_format(); - virtual int identify(io_generic *io, uint32_t form_factor) override; - virtual int find_size(io_generic *io, uint32_t form_factor) override; - virtual const char *name() const override; - virtual const char *description() const override; - virtual const char *extensions() const override; + virtual int identify(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual const char *name() const override; + virtual const char *description() const override; + virtual const char *extensions() const override; private: - static const format formats[]; + static const format formats[]; }; extern const floppy_format_type FLOPPY_OS9_FORMAT; diff --git a/src/lib/netlist/macro/nlm_ttl74xx.cpp b/src/lib/netlist/macro/nlm_ttl74xx.cpp index 915e94791f6..fb175ae0c18 100644 --- a/src/lib/netlist/macro/nlm_ttl74xx.cpp +++ b/src/lib/netlist/macro/nlm_ttl74xx.cpp @@ -619,13 +619,13 @@ static NETLIST_START(TTL_74107_DIP) DIPPINS( /* +--------------+ */ A.J, /* 1J |1 ++ 14| VCC */ A.VCC, - A.QQ, /* 1QQ |2 13| 1CLRQ */ A.CLRQ, - A.Q, /* 1Q |3 12| 1CLK */ A.CLK, - A.K, /* 1K |4 74107 11| 2K */ B.K, - B.Q, /* 2Q |5 10| 2CLRQ */ B.CLRQ, - B.QQ, /* 2QQ |6 9| 2CLK */ B.CLK, - B.GND, /* GND |7 8| 2J */ B.J - /* +--------------+ */ + A.QQ, /* 1QQ |2 13| 1CLRQ */ A.CLRQ, + A.Q, /* 1Q |3 12| 1CLK */ A.CLK, + A.K, /* 1K |4 74107 11| 2K */ B.K, + B.Q, /* 2Q |5 10| 2CLRQ */ B.CLRQ, + B.QQ, /* 2QQ |6 9| 2CLK */ B.CLK, + B.GND, /* GND |7 8| 2J */ B.J + /* +--------------+ */ ) NETLIST_END() diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h index 46edf941b1d..2ee60c68546 100644 --- a/src/lib/netlist/nl_base.h +++ b/src/lib/netlist/nl_base.h @@ -1556,11 +1556,11 @@ namespace netlist PALIGNAS_CACHELINE() detail::queue_t m_queue; - bool m_stats; + bool m_stats; // performance - nperftime_t m_stat_mainloop; - nperfcount_t m_perf_out_processed; + nperftime_t m_stat_mainloop; + nperfcount_t m_perf_out_processed; }; // ----------------------------------------------------------------------------- diff --git a/src/lib/netlist/nl_errstr.h b/src/lib/netlist/nl_errstr.h index 6f9aa0d7d12..32e86bbef05 100644 --- a/src/lib/netlist/nl_errstr.h +++ b/src/lib/netlist/nl_errstr.h @@ -107,8 +107,8 @@ namespace netlist PERRMSGV(MW_DATA_1_NOT_FOUND, 1, "unable to find data {1} in sources collection") - PERRMSGV(MW_DEVICE_NOT_FOUND_FOR_HINT, 1, "Device not found for hint {1}") - PERRMSGV(MW_UNKNOWN_PARAMETER, 1, "Unknown parameter {1}") + PERRMSGV(MW_DEVICE_NOT_FOUND_FOR_HINT, 1, "Device not found for hint {1}") + PERRMSGV(MW_UNKNOWN_PARAMETER, 1, "Unknown parameter {1}") // nlid_proxy.cpp diff --git a/src/mame/audio/bally.cpp b/src/mame/audio/bally.cpp index 8966a9ef71b..0f36e410343 100644 --- a/src/mame/audio/bally.cpp +++ b/src/mame/audio/bally.cpp @@ -112,11 +112,11 @@ WRITE_LINE_MEMBER(bally_as2888_device::sound_int) TIMER_CALLBACK_MEMBER(bally_as2888_device::sound_int_sync) { - if (param) - { - m_snd_sustain_timer->adjust(attotime::from_msec(5)); - m_discrete->write(NODE_08, 11); // 11 volt pulse - } + if (param) + { + m_snd_sustain_timer->adjust(attotime::from_msec(5)); + m_discrete->write(NODE_08, 11); // 11 volt pulse + } } //------------------------------------------------- @@ -128,8 +128,8 @@ void bally_as2888_device::device_add_mconfig(machine_config &config) DISCRETE(config, m_discrete, as2888_discrete); m_discrete->add_route(ALL_OUTPUTS, *this, 1.00, AUTO_ALLOC_INPUT, 0); - TIMER(config, "timer_s_freq").configure_periodic(FUNC(bally_as2888_device::timer_s), attotime::from_hz(353000)); // Inverter clock on AS-2888 sound board - TIMER(config, m_snd_sustain_timer).configure_generic(FUNC(bally_as2888_device::timer_as2888)); + TIMER(config, "timer_s_freq").configure_periodic(FUNC(bally_as2888_device::timer_s), attotime::from_hz(353000)); // Inverter clock on AS-2888 sound board + TIMER(config, m_snd_sustain_timer).configure_generic(FUNC(bally_as2888_device::timer_as2888)); } //------------------------------------------------- @@ -138,34 +138,34 @@ void bally_as2888_device::device_add_mconfig(machine_config &config) void bally_as2888_device::device_start() { - save_item(NAME(m_sound_select)); - save_item(NAME(m_snd_sel)); - save_item(NAME(m_snd_tone_gen)); - save_item(NAME(m_snd_div)); + save_item(NAME(m_sound_select)); + save_item(NAME(m_snd_sel)); + save_item(NAME(m_snd_tone_gen)); + save_item(NAME(m_snd_div)); } TIMER_DEVICE_CALLBACK_MEMBER(bally_as2888_device::timer_s) { - m_snd_tone_gen--; + m_snd_tone_gen--; - if ((m_snd_tone_gen == 0) && (m_snd_sel != 0x01)) - { - m_snd_tone_gen = m_snd_sel; - m_snd_div++; + if ((m_snd_tone_gen == 0) && (m_snd_sel != 0x01)) + { + m_snd_tone_gen = m_snd_sel; + m_snd_div++; - m_discrete->write(NODE_04, BIT(m_snd_div, 2) * 1); - m_discrete->write(NODE_01, BIT(m_snd_div, 0) * 1); - } + m_discrete->write(NODE_04, BIT(m_snd_div, 2) * 1); + m_discrete->write(NODE_01, BIT(m_snd_div, 0) * 1); + } } TIMER_DEVICE_CALLBACK_MEMBER(bally_as2888_device::timer_as2888) { - m_snd_sel = m_snd_prom[m_sound_select]; - m_snd_sel = bitswap<8>(m_snd_sel,0,1,2,3,4,5,6,7); - m_snd_tone_gen = m_snd_sel; + m_snd_sel = m_snd_prom[m_sound_select]; + m_snd_sel = bitswap<8>(m_snd_sel,0,1,2,3,4,5,6,7); + m_snd_tone_gen = m_snd_sel; - m_discrete->write(NODE_08, 0); - m_snd_sustain_timer->adjust(attotime::never); + m_discrete->write(NODE_08, 0); + m_snd_sustain_timer->adjust(attotime::never); } @@ -177,19 +177,19 @@ TIMER_DEVICE_CALLBACK_MEMBER(bally_as2888_device::timer_as2888) // IO ports //************************************************************************** static INPUT_PORTS_START(as3022) - PORT_START("SW1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("SW1") PORT_CHANGED_MEMBER(DEVICE_SELF, bally_as3022_device, sw1, 0) + PORT_START("SW1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("SW1") PORT_CHANGED_MEMBER(DEVICE_SELF, bally_as3022_device, sw1, 0) INPUT_PORTS_END ioport_constructor bally_as3022_device::device_input_ports() const { - return INPUT_PORTS_NAME(as3022); + return INPUT_PORTS_NAME(as3022); } INPUT_CHANGED_MEMBER(bally_as3022_device::sw1) { - if (newval != oldval) - m_cpu->set_input_line(INPUT_LINE_NMI, (newval ? ASSERT_LINE : CLEAR_LINE)); + if (newval != oldval) + m_cpu->set_input_line(INPUT_LINE_NMI, (newval ? ASSERT_LINE : CLEAR_LINE)); } //------------------------------------------------- @@ -284,9 +284,9 @@ void bally_as3022_device::device_start() m_ay->set_volume(2, 0); save_item(NAME(m_bc1)); - save_item(NAME(m_bdir)); - save_item(NAME(m_sound_select)); - save_item(NAME(m_ay_data)); + save_item(NAME(m_bdir)); + save_item(NAME(m_sound_select)); + save_item(NAME(m_ay_data)); } @@ -438,19 +438,19 @@ WRITE8_MEMBER(bally_sounds_plus_device::vocalizer_pia_portb_w) // IO ports //************************************************************************** static INPUT_PORTS_START(cheap_squeak) - PORT_START("SW1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("SW1") PORT_CHANGED_MEMBER(DEVICE_SELF, bally_cheap_squeak_device, sw1, 0) + PORT_START("SW1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("SW1") PORT_CHANGED_MEMBER(DEVICE_SELF, bally_cheap_squeak_device, sw1, 0) INPUT_PORTS_END ioport_constructor bally_cheap_squeak_device::device_input_ports() const { - return INPUT_PORTS_NAME(cheap_squeak); + return INPUT_PORTS_NAME(cheap_squeak); } INPUT_CHANGED_MEMBER(bally_cheap_squeak_device::sw1) { - if (newval != oldval) - m_cpu->set_input_line(INPUT_LINE_NMI, (newval ? ASSERT_LINE : CLEAR_LINE)); + if (newval != oldval) + m_cpu->set_input_line(INPUT_LINE_NMI, (newval ? ASSERT_LINE : CLEAR_LINE)); } //------------------------------------------------- @@ -508,9 +508,9 @@ void bally_cheap_squeak_device::device_add_mconfig(machine_config &config) m_cpu->out_p2_cb().set(FUNC(bally_cheap_squeak_device::out_p2_cb)); ZN429E(config, "dac", 0).add_route(ALL_OUTPUTS, *this, 1.00, AUTO_ALLOC_INPUT, 0); - voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref")); - vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); - vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); + voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref")); + vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); + vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); } //------------------------------------------------- @@ -520,8 +520,8 @@ void bally_cheap_squeak_device::device_add_mconfig(machine_config &config) void bally_cheap_squeak_device::device_start() { m_sound_ack_w_handler.resolve(); - save_item(NAME(m_sound_select)); - save_item(NAME(m_sound_int)); + save_item(NAME(m_sound_select)); + save_item(NAME(m_sound_int)); } //------------------------------------------------- diff --git a/src/mame/audio/bally.h b/src/mame/audio/bally.h index 741c3c29d57..bd55fd6b40b 100644 --- a/src/mame/audio/bally.h +++ b/src/mame/audio/bally.h @@ -64,12 +64,12 @@ protected: const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, type, tag, owner, clock), - device_mixer_interface(mconfig, *this), + device_t(mconfig, type, tag, owner, clock), + device_mixer_interface(mconfig, *this), m_snd_prom(*this, "sound"), - m_discrete(*this, "discrete"), - m_timer_s_freq(*this, "timer_s_freq"), - m_snd_sustain_timer(*this, "timer_as2888") + m_discrete(*this, "discrete"), + m_timer_s_freq(*this, "timer_s_freq"), + m_snd_sustain_timer(*this, "timer_as2888") { } // device-level overrides @@ -78,20 +78,20 @@ protected: private: uint8_t m_sound_select; - uint8_t m_snd_sel; - uint8_t m_snd_tone_gen; - uint8_t m_snd_div; - required_region_ptr m_snd_prom; - required_device m_discrete; - required_device m_timer_s_freq; - required_device m_snd_sustain_timer; + uint8_t m_snd_sel; + uint8_t m_snd_tone_gen; + uint8_t m_snd_div; + required_region_ptr m_snd_prom; + required_device m_discrete; + required_device m_timer_s_freq; + required_device m_snd_sustain_timer; // internal communications TIMER_CALLBACK_MEMBER(sound_select_sync); TIMER_CALLBACK_MEMBER(sound_int_sync); - TIMER_DEVICE_CALLBACK_MEMBER(timer_s); - TIMER_DEVICE_CALLBACK_MEMBER(timer_as2888); + TIMER_DEVICE_CALLBACK_MEMBER(timer_s); + TIMER_DEVICE_CALLBACK_MEMBER(timer_as2888); }; @@ -122,11 +122,11 @@ protected: const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, type, tag, owner, clock), - device_mixer_interface(mconfig, *this), - m_cpu(*this, "cpu"), - m_pia(*this, "pia"), - m_ay(*this, "ay"), + device_t(mconfig, type, tag, owner, clock), + device_mixer_interface(mconfig, *this), + m_cpu(*this, "cpu"), + m_pia(*this, "pia"), + m_ay(*this, "ay"), m_mc3417(*this, "mc3417") { } @@ -217,9 +217,9 @@ protected: const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, type, tag, owner, clock), - device_mixer_interface(mconfig, *this), - m_cpu(*this, "cpu"), + device_t(mconfig, type, tag, owner, clock), + device_mixer_interface(mconfig, *this), + m_cpu(*this, "cpu"), m_dac(*this, "dac"), m_sound_ack_w_handler(*this) { } @@ -231,7 +231,7 @@ protected: // devices required_device m_cpu; - required_device m_dac; + required_device m_dac; private: uint8_t m_sound_select; diff --git a/src/mame/drivers/abc80.cpp b/src/mame/drivers/abc80.cpp index 3df8e40d942..e6fde30f2aa 100644 --- a/src/mame/drivers/abc80.cpp +++ b/src/mame/drivers/abc80.cpp @@ -60,10 +60,10 @@ Notes: DIPSW2 - ROM checksum program: - 10 FOR I%=0% TO 16383% - 20 A%=A%+PEEK(I%) - 30 NEXT I% - 40 ;A%; I% + 10 FOR I%=0% TO 16383% + 20 A%=A%+PEEK(I%) + 30 NEXT I% + 40 ;A%; I% */ /* diff --git a/src/mame/drivers/amaticmg.cpp b/src/mame/drivers/amaticmg.cpp index 5f251a75ae9..8cbe200e47f 100644 --- a/src/mame/drivers/amaticmg.cpp +++ b/src/mame/drivers/amaticmg.cpp @@ -610,7 +610,7 @@ READ8_MEMBER( amaticmg_state::touchm_r ) WRITE8_MEMBER( amaticmg_state::touchm_w ) { - m_tch->write(data & 1); + m_tch->write(data & 1); } WRITE8_MEMBER( amaticmg_state::rombank_w ) @@ -993,7 +993,7 @@ ROM_START( am_mg24 ) ROM_REGION( 0x4000, "proms", 0 ) ROM_LOAD( "m2061295.bin", 0x0000, 0x1c00, CRC(05f4a6af) SHA1(b14e9c80d3313fa5bf076d129a509a711d80f982) ) ROM_LOAD( "m2080196.bin", 0x2000, 0x1c00, CRC(8cf6c3a6) SHA1(6454077c2ab94093e878cbc1c0102bbb6c4bc367) ) - + ROM_REGION( 0x0248, "touch_m", 0 ) ROM_LOAD( "ds1994.bin", 0x0000, 0x0248, CRC(7f581301) SHA1(33b2652f053a5e09442ccaa078b5d245255bb415) ) ROM_END diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp index 51c1988ac6d..c373d28cc53 100644 --- a/src/mame/drivers/at.cpp +++ b/src/mame/drivers/at.cpp @@ -858,16 +858,16 @@ void at_state::comportii(machine_config &config) void at_state::n8810m15(machine_config &config) { ibm5170(config); - m_maincpu->set_clock(6000000); - subdevice("isa1")->set_default_option("cga"); + m_maincpu->set_clock(6000000); + subdevice("isa1")->set_default_option("cga"); } // Nixdorf 8810 M55 void at_state::n8810m55(machine_config &config) { ibm5170(config); - m_maincpu->set_clock(6000000); - subdevice("isa1")->set_default_option("ega"); + m_maincpu->set_clock(6000000); + subdevice("isa1")->set_default_option("ega"); } //************************************************************************** @@ -969,13 +969,13 @@ ROM_START( ibmps1es ) ROM_END ROM_START( at ) - ROM_REGION(0x20000,"bios", 0) + ROM_REGION(0x20000,"bios", 0) // 0: BIOS-String: ENET-1107-040990-K0 ROM_SYSTEM_BIOS(0, "ami211", "AMI 21.1") /*(Motherboard Manufacturer: Dataexpert Corp. Motherboard) (Neat 286 Bios, 82c21x Chipset ) (BIOS release date:: 09-04-1990)*/ ROMX_LOAD( "ami211.bin", 0x10000, 0x10000,CRC(a0b5d269) SHA1(44db8227d35a09e39b93ed944f85dcddb0dd0d39), ROM_BIOS(0)) // 1: BIOS-String: D286-0011-110387 ROM_SYSTEM_BIOS(1, "at", "PC 286") /*(Motherboard Manufacturer: Unknown.) (BIOS release date:: 03-11-1987)*/ - ROMX_LOAD( "at110387.1", 0x10001, 0x8000, CRC(679296a7) SHA1(ae891314cac614dfece686d8e1d74f4763cf40e3),ROM_SKIP(1) | ROM_BIOS(1) ) + ROMX_LOAD( "at110387.1", 0x10001, 0x8000, CRC(679296a7) SHA1(ae891314cac614dfece686d8e1d74f4763cf40e3),ROM_SKIP(1) | ROM_BIOS(1) ) ROMX_LOAD( "at110387.0", 0x10000, 0x8000, CRC(65ae1f97) SHA1(91a29c7deecf7a9afbba330e64e0eee9aafee4d1),ROM_SKIP(1) | ROM_BIOS(1) ) // 2: BIOS-String: S286-6181-101590-K0 ROM_SYSTEM_BIOS(2, "ami206", "AMI C 206.1") /*(Motherboard Manufacturer: Unknown.) (BIOS release date:: 15-10-1990)*/ @@ -1077,7 +1077,7 @@ ROM_START( atvga ) // 0: BIOS-String: 20-0001-001223-00101111-050591-KB-8042--0 ROM_SYSTEM_BIOS(0, "vl82c", "VL82C311L-FC4")/*(Motherboard Manufacturer: Biostar Microtech Corp.) (BIOS release date: 05-05-1991)*/ ROMX_LOAD( "2vlm001.bin", 0x10000, 0x10000, CRC(f34d800a) SHA1(638aca592a0e525f957beb525e95ca666a994ee8), ROM_BIOS(0) ) - // 1: same as BIOS '0' in at + // 1: same as BIOS '0' in at ROM_SYSTEM_BIOS(1, "ami211", "AMI 21.1") /*(Motherboard Manufacturer: Dataexpert Corp. Motherboard) (Neat 286 Bios, 82c21x Chipset ) (BIOS release date:: 09-04-1990)*/ ROMX_LOAD( "ami211.bin", 0x10000, 0x10000,CRC(a0b5d269) SHA1(44db8227d35a09e39b93ed944f85dcddb0dd0d39), ROM_BIOS(1)) // 2: same as BIOS '2' in at @@ -1565,7 +1565,7 @@ ROM_END // Commodore SL 386SX ROM_START( c386sx16 ) ROM_REGION(0x20000, "bios", 0) - // actual VGA BIOS not dumped - uses a WD Paradise according to http://www.cbmhardware.de/pc/pc.php + // actual VGA BIOS not dumped - uses a WD Paradise according to http://www.cbmhardware.de/pc/pc.php // complains "Time-of-day clock stopped" ROM_SYSTEM_BIOS(0, "c386sxv100", "SL 386SX V1.00") // Commodore 80386SX BIOS Rev. 1.00 - 390914-01/390915-01 - continuous beeps after POST ROMX_LOAD( "cbm-sl386sx-bios-lo-v1.0-390914-01.bin", 0x10000, 0x8000, CRC(03e00583) SHA1(8be8478cabd9de3d547a08207ffdcd39bf1bcd94), ROM_SKIP(1) | ROM_BIOS(0)) @@ -1576,10 +1576,10 @@ ROM_START( c386sx16 ) ROM_SYSTEM_BIOS(2, "c386sxv102", "SL 386SX V1.02") // Rev. 1.02 - 390914-03/390914-03/390915-03 ROMX_LOAD( "cbm-sl386sx-bios-lo-v1.02-390914-03-0300.bin", 0x10000, 0x8000, CRC(301eb832) SHA1(6c599792b254b6d98dc130040d4f7858fd504f15), ROM_SKIP(1) | ROM_BIOS(2)) ROMX_LOAD( "cbm-sl386sx-bios-hi-v1.02-390915-03-3800.bin", 0x10001, 0x8000, CRC(01815d9d) SHA1(0af291626e71ed65ff6dfee2fe4776a29f2bbb97), ROM_SKIP(1) | ROM_BIOS(2)) - ROM_SYSTEM_BIOS(3, "c386sxv103", "SL 386SX V1.03") // Commodore 80386SX BIOS Rev. 1.03 - + ROM_SYSTEM_BIOS(3, "c386sxv103", "SL 386SX V1.03") // Commodore 80386SX BIOS Rev. 1.03 - // this was replaced with the consistently named ROMs from http://www.zimmers.net/cbmpics/cpcs3.html, the 'hi' ROM looks like a bad dump, with its alternative the POST comes up // ROMX_LOAD( "390914-01.u39", 0x10000, 0x8000, CRC(8f849198) SHA1(550b04bac0d0807d6e95ec25391a81272779b41b), ROM_SKIP(1) | ROM_BIOS(3)) /* 390914-01 V1.03 CS-2100 U39 Copyright (C) 1990 CBM */ - // ROMX_LOAD( "390915-01.u38", 0x10001, 0x8000, CRC(ee4bad92) SHA1(6e02ef97a7ce336485814c06a1693bc099ce5cfb), ROM_SKIP(1) | ROM_BIOS(3)) /* 390915-01 V1.03 CS-2100 U38 Copyright (C) 1990 CBM */ + // ROMX_LOAD( "390915-01.u38", 0x10001, 0x8000, CRC(ee4bad92) SHA1(6e02ef97a7ce336485814c06a1693bc099ce5cfb), ROM_SKIP(1) | ROM_BIOS(3)) /* 390915-01 V1.03 CS-2100 U38 Copyright (C) 1990 CBM */ ROMX_LOAD( "cbm-sl386sx-bios-lo-v1.03-390914-03.bin", 0x10000, 0x8000, CRC(8f849198) SHA1(550b04bac0d0807d6e95ec25391a81272779b41b), ROM_SKIP(1) | ROM_BIOS(3)) ROMX_LOAD( "cbm-sl386sx-bios-hi-v1.03-390915-03.bin", 0x10001, 0x8000, CRC(ebdd5097) SHA1(2e4d2375efb9c1ebc0ccf3bb1ff2bb64c449af32), ROM_SKIP(1) | ROM_BIOS(3)) ROM_SYSTEM_BIOS(4, "c386sxv104", "SL 386SX V1.04") // Rev. 1.04 - 390914-04/390915-04 @@ -1588,7 +1588,7 @@ ROM_START( c386sx16 ) ROM_END // Commodore Laptop C386SX-LT - screen remains blank -ROM_START( c386sxlt ) +ROM_START( c386sxlt ) ROM_REGION(0x20000, "bios", 0) // BIOS contains Cirrus Logic VGA firmware, rebadged Sanyo MBC-18NB, but different versions exist ROM_SYSTEM_BIOS(0, "c386sxlt_b400", "C386SX-LT V1.2 B400") ROMX_LOAD( "cbm-386lt-bios-v1.2-390981-03-b400.bin", 0x00000, 0x20000, CRC(b84f6883) SHA1(3f31060726c7c49a891b35ab024524a4239eb4d0), ROM_BIOS(0)) @@ -1669,14 +1669,14 @@ ROM_START( pc50ii ) ROMX_LOAD( "cbm-pc50b-bios-lo-u32-v1.02-609200-03o-9e00.bin", 0x10001, 0x8000, CRC(57225c22) SHA1(3b2ded119480ce2dd5bb7c113c5814ce47e17d4c),ROM_SKIP(1) | ROM_BIOS(2)) ROMX_LOAD( "cbm-pc50b-bios-hi-u27-v1.02-609200-03e-c400.bin", 0x10000, 0x8000, CRC(4ec903af) SHA1(fb70e22c0538d7310c9034626d4d9c0e4f63dfd7),ROM_SKIP(1) | ROM_BIOS(2)) - // VGA BIOS + // VGA BIOS // ROM_LOAD( "m_pc50-ii_1bad_pvgadk_odd.bin", 0x00000, 0x8000, CRC(f36eca7e) SHA1(4335fa4a4567cbc010ff2ffeb97a536ed93b0219)) // ROM_LOAD( "m_pc50-ii_54e3_pvgadk_even.bin", 0x00001, 0x8000, CRC(01f6b964) SHA1(799a84ddde8a7672a6df9439bad6198ec3ff98ec)) ROM_END // Commodore PC-60-III - complaining "time-of-day-clock stopped" ROM_START( pc60iii ) - ROM_REGION(0x20000, "bios", 0) + ROM_REGION(0x20000, "bios", 0) // 0: Commodore PC60-III 80386 BIOS Rev. 1.2 - 390473-01/390474-01 ROM_SYSTEM_BIOS(0, "pc60iiiv12", "PC60-III V1.2") ROMX_LOAD( "cbm-pc60c-bios-lo_u73-v1.2-390473-01.bin", 0x00000, 0x10000, CRC(ff2cd8b3) SHA1(62e95f818c5016f4be2741872dc644999dee33ce),ROM_SKIP(1) | ROM_BIOS(0) ) @@ -1704,7 +1704,7 @@ ROM_START( pc60iii ) ROM_END // Commodore PC-70-III - complaining "time-of-day-clock stopped" -ROM_START( pc70iii ) +ROM_START( pc70iii ) ROM_REGION(0x20000, "bios", 0) // 0: Commodore 80486 BIOS Rev.1.00 - 390934-01/390935-01 ROM_SYSTEM_BIOS(0, "pc70v100", "PC70 V1.00") @@ -1993,17 +1993,17 @@ ROM_END // Compaq SLT/286 - complains about "102 - System board failure" ROM_START( comslt286 ) ROM_REGION(0x20000,"bios", 0) - ROM_LOAD16_BYTE( "compaq_slt286-bios-revision_j.2-even.bin", 0x10000, 0x8000, CRC(77e894e0) SHA1(e935e62e203ec67eaab198c15a36cc0078fd35b0)) + ROM_LOAD16_BYTE( "compaq_slt286-bios-revision_j.2-even.bin", 0x10000, 0x8000, CRC(77e894e0) SHA1(e935e62e203ec67eaab198c15a36cc0078fd35b0)) ROM_LOAD16_BYTE( "compaq_slt286-bios-revision_j.2-odd.bin", 0x10001, 0x8000, CRC(4a0febac) SHA1(7da5ac4bc50f25063a1d1e382b8cff9b297976f8)) ROM_END // Dell System 200 - complains about "memory overlap at 400000" but seems to work otherwise ROM_START( dsys200 ) ROM_REGION( 0x20000, "bios", 0 ) - ROM_LOAD16_BYTE( "version_3.10_a12_even.bin", 0x10000, 0x8000, CRC(5aa81939) SHA1(d9029d3708c49e72f57ae2a340429c28ec39acab)) + ROM_LOAD16_BYTE( "version_3.10_a12_even.bin", 0x10000, 0x8000, CRC(5aa81939) SHA1(d9029d3708c49e72f57ae2a340429c28ec39acab)) ROM_LOAD16_BYTE( "version_3.10_a12_odd.bin", 0x10001, 0x8000, CRC(942416cb) SHA1(b321704471e159030af82556ff25ac46c27a807e)) - ROM_REGION( 0x0800, "keyboard", 0 ) + ROM_REGION( 0x0800, "keyboard", 0 ) ROM_LOAD( "20575_b47-00.bin", 0x000, 0x0800, CRC(148187db) SHA1(0d7542dd0b2bc3d6724ae3618a8543cb84a30e92) ) ROM_END @@ -2076,22 +2076,22 @@ ROM_END // NCR, probably PC-8 - should get a "NGA" extended CGA graphics card once it's emulated ROM_START( ncrpc8 ) - ROM_REGION(0x20000, "bios", 0) + ROM_REGION(0x20000, "bios", 0) ROM_SYSTEM_BIOS(0, "pc8main", "NCR PC-8 mainboard") // large full size AT mainboard - Setup Version 2.3 ROMX_LOAD( "ncr_35117_u127_vers.4-2.bin", 0x10000, 0x8000, CRC(f4338669) SHA1(c1d6e714591c8d7ab966acfdbc3b463e06fbd073), ROM_SKIP(1) | ROM_BIOS(0)) ROMX_LOAD( "ncr_35116_u113_vers.4-2.bin", 0x10001, 0x8000, CRC(b1b6a2e2) SHA1(5b2c0a2be59e064076ed757d84f61bf955ceca08), ROM_SKIP(1) | ROM_BIOS(0)) ROM_SYSTEM_BIOS(1, "pc8card", "NCR PC-8 CPU card") // passive backplane and CPU card - Setup Version 2.1 ROMX_LOAD( "ncr_u127-30_v.4.bin", 0x10000, 0x8000, CRC(33121525) SHA1(11f8d8af4dad432f558c646d7d0ff23eb642a815), ROM_SKIP(1) | ROM_BIOS(1)) ROMX_LOAD( "ncr_u113-27_v.4.bin", 0x10001, 0x8000, CRC(87424492) SHA1(5b7aba5678fe55c81fee2e07730b8ae03a23160f), ROM_SKIP(1) | ROM_BIOS(1)) - ROM_REGION( 0x0800, "keyboard", 0 ) + ROM_REGION( 0x0800, "keyboard", 0 ) ROM_LOAD ("ncr_keyboard_mcu_35091.bin", 0x0000, 0x800, CRC(632556cc) SHA1(b35f30bd0664fc1c2775a594f248d1e30237900a)) ROM_END // Nixdorf 8810 M15 Laptop - PC07 - boot from harddisk doesn't work ROM_START( n8810m15 ) // ROM_LOAD("charagene_v1.1_daft2c2.bin", 0x00000, 0x4000, CRC(dd324efd) SHA1(67fd91277733596bfad8506dc92d9f776e563dda)) // CGA chargen - - ROM_REGION(0x20000, "bios", 0 ) + + ROM_REGION(0x20000, "bios", 0 ) ROM_LOAD16_BYTE( "rbios_even_daft2a3.bin", 0x10000, 0x8000, CRC(790abf68) SHA1(fbdb5e628ee9a605c8c1485a3fbb67736ff03153)) ROM_LOAD16_BYTE( "rbios_odd_daft2b3.bin", 0x10001, 0x8000, CRC(b09a812a) SHA1(c1b3321715260f9cd8c810325dc10c674ea05174)) ROM_END @@ -2099,20 +2099,20 @@ ROM_END // Nixdorf 8810 M16 Laptop - PC17 - CGA version - boot from harddisk doesn't work ROM_START( n8810m16c ) // ROM_LOAD("201cg rev 1.0.u78", 0x00000, 0x4000, CRC(3e31143b) SHA1(489da357e0ab8a469a3fb81cce160637486c87bc)) // CGA chargen - ROM_REGION(0x20000, "bios", 0 ) + ROM_REGION(0x20000, "bios", 0 ) ROM_LOAD16_BYTE( "nmc27c256.u35", 0x10000, 0x8000, CRC(51acd116) SHA1(1a0bf24af4eba48d0deb0132a523e131902d2bcd)) ROM_LOAD16_BYTE( "nmc27c256.u36", 0x10001, 0x8000, CRC(fb47f9da) SHA1(d9bd4aea850a83764454a5c86c8da09f7c640fd6)) - ROM_REGION( 0x0800, "keyboard", 0 ) + ROM_REGION( 0x0800, "keyboard", 0 ) ROM_LOAD( "d8749h.u69", 0x000, 0x0800, CRC(030051da) SHA1(91b60228452cd1d6af99786402bd3b4d3efc2f05) ) ROM_END // Nixdorf 8810 M16 Laptop - PC17 - VGA version - boot from harddisk doesn't work ROM_START( n8810m16v ) // ROM_LOAD("8810m16vga_27c256_221vb_123g1.bin", 0x00000, 0x4000, CRC(3bc80739) SHA1(3d6d7fb01681eccbc0b560818654d5aa1e3c5230)) // C&T VGA BIOS for 82C455 - ROM_REGION(0x20000, "bios", 0 ) + ROM_REGION(0x20000, "bios", 0 ) ROM_LOAD16_BYTE( "8810m16vga_27c256_286bios_a2531511_a.bin", 0x10000, 0x8000, CRC(1de5e49b) SHA1(759878e13801278de96700bbef318a49cca68054)) ROM_LOAD16_BYTE( "8810m16vga_27c256_286bios_a2531511_b.bin", 0x10001, 0x8000, CRC(a65cf1f8) SHA1(30d46b49e87f272540e24a278848122b3c40bdaf)) - ROM_REGION( 0x0800, "keyboard", 0 ) + ROM_REGION( 0x0800, "keyboard", 0 ) ROM_LOAD( "8810m16vga_8749_201kb_rev3a.bin", 0x000, 0x0800, CRC(030051da) SHA1(91b60228452cd1d6af99786402bd3b4d3efc2f05) ) ROM_END @@ -2124,7 +2124,7 @@ ROM_END // Nixdorf 8810 M55 ROM_START( n8810m55 ) - ROM_REGION(0x20000, "bios", 0 ) + ROM_REGION(0x20000, "bios", 0 ) ROM_LOAD16_BYTE( "150-3872_u113_27_4.5.1.bin", 0x10001, 0x8000, CRC(35ff4fba) SHA1(557f0f98c27af76f6fa6990592e7150f5fc1fc02)) ROM_LOAD16_BYTE( "150-3873_u127_30_4.5.1.bin", 0x10000, 0x8000, CRC(5a7e6643) SHA1(f3890919a772eead7232bd227b2c8677377f6e24)) ROM_END @@ -2132,9 +2132,9 @@ ROM_END // Olivetti M290 - has an Olivetti branded Paradise VGA - locks up with "Error 2" and a key symbol ROM_START( m290 ) ROM_REGION( 0x20000, "bios", 0 ) - ROM_LOAD( "m290_pep3_1.25.bin", 0x10000, 0x10000, CRC(cb57d677) SHA1(4bdf5c52567c129b413c866c63b5fb3562fccd23)) + ROM_LOAD( "m290_pep3_1.25.bin", 0x10000, 0x10000, CRC(cb57d677) SHA1(4bdf5c52567c129b413c866c63b5fb3562fccd23)) - ROM_REGION( 0x0800, "keyboard", 0 ) + ROM_REGION( 0x0800, "keyboard", 0 ) ROM_LOAD( "m290_csl0_1.10.bin", 0x000, 0x0800, CRC(d767d496) SHA1(84246f7b39e0a005425948931cf93624b831e121) ) ROM_END @@ -2170,7 +2170,7 @@ ROM_END // complains about "Pointer device failure" and "Memory failure at 00100000, read AA55 expecting 002C ROM_START( pcd4nl ) ROM_REGION( 0x20000, "bios", 0 ) - ROM_LOAD( "pcd4nl.bin", 0x00000, 0x20000, CRC(8adb4900) SHA1(a01c665fed769ff815bc2e5ae30901f7e12d721b) ) + ROM_LOAD( "pcd4nl.bin", 0x00000, 0x20000, CRC(8adb4900) SHA1(a01c665fed769ff815bc2e5ae30901f7e12d721b) ) ROM_END // Siemens-Nixdorf PCD-4ND 486 notebook - display remains blank @@ -2202,7 +2202,7 @@ ROM_END // Video board: Cirrus Logic CL-GD610 + CL-GD620 + CL-GD63 ROM_START( walk386dx ) ROM_REGION( 0x20000, "bios", 0 ) // contains Cirrus Logic VGA BIOS - ROM_LOAD( "am28f010_ctaa060125rc.bin", 0x00000, 0x20000, CRC(6cc540fe) SHA1(9853793d5433bbc5efc09c7f31c4a8a8f78d4549) ) + ROM_LOAD( "am28f010_ctaa060125rc.bin", 0x00000, 0x20000, CRC(6cc540fe) SHA1(9853793d5433bbc5efc09c7f31c4a8a8f78d4549) ) ROM_REGION( 0x2000, "mcu", 0 ) ROM_LOAD( "cthj02_03_76.bin", 0x0000, 0x2000, NO_DUMP ) diff --git a/src/mame/drivers/bnstars.cpp b/src/mame/drivers/bnstars.cpp index ebf7c33c849..1ca4030d50a 100644 --- a/src/mame/drivers/bnstars.cpp +++ b/src/mame/drivers/bnstars.cpp @@ -702,26 +702,26 @@ INPUT_PORTS_END /* sprites are contained in 256x256 "tiles" */ -static const uint32_t sprite_xoffset[256] = +static const uint32_t sprite_xoffset[256] = { - STEP8(8*8*8*0, 8), STEP8(8*8*8*1, 8), STEP8(8*8*8*2, 8), STEP8(8*8*8*3, 8), - STEP8(8*8*8*4, 8), STEP8(8*8*8*5, 8), STEP8(8*8*8*6, 8), STEP8(8*8*8*7, 8), - STEP8(8*8*8*8, 8), STEP8(8*8*8*9, 8), STEP8(8*8*8*10, 8), STEP8(8*8*8*11, 8), - STEP8(8*8*8*12, 8), STEP8(8*8*8*13, 8), STEP8(8*8*8*14, 8), STEP8(8*8*8*15, 8), - STEP8(8*8*8*16, 8), STEP8(8*8*8*17, 8), STEP8(8*8*8*18, 8), STEP8(8*8*8*19, 8), - STEP8(8*8*8*20, 8), STEP8(8*8*8*21, 8), STEP8(8*8*8*22, 8), STEP8(8*8*8*23, 8), - STEP8(8*8*8*24, 8), STEP8(8*8*8*25, 8), STEP8(8*8*8*26, 8), STEP8(8*8*8*27, 8), + STEP8(8*8*8*0, 8), STEP8(8*8*8*1, 8), STEP8(8*8*8*2, 8), STEP8(8*8*8*3, 8), + STEP8(8*8*8*4, 8), STEP8(8*8*8*5, 8), STEP8(8*8*8*6, 8), STEP8(8*8*8*7, 8), + STEP8(8*8*8*8, 8), STEP8(8*8*8*9, 8), STEP8(8*8*8*10, 8), STEP8(8*8*8*11, 8), + STEP8(8*8*8*12, 8), STEP8(8*8*8*13, 8), STEP8(8*8*8*14, 8), STEP8(8*8*8*15, 8), + STEP8(8*8*8*16, 8), STEP8(8*8*8*17, 8), STEP8(8*8*8*18, 8), STEP8(8*8*8*19, 8), + STEP8(8*8*8*20, 8), STEP8(8*8*8*21, 8), STEP8(8*8*8*22, 8), STEP8(8*8*8*23, 8), + STEP8(8*8*8*24, 8), STEP8(8*8*8*25, 8), STEP8(8*8*8*26, 8), STEP8(8*8*8*27, 8), STEP8(8*8*8*28, 8), STEP8(8*8*8*29, 8), STEP8(8*8*8*30, 8), STEP8(8*8*8*31, 8) }; -static const uint32_t sprite_yoffset[256] = +static const uint32_t sprite_yoffset[256] = { - STEP8(8*8*8*0, 8*8), STEP8(8*8*8*32, 8*8), STEP8(8*8*8*64, 8*8), STEP8(8*8*8*96, 8*8), - STEP8(8*8*8*128,8*8), STEP8(8*8*8*160,8*8), STEP8(8*8*8*192,8*8), STEP8(8*8*8*224,8*8), - STEP8(8*8*8*256,8*8), STEP8(8*8*8*288,8*8), STEP8(8*8*8*320,8*8), STEP8(8*8*8*352,8*8), - STEP8(8*8*8*384,8*8), STEP8(8*8*8*416,8*8), STEP8(8*8*8*448,8*8), STEP8(8*8*8*480,8*8), - STEP8(8*8*8*512,8*8), STEP8(8*8*8*544,8*8), STEP8(8*8*8*576,8*8), STEP8(8*8*8*608,8*8), - STEP8(8*8*8*640,8*8), STEP8(8*8*8*672,8*8), STEP8(8*8*8*704,8*8), STEP8(8*8*8*736,8*8), - STEP8(8*8*8*768,8*8), STEP8(8*8*8*800,8*8), STEP8(8*8*8*832,8*8), STEP8(8*8*8*864,8*8), + STEP8(8*8*8*0, 8*8), STEP8(8*8*8*32, 8*8), STEP8(8*8*8*64, 8*8), STEP8(8*8*8*96, 8*8), + STEP8(8*8*8*128,8*8), STEP8(8*8*8*160,8*8), STEP8(8*8*8*192,8*8), STEP8(8*8*8*224,8*8), + STEP8(8*8*8*256,8*8), STEP8(8*8*8*288,8*8), STEP8(8*8*8*320,8*8), STEP8(8*8*8*352,8*8), + STEP8(8*8*8*384,8*8), STEP8(8*8*8*416,8*8), STEP8(8*8*8*448,8*8), STEP8(8*8*8*480,8*8), + STEP8(8*8*8*512,8*8), STEP8(8*8*8*544,8*8), STEP8(8*8*8*576,8*8), STEP8(8*8*8*608,8*8), + STEP8(8*8*8*640,8*8), STEP8(8*8*8*672,8*8), STEP8(8*8*8*704,8*8), STEP8(8*8*8*736,8*8), + STEP8(8*8*8*768,8*8), STEP8(8*8*8*800,8*8), STEP8(8*8*8*832,8*8), STEP8(8*8*8*864,8*8), STEP8(8*8*8*896,8*8), STEP8(8*8*8*928,8*8), STEP8(8*8*8*960,8*8), STEP8(8*8*8*992,8*8) }; static const gfx_layout spritelayout = diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp index e7b5c3c7328..2536ac78f6f 100644 --- a/src/mame/drivers/by35.cpp +++ b/src/mame/drivers/by35.cpp @@ -208,8 +208,8 @@ private: optional_device m_as3022; optional_device m_sounds_plus; optional_device m_cheap_squeak; - devcb_write8 m_sound_select_handler; - devcb_write_line m_sound_int_handler; + devcb_write8 m_sound_select_handler; + devcb_write_line m_sound_int_handler; }; class playboy_state : public by35_state @@ -440,7 +440,7 @@ static INPUT_PORTS_START( by35 ) INPUT_PORTS_END /* - Dips for os35 - Harlem Globetrotters, Dolly, Future Spa, Nitro Ground Shaker, Silverball Mania, Space Invaders, Rolling Stones, Mystic, Hotdoggin', Viking + Dips for os35 - Harlem Globetrotters, Dolly, Future Spa, Nitro Ground Shaker, Silverball Mania, Space Invaders, Rolling Stones, Mystic, Hotdoggin', Viking */ static INPUT_PORTS_START ( by35_os35 ) PORT_INCLUDE( by35 ) @@ -521,7 +521,7 @@ static INPUT_PORTS_START ( by35_os35 ) PORT_DIPSETTING( 0x1f, "2 Coins/15 Credits") PORT_DIPNAME( 0x20, 0x00, "S14 (game specific)") PORT_DIPLOCATION("SW1:!6") PORT_DIPSETTING( 0x00, DEF_STR( Off )) - PORT_DIPSETTING( 0x20, DEF_STR( On )) + PORT_DIPSETTING( 0x20, DEF_STR( On )) PORT_DIPNAME( 0x40, 0x00, "S15 (game specific)") PORT_DIPLOCATION("SW1:!7") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x40, DEF_STR( On )) @@ -585,7 +585,7 @@ static INPUT_PORTS_START ( by35_os35 ) INPUT_PORTS_END /* - Dips for os40 - Skateball, Frontier, Xenon + Dips for os40 - Skateball, Frontier, Xenon */ static INPUT_PORTS_START( by35_os40 ) PORT_INCLUDE( by35 ) @@ -716,10 +716,10 @@ static INPUT_PORTS_START( by35_os40 ) PORT_DIPSETTING( 0x02, "25") PORT_DIPSETTING( 0x03, "40") PORT_DIPNAME( 0xc0, 0x00, "Balls Per Game") PORT_DIPLOCATION("SW3:!7,!8") - PORT_DIPSETTING( 0x40, "5") - PORT_DIPSETTING( 0x80, "4") - PORT_DIPSETTING( 0x00, "3") - PORT_DIPSETTING( 0xc0, "2") + PORT_DIPSETTING( 0x40, "5") + PORT_DIPSETTING( 0x80, "4") + PORT_DIPSETTING( 0x00, "3") + PORT_DIPSETTING( 0xc0, "2") PORT_DIPNAME( 0x08, 0x08, "Match Feature") PORT_DIPLOCATION("SW3:!4") PORT_DIPSETTING( 0x00, DEF_STR( Off )) PORT_DIPSETTING( 0x08, DEF_STR( On )) @@ -735,9 +735,9 @@ static INPUT_PORTS_START( by35_os40 ) INPUT_PORTS_END /* - Dips for os5x - Flash Gordon to Cybernaut + Dips for os5x - Flash Gordon to Cybernaut */ -static INPUT_PORTS_START( by35_os5x ) +static INPUT_PORTS_START( by35_os5x ) PORT_INCLUDE( by35_os40 ) PORT_MODIFY("DSW0") diff --git a/src/mame/drivers/c64.cpp b/src/mame/drivers/c64.cpp index 3ee9f47869b..c4792ae2780 100644 --- a/src/mame/drivers/c64.cpp +++ b/src/mame/drivers/c64.cpp @@ -230,18 +230,18 @@ static const struct dasm_zeropage_data c64_zeropage_locations[] = { { 0x00, "D6510" }, { 0x01, "R6510" }, { 0x03, "ADRAY1" }, { 0x05, "ADRAY2" }, { 0x07, "CHARAC" }, { 0x08, "ENDCHR" }, { 0x09, "TRMPOS" }, { 0x0a, "VERCK" }, { 0x0b, "COUNT" }, { 0x0c, "DIMFLG" }, { 0x0d, "VALTYP" }, { 0x0e, "INTFLG" }, { 0x0f, "GARBFL" }, { 0x10, "SUBFLG" }, { 0x11, "INPFLG" }, { 0x12, "TANSGN" }, - { 0x14, "LINNUM" }, { 0x16, "TEMPPT" }, { 0x17, "LASTPT" }, { 0x19, "TEMPST" }, { 0x22, "INDEX" }, { 0x26, "RESHO" }, { 0x2b, "TXTTAB" }, { 0x2d, "VARTAB" }, - { 0x2f, "ARYTAB" }, { 0x31, "STREND" }, { 0x33, "FRETOP" }, { 0x35, "FRESPC" }, { 0x37, "MEMSIZ" }, { 0x39, "CURLIN" }, { 0x3b, "OLDLIN" }, { 0x3d, "OLDTXT" }, - { 0x3f, "DATLIN" }, { 0x41, "DATPTR" }, { 0x43, "INPPTR" }, { 0x45, "VARNAM" }, { 0x47, "VARPNT" }, { 0x49, "FORPNT" }, { 0x61, "FACEXP" }, { 0x62, "FACHO" }, - { 0x66, "FACSGN" }, { 0x67, "SGNFLG" }, { 0x68, "BITS" }, { 0x69, "ARGEXP" }, { 0x6a, "ARGHO" }, { 0x6e, "ARGSGN" }, { 0x6f, "ARISGN" }, { 0x70, "FACOV" }, + { 0x14, "LINNUM" }, { 0x16, "TEMPPT" }, { 0x17, "LASTPT" }, { 0x19, "TEMPST" }, { 0x22, "INDEX" }, { 0x26, "RESHO" }, { 0x2b, "TXTTAB" }, { 0x2d, "VARTAB" }, + { 0x2f, "ARYTAB" }, { 0x31, "STREND" }, { 0x33, "FRETOP" }, { 0x35, "FRESPC" }, { 0x37, "MEMSIZ" }, { 0x39, "CURLIN" }, { 0x3b, "OLDLIN" }, { 0x3d, "OLDTXT" }, + { 0x3f, "DATLIN" }, { 0x41, "DATPTR" }, { 0x43, "INPPTR" }, { 0x45, "VARNAM" }, { 0x47, "VARPNT" }, { 0x49, "FORPNT" }, { 0x61, "FACEXP" }, { 0x62, "FACHO" }, + { 0x66, "FACSGN" }, { 0x67, "SGNFLG" }, { 0x68, "BITS" }, { 0x69, "ARGEXP" }, { 0x6a, "ARGHO" }, { 0x6e, "ARGSGN" }, { 0x6f, "ARISGN" }, { 0x70, "FACOV" }, { 0x71, "FBUFPT" }, { 0x73, "CHRGET" }, { 0x79, "CHRGOT" }, { 0x7a, "TXTPTR" }, { 0x8b, "RNDX" }, { 0x90, "STATUS" }, { 0x91, "STKEY" }, { 0x92, "SVXT" }, - { 0x93, "VERCK" }, { 0x94, "C3PO" }, { 0x95, "BSOUR" }, { 0x96, "SYNO" }, { 0x98, "LDTND" }, { 0x99, "DFLTN" }, { 0x9a, "DFLTO" }, { 0x9b, "PRTY" }, - { 0x9c, "DPSW" }, { 0x9d, "MSGFLG" }, { 0x9e, "PTR1" }, { 0x9f, "PTR2" }, { 0xa0, "TIME" }, { 0xa5, "CNTDN" }, { 0xa6, "BUFPNT" }, { 0xa7, "INBIT" }, - { 0xa8, "BITCI" }, { 0xa9, "RINONE" }, { 0xaa, "RIDATA" }, { 0xab, "RIPRTY" }, { 0xac, "SAL" }, { 0xae, "EAL" }, { 0xb0, "CMPO" }, { 0xb2, "TAPE1" }, - { 0xb4, "BITTS" }, { 0xb5, "NXTBIT" }, { 0xb6, "RODATA" }, { 0xb7, "FNLEN" }, { 0xb8, "LA" }, { 0xb9, "SA" }, { 0xba, "FA" }, { 0xbb, "FNADR" }, - { 0xbc, "ROPRTY" }, { 0xbe, "FSBLK" }, { 0xbf, "MYCH" }, { 0xc0, "CAS1" }, { 0xc1, "STAL" }, { 0xc3, "MEMUSS" }, { 0xc5, "LSTX" }, { 0xc6, "NDX" }, - { 0xc7, "RVS" }, { 0xc8, "INDX" }, { 0xc9, "LXSP" }, { 0xcb, "SFDX" }, { 0xcc, "BLNSW" }, { 0xcd, "BLNCT" }, { 0xce, "GDBLN" }, { 0xcf, "BLNON" }, - { 0xd0, "CRSW" }, { 0xd1, "PNT" }, { 0xd3, "PNTR" }, { 0xd4, "QTSW" }, { 0xd5, "LNMX" }, { 0xd6, "TBLX" }, { 0xd8, "INSRT" }, { 0xd9, "LDTB1" }, + { 0x93, "VERCK" }, { 0x94, "C3PO" }, { 0x95, "BSOUR" }, { 0x96, "SYNO" }, { 0x98, "LDTND" }, { 0x99, "DFLTN" }, { 0x9a, "DFLTO" }, { 0x9b, "PRTY" }, + { 0x9c, "DPSW" }, { 0x9d, "MSGFLG" }, { 0x9e, "PTR1" }, { 0x9f, "PTR2" }, { 0xa0, "TIME" }, { 0xa5, "CNTDN" }, { 0xa6, "BUFPNT" }, { 0xa7, "INBIT" }, + { 0xa8, "BITCI" }, { 0xa9, "RINONE" }, { 0xaa, "RIDATA" }, { 0xab, "RIPRTY" }, { 0xac, "SAL" }, { 0xae, "EAL" }, { 0xb0, "CMPO" }, { 0xb2, "TAPE1" }, + { 0xb4, "BITTS" }, { 0xb5, "NXTBIT" }, { 0xb6, "RODATA" }, { 0xb7, "FNLEN" }, { 0xb8, "LA" }, { 0xb9, "SA" }, { 0xba, "FA" }, { 0xbb, "FNADR" }, + { 0xbc, "ROPRTY" }, { 0xbe, "FSBLK" }, { 0xbf, "MYCH" }, { 0xc0, "CAS1" }, { 0xc1, "STAL" }, { 0xc3, "MEMUSS" }, { 0xc5, "LSTX" }, { 0xc6, "NDX" }, + { 0xc7, "RVS" }, { 0xc8, "INDX" }, { 0xc9, "LXSP" }, { 0xcb, "SFDX" }, { 0xcc, "BLNSW" }, { 0xcd, "BLNCT" }, { 0xce, "GDBLN" }, { 0xcf, "BLNON" }, + { 0xd0, "CRSW" }, { 0xd1, "PNT" }, { 0xd3, "PNTR" }, { 0xd4, "QTSW" }, { 0xd5, "LNMX" }, { 0xd6, "TBLX" }, { 0xd8, "INSRT" }, { 0xd9, "LDTB1" }, { 0xf3, "USER" }, { 0xf5, "KEYTAB" }, { 0xf7, "RIBUF" }, { 0xf9, "ROBUF" }, { 0xfb, "FREKZB" }, { 0xff, "BASZPT" } }; @@ -251,7 +251,7 @@ static const struct dasm_vector_data cbm_kernal_vectors[] = { 0xff99, "MEMTOP" }, { 0xff9c, "MEMBOT" }, { 0xff9f, "SCNKEY" }, { 0xffa2, "SETTMO" }, { 0xffa5, "ACPTR" }, { 0xffa8, "CIOUT" }, { 0xffab, "UNTALK" }, { 0xffae, "UNLSN" }, { 0xffb1, "LISTEN" }, { 0xffb4, "TALK" }, { 0xffb7, "READST" }, { 0xffba, "SETLFS" }, { 0xffbd, "SETNAM" }, { 0xffc3, "CLOSE" }, { 0xffc6, "CHKIN" }, { 0xffc9, "CHKOUT" }, { 0xffcc, "CLRCHN" }, { 0xffcf, "CHRIN" }, { 0xffd2, "CHROUT" }, { 0xffd5, "LOAD" }, { 0xffd8, "SAVE" }, { 0xffdb, "SETTIM" }, { 0xffde, "RDTIM" }, { 0xffe1, "STOP" }, - { 0xffe4, "GETIN" }, { 0xffe7, "CLALL" }, { 0xffea, "UDTIM" }, { 0xffed, "SCREEN" }, { 0xfff0, "PLOT" }, { 0xfff3, "IOBASE" } + { 0xffe4, "GETIN" }, { 0xffe7, "CLALL" }, { 0xffea, "UDTIM" }, { 0xffed, "SCREEN" }, { 0xfff0, "PLOT" }, { 0xfff3, "IOBASE" } }; offs_t c64_state::dasm_override(std::ostream &stream, offs_t pc, const util::disasm_interface::data_buffer &opcodes, const util::disasm_interface::data_buffer ¶ms) @@ -325,7 +325,7 @@ offs_t c64_state::dasm_zeropage(std::ostream &stream, offs_t pc, const util::dis { int item = 0; u8 operand = opcodes.r8(pc+1); - + while (c64_zeropage_locations[item].addr != 0xff) { if (c64_zeropage_locations[item].addr == operand) @@ -345,7 +345,7 @@ offs_t c64_state::dasm_vector(std::ostream &stream, offs_t pc, const util::disas { int item = 0; u16 operand = opcodes.r16(pc+1); - + while (cbm_kernal_vectors[item].addr != 0xfff3) { if (cbm_kernal_vectors[item].addr == operand) @@ -365,7 +365,7 @@ offs_t c64_state::dasm_zeropage_vector(std::ostream &stream, offs_t pc, const ut { int item = 0; u16 operand = opcodes.r16(pc+1); - + if (operand < 0x100) { while (c64_zeropage_locations[item].addr != 0xff) diff --git a/src/mame/drivers/cntsteer.cpp b/src/mame/drivers/cntsteer.cpp index 95ec8b335d3..b03ffb98e8c 100644 --- a/src/mame/drivers/cntsteer.cpp +++ b/src/mame/drivers/cntsteer.cpp @@ -474,7 +474,7 @@ WRITE8_MEMBER(cntsteer_state::cntsteer_vregs_w) case 0: m_scrolly = data; break; case 1: m_scrollx = data; break; case 2: m_bg_bank = (data & 0x01) << 9; - // TODO: this may be shuffled + // TODO: this may be shuffled // 4 -> title screen (correct?) // 0 -> gameplay (supposedly a 2 is better) // needs to know what it tries to write after stage 1 ... diff --git a/src/mame/drivers/cps2.cpp b/src/mame/drivers/cps2.cpp index 0e859d82d18..7f1f361da2b 100644 --- a/src/mame/drivers/cps2.cpp +++ b/src/mame/drivers/cps2.cpp @@ -923,9 +923,9 @@ void cps2_state::cps2_map(address_map &map) map(0x400000, 0x40000b).ram().share("output"); /* CPS2 object output */ map(0x618000, 0x619fff).rw(FUNC(cps2_state::qsound_sharedram1_r), FUNC(cps2_state::qsound_sharedram1_w)); /* Q RAM */ map(0x660000, 0x663fff).ram(); /* When bit 14 of 0x804030 equals 0 this space is available. Many games store highscores and other info here if available. */ - // map(0x662000, 0x662001).ram(); /* Network adapter related, accessed in SSF2TB */ - // map(0x662008, 0x662009).ram(); /* Network adapter related, accessed in SSF2TB */ - // map(0x662020, 0x662021).ram(); /* Network adapter related, accessed in SSF2TB */ + // map(0x662000, 0x662001).ram(); /* Network adapter related, accessed in SSF2TB */ + // map(0x662008, 0x662009).ram(); /* Network adapter related, accessed in SSF2TB */ + // map(0x662020, 0x662021).ram(); /* Network adapter related, accessed in SSF2TB */ map(0x664000, 0x664001).ram(); /* Unknown - Only used if 0x660000-0x663fff available (could be RAM enable?) */ map(0x700000, 0x701fff).w(FUNC(cps2_state::cps2_objram1_w)).share("objram1"); /* Object RAM, no game seems to use it directly */ map(0x708000, 0x709fff).mirror(0x006000).rw(FUNC(cps2_state::cps2_objram2_r), FUNC(cps2_state::cps2_objram2_w)).share("objram2"); /* Object RAM */ @@ -956,9 +956,9 @@ void cps2_state::dead_cps2_map(address_map &map) map(0x400000, 0x40000b).ram().share("output"); /* CPS2 object output */ map(0x618000, 0x619fff).rw(FUNC(cps2_state::qsound_sharedram1_r), FUNC(cps2_state::qsound_sharedram1_w)); /* Q RAM */ map(0x660000, 0x663fff).ram(); /* When bit 14 of 0x804030 equals 0 this space is available. Many games store highscores and other info here if available. */ - // map(0x662000, 0x662001).ram(); /* Network adapter related, accessed in SSF2TB */ - // map(0x662008, 0x662009).ram(); /* Network adapter related, accessed in SSF2TB */ - // map(0x662020, 0x662021).ram(); /* Network adapter related, accessed in SSF2TB */ + // map(0x662000, 0x662001).ram(); /* Network adapter related, accessed in SSF2TB */ + // map(0x662008, 0x662009).ram(); /* Network adapter related, accessed in SSF2TB */ + // map(0x662020, 0x662021).ram(); /* Network adapter related, accessed in SSF2TB */ map(0x664000, 0x664001).ram(); /* Unknown - Only used if 0x660000-0x663fff available (could be RAM enable?) */ map(0x700000, 0x701fff).w(FUNC(cps2_state::cps2_objram1_w)).share("objram1"); /* Object RAM, no game seems to use it directly */ map(0x708000, 0x709fff).mirror(0x006000).rw(FUNC(cps2_state::cps2_objram2_r), FUNC(cps2_state::cps2_objram2_w)).share("objram2"); /* Object RAM */ diff --git a/src/mame/drivers/daryde.cpp b/src/mame/drivers/daryde.cpp index 1501cdbf24e..c985cc49f32 100644 --- a/src/mame/drivers/daryde.cpp +++ b/src/mame/drivers/daryde.cpp @@ -102,7 +102,7 @@ ROM_END /* Daryde Cricket PCB __________________________________________________ | ___________________ ___________________ | - | |_CN13 (12 pins)__| |___CN (12 pins)__| | + | |_CN13 (12 pins)__| |___CN (12 pins)__| | | ___ __ | | _______ |H606016 ____ |C|| |__ |74LS273N |XTAL |N|| @@ -137,8 +137,8 @@ ROM_START(cricket) ROM_REGION(0x22e, "pal", 0) ROM_LOAD("a_palce16v8h.ic4", 0x000, 0x117, NO_DUMP) ROM_LOAD("b_palce16v8h.ic5", 0x117, 0x117, NO_DUMP) - - ROM_REGION(0x2000, "nvram", 0) + + ROM_REGION(0x2000, "nvram", 0) ROM_LOAD("ds1225y.ic7", 0x0000, 0x2000, BAD_DUMP CRC(3a7f0f6f) SHA1(b672859399db854bc049c75beea482b5afb3d2bb)) // NVRAM dumped from a working machine, but may not be the default ROM_END diff --git a/src/mame/drivers/jaguar.cpp b/src/mame/drivers/jaguar.cpp index 8632e02cf1c..5709b56e80b 100644 --- a/src/mame/drivers/jaguar.cpp +++ b/src/mame/drivers/jaguar.cpp @@ -1382,7 +1382,7 @@ void jaguar_state::m68020_map(address_map &map) map(0xa30000, 0xa30003).w("watchdog", FUNC(watchdog_timer_device::reset32_w)); map(0xa40000, 0xa40003).w(FUNC(jaguar_state::eeprom_enable_w)); map(0xb70000, 0xb70003).rw(FUNC(jaguar_state::misc_control_r), FUNC(jaguar_state::misc_control_w)); -// map(0xc00000, 0xdfffff).bankr("mainsndbank"); +// map(0xc00000, 0xdfffff).bankr("mainsndbank"); map(0xe00030, 0xe0003f).rw(m_ide, FUNC(vt83c461_device::config_r), FUNC(vt83c461_device::config_w)); map(0xe001f0, 0xe001f7).rw(m_ide, FUNC(vt83c461_device::cs0_r), FUNC(vt83c461_device::cs0_w)); map(0xe003f0, 0xe003f7).rw(m_ide, FUNC(vt83c461_device::cs1_r), FUNC(vt83c461_device::cs1_w)); diff --git a/src/mame/drivers/merit3xx.cpp b/src/mame/drivers/merit3xx.cpp index d38cfb7e265..1c45272fdaa 100644 --- a/src/mame/drivers/merit3xx.cpp +++ b/src/mame/drivers/merit3xx.cpp @@ -195,7 +195,7 @@ CRT-351 | |=============J2=============||=============J1===============|| +----------------------------------------------------------------------------+ -J1 80-pin connector to J1 connector on the CRT-350 mainboard +J1 80-pin connector to J1 connector on the CRT-350 mainboard J2 80-pin connector to J2 connector on the CRT-350 mainboard J3 65-pin single row connector for wire harness J4 40-pin dual row connector for printer @@ -353,7 +353,7 @@ CRT-351 | |=============J2=============||=============J1===============|| +----------------------------------------------------------------------------+ -J1 80-pin connector to J1 connector on the CRT-350 mainboard +J1 80-pin connector to J1 connector on the CRT-350 mainboard J2 80-pin connector to J2 connector on the CRT-350 mainboard J3 65-pin single row connector for wire harness J4 40-pin dual row connector for printer diff --git a/src/mame/drivers/miniboy7.cpp b/src/mame/drivers/miniboy7.cpp index f85478884cc..f56259f08f4 100644 --- a/src/mame/drivers/miniboy7.cpp +++ b/src/mame/drivers/miniboy7.cpp @@ -18,8 +18,8 @@ Game Notes: - * Mini-Boy 7. - + * Mini-Boy 7. + Seven games in one, plus Ad message support. http://www.arcadeflyers.com/?page=thumbs&db=videodb&id=4275 @@ -173,7 +173,7 @@ [2011... 2019] - Wired PIA and AY8910 properly. - - Implemented and documented the PIA port B multiplexion. + - Implemented and documented the PIA port B multiplexion. - Lot of fixes, getting Mini-Boy 7 working. - Added support for Super Mini-Boy. - Added technical and games notes. @@ -547,10 +547,10 @@ static INPUT_PORTS_START( sminiboy ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hold 1 / Play") PORT_CODE(KEYCODE_Z) // hold 1 / play PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Service / Books") PORT_CODE(KEYCODE_0) // service / books PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("08 - changes screen") PORT_CODE(KEYCODE_E) // (changes in screen) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("10") PORT_CODE(KEYCODE_R) // - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("20") PORT_CODE(KEYCODE_T) // - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("40") PORT_CODE(KEYCODE_Y) // - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("80") PORT_CODE(KEYCODE_U) // + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("10") PORT_CODE(KEYCODE_R) // + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("20") PORT_CODE(KEYCODE_T) // + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("40") PORT_CODE(KEYCODE_Y) // + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("80") PORT_CODE(KEYCODE_U) // PORT_START("DSW2") diff --git a/src/mame/drivers/monon_color.cpp b/src/mame/drivers/monon_color.cpp index dc9db3468fa..9d2b1228e88 100644 --- a/src/mame/drivers/monon_color.cpp +++ b/src/mame/drivers/monon_color.cpp @@ -84,7 +84,7 @@ void monon_color_state::machine_start() by game number: - 103alt (earliest? doesn't have bank9) + 103alt (earliest? doesn't have bank9) 101,102,103,104,105 (1st revision) 106,107 (2nd revision) 201 (3rd revision) diff --git a/src/mame/drivers/ms32.cpp b/src/mame/drivers/ms32.cpp index 8b63feecc73..b71bb15525d 100644 --- a/src/mame/drivers/ms32.cpp +++ b/src/mame/drivers/ms32.cpp @@ -1559,26 +1559,26 @@ INPUT_PORTS_END /********** GFX DECODE **********/ /* sprites are contained in 256x256 "tiles" */ -static const uint32_t sprite_xoffset[256] = +static const uint32_t sprite_xoffset[256] = { - STEP8(8*8*8*0, 8), STEP8(8*8*8*1, 8), STEP8(8*8*8*2, 8), STEP8(8*8*8*3, 8), - STEP8(8*8*8*4, 8), STEP8(8*8*8*5, 8), STEP8(8*8*8*6, 8), STEP8(8*8*8*7, 8), - STEP8(8*8*8*8, 8), STEP8(8*8*8*9, 8), STEP8(8*8*8*10, 8), STEP8(8*8*8*11, 8), - STEP8(8*8*8*12, 8), STEP8(8*8*8*13, 8), STEP8(8*8*8*14, 8), STEP8(8*8*8*15, 8), - STEP8(8*8*8*16, 8), STEP8(8*8*8*17, 8), STEP8(8*8*8*18, 8), STEP8(8*8*8*19, 8), - STEP8(8*8*8*20, 8), STEP8(8*8*8*21, 8), STEP8(8*8*8*22, 8), STEP8(8*8*8*23, 8), - STEP8(8*8*8*24, 8), STEP8(8*8*8*25, 8), STEP8(8*8*8*26, 8), STEP8(8*8*8*27, 8), + STEP8(8*8*8*0, 8), STEP8(8*8*8*1, 8), STEP8(8*8*8*2, 8), STEP8(8*8*8*3, 8), + STEP8(8*8*8*4, 8), STEP8(8*8*8*5, 8), STEP8(8*8*8*6, 8), STEP8(8*8*8*7, 8), + STEP8(8*8*8*8, 8), STEP8(8*8*8*9, 8), STEP8(8*8*8*10, 8), STEP8(8*8*8*11, 8), + STEP8(8*8*8*12, 8), STEP8(8*8*8*13, 8), STEP8(8*8*8*14, 8), STEP8(8*8*8*15, 8), + STEP8(8*8*8*16, 8), STEP8(8*8*8*17, 8), STEP8(8*8*8*18, 8), STEP8(8*8*8*19, 8), + STEP8(8*8*8*20, 8), STEP8(8*8*8*21, 8), STEP8(8*8*8*22, 8), STEP8(8*8*8*23, 8), + STEP8(8*8*8*24, 8), STEP8(8*8*8*25, 8), STEP8(8*8*8*26, 8), STEP8(8*8*8*27, 8), STEP8(8*8*8*28, 8), STEP8(8*8*8*29, 8), STEP8(8*8*8*30, 8), STEP8(8*8*8*31, 8) }; -static const uint32_t sprite_yoffset[256] = +static const uint32_t sprite_yoffset[256] = { - STEP8(8*8*8*0, 8*8), STEP8(8*8*8*32, 8*8), STEP8(8*8*8*64, 8*8), STEP8(8*8*8*96, 8*8), - STEP8(8*8*8*128,8*8), STEP8(8*8*8*160,8*8), STEP8(8*8*8*192,8*8), STEP8(8*8*8*224,8*8), - STEP8(8*8*8*256,8*8), STEP8(8*8*8*288,8*8), STEP8(8*8*8*320,8*8), STEP8(8*8*8*352,8*8), - STEP8(8*8*8*384,8*8), STEP8(8*8*8*416,8*8), STEP8(8*8*8*448,8*8), STEP8(8*8*8*480,8*8), - STEP8(8*8*8*512,8*8), STEP8(8*8*8*544,8*8), STEP8(8*8*8*576,8*8), STEP8(8*8*8*608,8*8), - STEP8(8*8*8*640,8*8), STEP8(8*8*8*672,8*8), STEP8(8*8*8*704,8*8), STEP8(8*8*8*736,8*8), - STEP8(8*8*8*768,8*8), STEP8(8*8*8*800,8*8), STEP8(8*8*8*832,8*8), STEP8(8*8*8*864,8*8), + STEP8(8*8*8*0, 8*8), STEP8(8*8*8*32, 8*8), STEP8(8*8*8*64, 8*8), STEP8(8*8*8*96, 8*8), + STEP8(8*8*8*128,8*8), STEP8(8*8*8*160,8*8), STEP8(8*8*8*192,8*8), STEP8(8*8*8*224,8*8), + STEP8(8*8*8*256,8*8), STEP8(8*8*8*288,8*8), STEP8(8*8*8*320,8*8), STEP8(8*8*8*352,8*8), + STEP8(8*8*8*384,8*8), STEP8(8*8*8*416,8*8), STEP8(8*8*8*448,8*8), STEP8(8*8*8*480,8*8), + STEP8(8*8*8*512,8*8), STEP8(8*8*8*544,8*8), STEP8(8*8*8*576,8*8), STEP8(8*8*8*608,8*8), + STEP8(8*8*8*640,8*8), STEP8(8*8*8*672,8*8), STEP8(8*8*8*704,8*8), STEP8(8*8*8*736,8*8), + STEP8(8*8*8*768,8*8), STEP8(8*8*8*800,8*8), STEP8(8*8*8*832,8*8), STEP8(8*8*8*864,8*8), STEP8(8*8*8*896,8*8), STEP8(8*8*8*928,8*8), STEP8(8*8*8*960,8*8), STEP8(8*8*8*992,8*8) }; static const gfx_layout spritelayout = diff --git a/src/mame/drivers/multi16.cpp b/src/mame/drivers/multi16.cpp index 83d781a1f89..9790814401b 100644 --- a/src/mame/drivers/multi16.cpp +++ b/src/mame/drivers/multi16.cpp @@ -4,31 +4,31 @@ Mitsubishi MULTI-16 series - MULTI-16 (1982, 1983 for S models) - - 8088, 4 MHz - - 8041 (MCU), 8253 (PIT), 8259A (PIC), MB8866 (FDC) - - MP-1601 (128 KB RAM, 32 KB VRAM, monochrome, 1x 5.25") - - MP-1602 (192 KB RAM, 32 KB VRAM, monochrome, 2x 5.25") - - MP-1605 (256 KB RAM, 96 KB VRAM, 8 colors, 2x 5.25") - - MP-1601S (8087, 128 KB RAM, 32 KB VRAM, monochrome, 1x 5.25") - - MP-1602S (8087, 192 KB RAM, 32 KB VRAM, monochrome, 2x 5.25") - - MP-1605S (8087, 256 KB RAM, 96 KB VRAM, 8 colors, 2x 5.25") - - MP-1622 (8087, 192 KB RAM, 32 KB VRAM, monochrome, 2x 8") - - MP-1625 (8087, 256 KB RAM, 96 KB VRAM, 8 colors, 2x 8") - - MULTI-16 II (1984) - - 8086, 8 MHz - - MP-1642 (256 KB RAM, 64 KB VRAM, monochrome, 2x 5.25") - - MP-1645 (256 KB RAM, 192 KB VRAM, 8 colors, 2x 5.25") - - MULTI-16 IV (1986) - - 80286, 8 MHz - - MP-1652-A20 (512 KB RAM, 128 KB VRAM, monochrome, 2x 5.25") - - MP-1652-A22 (512 KB RAM, 128 KB VRAM, monochrome, 2x 5.25", 20 MB HDD) - - MP-1655-A20 (512 KB RAM, 384 KB VRAM, 8 colors, 2x 5.25") - - MP-1655-A22 (512 KB RAM, 384 KB VRAM, 8 colors, 2x 5.25", 20 MB HDD) - - The IPL dump we currently have seems to be from the MP-1645. + MULTI-16 (1982, 1983 for S models) + - 8088, 4 MHz + - 8041 (MCU), 8253 (PIT), 8259A (PIC), MB8866 (FDC) + - MP-1601 (128 KB RAM, 32 KB VRAM, monochrome, 1x 5.25") + - MP-1602 (192 KB RAM, 32 KB VRAM, monochrome, 2x 5.25") + - MP-1605 (256 KB RAM, 96 KB VRAM, 8 colors, 2x 5.25") + - MP-1601S (8087, 128 KB RAM, 32 KB VRAM, monochrome, 1x 5.25") + - MP-1602S (8087, 192 KB RAM, 32 KB VRAM, monochrome, 2x 5.25") + - MP-1605S (8087, 256 KB RAM, 96 KB VRAM, 8 colors, 2x 5.25") + - MP-1622 (8087, 192 KB RAM, 32 KB VRAM, monochrome, 2x 8") + - MP-1625 (8087, 256 KB RAM, 96 KB VRAM, 8 colors, 2x 8") + + MULTI-16 II (1984) + - 8086, 8 MHz + - MP-1642 (256 KB RAM, 64 KB VRAM, monochrome, 2x 5.25") + - MP-1645 (256 KB RAM, 192 KB VRAM, 8 colors, 2x 5.25") + + MULTI-16 IV (1986) + - 80286, 8 MHz + - MP-1652-A20 (512 KB RAM, 128 KB VRAM, monochrome, 2x 5.25") + - MP-1652-A22 (512 KB RAM, 128 KB VRAM, monochrome, 2x 5.25", 20 MB HDD) + - MP-1655-A20 (512 KB RAM, 384 KB VRAM, 8 colors, 2x 5.25") + - MP-1655-A22 (512 KB RAM, 384 KB VRAM, 8 colors, 2x 5.25", 20 MB HDD) + + The IPL dump we currently have seems to be from the MP-1645. ****************************************************************************/ @@ -118,18 +118,18 @@ void multi16_state::multi16_map(address_map &map) void multi16_state::multi16_io(address_map &map) { map.unmap_value_high(); -// map(0x02, 0x03) // ? -// map(0x06, 0x06) // ? -// map(0x07, 0x07) // ? -// map(0x08, 0x0b) // ? +// map(0x02, 0x03) // ? +// map(0x06, 0x06) // ? +// map(0x07, 0x07) // ? +// map(0x08, 0x0b) // ? map(0x0c, 0x0f).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write)); map(0x40, 0x40).w(m_crtc, FUNC(hd6845s_device::address_w)); map(0x41, 0x41).rw(m_crtc, FUNC(hd6845s_device::register_r), FUNC(hd6845s_device::register_w)); -// map(0x42, 0x44) // ? -// map(0x48, 0x48) // ? -// map(0x4e, 0x4e) // ? -// map(0x82, 0x82) // ? -// map(0x92, 0x92) // ? +// map(0x42, 0x44) // ? +// map(0x48, 0x48) // ? +// map(0x4e, 0x4e) // ? +// map(0x82, 0x82) // ? +// map(0x92, 0x92) // ? } /* Input ports */ diff --git a/src/mame/drivers/mvme162.cpp b/src/mame/drivers/mvme162.cpp index 961e7e9daa7..84730bbe39b 100644 --- a/src/mame/drivers/mvme162.cpp +++ b/src/mame/drivers/mvme162.cpp @@ -115,11 +115,11 @@ * FFE00000-FFE1FFFF On-board SRAM D32 128Kb * FFE80000-FFEFFFFF Not decoded * ------------------------ Local I/O devices D8/D16/D32 - * FFF00000-FFF3FFFF Reserved 256KB + * FFF00000-FFF3FFFF Reserved 256KB * FFF40000-FFF400FF VMEchip2 (LCSR) D32 256B * FFF40100-FFF401FF VMEchip2 (GCSR) D32-D8 256B - * FFF40200-FFF40FFF Reserved 3.5KB - * FFF41000-FFF41FFF Reserved 4KB + * FFF40200-FFF40FFF Reserved 3.5KB + * FFF41000-FFF41FFF Reserved 4KB * FFF42000-FFF41FFF MCchip D32-D8 4KB * FFF43000-FFF430FF MCECC #1 D8 256B * FFF43100-FFF431FF MCECC #2 D8 256B @@ -131,7 +131,7 @@ * FFF47000-FFF47FFF SCSI (53C710) D32-D8 4Kb * FFF48000-FFF57FFF Reserved * FFF58000-FFF587FF IPIC IP_* D32-D16 - * FFF58800-FFF58FFF Reserved + * FFF58800-FFF58FFF Reserved * FFFBC000-FFFBC01F IPIC Registers D32-D8 * FFFBC800-FFFBFFFF Reserved * FFFC0000-FFFC7FFF MK48T08 (BBRAM, TOD Clock) D32-D8 32Kb @@ -180,18 +180,18 @@ #endif /*Serial Communications Interface -The MVME162LX uses two Zilog Z85230 serial port controllers to implement the four serial communications -interfaces. Each interface supports CTS, DCD, RTS, and DTR control signals; as well as the TXD and RXD -transmit/receive data signals. Because the serial clocks are omitted in the MVME162LX implementation, -serial communications are strictly asynchronous. The MVME162LX hardware supports serial baud rates of +The MVME162LX uses two Zilog Z85230 serial port controllers to implement the four serial communications +interfaces. Each interface supports CTS, DCD, RTS, and DTR control signals; as well as the TXD and RXD +transmit/receive data signals. Because the serial clocks are omitted in the MVME162LX implementation, +serial communications are strictly asynchronous. The MVME162LX hardware supports serial baud rates of 110b/s to 38.4Kb/s. The Z85230 supplies an interrupt vector during interrupt acknowledge cycles. -The vector is modified based upon the interrupt source within the Z85230. Interrupt request levels are +The vector is modified based upon the interrupt source within the Z85230. Interrupt request levels are programmed via the MCchip. The Z85230s are interfaced as DTE (data terminal equipment) with EIA-232-D signal levels. The four serial ports are routed to four RJ45 telephone connectors on the MVME162LX front panel.*/ /* This gives prompt at the RS232 terminal device (9600) */ #define BAUDGEN_CLOCK 10_MHz_XTAL // Not verified nor seen on the PCB:s -#define SCC_CLOCK (BAUDGEN_CLOCK) +#define SCC_CLOCK (BAUDGEN_CLOCK) class mvme162_state : public driver_device { @@ -211,7 +211,7 @@ private: virtual void machine_start () override; virtual void machine_reset () override; void mvme162_mem(address_map &map); - + required_device m_maincpu; required_device m_sccterm; //required_device m_sccterm2; @@ -221,10 +221,10 @@ private: uint32_t m_sysram[2]; // PCC registers - uint8_t m_genpurp_stat; + uint8_t m_genpurp_stat; // VME chip registers - uint8_t m_vc_cntl_conf; + uint8_t m_vc_cntl_conf; }; void mvme162_state::mvme162_mem(address_map &map) @@ -238,10 +238,10 @@ void mvme162_state::mvme162_mem(address_map &map) map(0xff800000, 0xff9fffff).rom().region("roms", 0x800000); /* ROM/EEPROM bank 1 - 162bug/firmware */ map(0xffa00000, 0xffbfffff).rom().region("roms", 0xa00000); /* ROM/EEPROM bank 2 - unpopulated/VxWorks/etc */ - + map(0xffe00000, 0xffe1ffff).ram(); /* 128KB on board SRAM */ - /* SGS-Thompson M48T18 RAM and clock chip, only 4088 bytes used, and 8 bytes for the RTC, out of 8Kb though */ + /* SGS-Thompson M48T18 RAM and clock chip, only 4088 bytes used, and 8 bytes for the RTC, out of 8Kb though */ map(0xfffc0000, 0xfffc7fff).rw("m48t18", FUNC(timekeeper_device::read), FUNC(timekeeper_device::write)); map(0xfff45000, 0xfff457ff).rw(m_sccterm, FUNC(scc85230_device::ba_cd_r), FUNC(scc85230_device::ba_cd_w)); /* Port 1&2 - Dual serial port Z80-SCC */ @@ -272,8 +272,8 @@ void mvme162_state::machine_reset () m_genpurp_stat &= 0xfe; /* Clear parity error bit - not used by MAME at this point so just for the record */ } -/* - Boot vector handler. Devices mapped at $FFF80000-$FFF9FFFF also appear at $00000000-$001FFFFF when the ROM0 bit +/* + Boot vector handler. Devices mapped at $FFF80000-$FFF9FFFF also appear at $00000000-$001FFFFF when the ROM0 bit in the MCchip EPROM control register is high (ROM0=1). ROM0 is set to 1 after each reset. The ROM0 bit must be cleared before other resources (DRAM or SRAM) can be mapped in this range ($00000000 - $001FFFFF). */ diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp index 42bdbd15aa3..0b9970cc70c 100644 --- a/src/mame/drivers/nemesis.cpp +++ b/src/mame/drivers/nemesis.cpp @@ -20,7 +20,7 @@ Hyper Crash (Version C) GX790 Kitten Kaboodle GX712 Nyan Nyan Panic (Japan) GX712 - Bubble System + Bubble System driver by Bryan McPhail @@ -37,7 +37,7 @@ modified by hap Special thx 2 Neusneus, Audrey Tautou, my water bottle, chair, sleepiness Bubble System added 2019 ArcadeHacker/Bryan McPhail - + Notes: - blkpnthr: There are sprite priority problems in upper part of the screen , @@ -173,14 +173,14 @@ WRITE16_MEMBER(nemesis_state::bubsys_mcu_w) //int unknownBit = m_bubsys_control_ram[0] & 0x800; logerror("\tCopy page %02x to shared ram\n", page); - + const uint8_t *src = memregion("bubblememory")->base(); memcpy(m_bubsys_shared_ram + 0xf00/2, src + page * 0x90, 0x80); // The last 2 bytes of the block are loaded into the control register m_bubsys_control_ram[0] = src[page * 0x90 + 0x80] | (src[page * 0x90 + 0x81]<<8); - - m_maincpu->set_input_line(5, HOLD_LINE); + + m_maincpu->set_input_line(5, HOLD_LINE); } // Write? else if (m_bubsys_control_ram[1]==2) @@ -191,7 +191,7 @@ WRITE16_MEMBER(nemesis_state::bubsys_mcu_w) else { //logerror("bubsys_mcu_trigger_w (%08x) %d (%02x %02x %02x %02x)\n", m_maincpu->pc(), state, m_bubsys_control_ram[0], m_bubsys_control_ram[1], m_bubsys_control_ram[2], m_bubsys_control_ram[3]); - m_maincpu->set_input_line(5, CLEAR_LINE); // Not confirmed the clear happens here + m_maincpu->set_input_line(5, CLEAR_LINE); // Not confirmed the clear happens here } } @@ -396,8 +396,8 @@ void nemesis_state::bubsys_map(address_map &map) map(0x05cc04, 0x05cc05).portr("IN2"); map(0x05e000, 0x05e00f).w("outlatch", FUNC(ls259_device::write_d0)).umask16(0xff00); map(0x05e000, 0x05e00f).w("intlatch", FUNC(ls259_device::write_d0)).umask16(0x00ff); - map(0x070000, 0x073fff).ram(); /* WORK RAM */ - map(0x078000, 0x07ffff).rom(); /* Empty diagnostic ROM slot */ + map(0x070000, 0x073fff).ram(); /* WORK RAM */ + map(0x078000, 0x07ffff).rom(); /* Empty diagnostic ROM slot */ } void nemesis_state::konamigt_map(address_map &map) @@ -2906,7 +2906,7 @@ ROM_START( bubsys ) ROM_REGION( 0x80000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_WORD( "boot.bin", 0x0000, 0x1e0, CRC(f0774fc2) SHA1(84fade54e025f170d983200a86c1ed96ef1a9ed3) ) - ROM_REGION( 0x49000, "bubblememory", ROMREGION_ERASE00 ) + ROM_REGION( 0x49000, "bubblememory", ROMREGION_ERASE00 ) ROM_REGION( 0x1000, "mcu", ROMREGION_ERASE00 ) /* Fujitsu MCU, unknown type */ ROM_LOAD( "mcu", 0x0000, 0x1000, NO_DUMP ) @@ -2923,7 +2923,7 @@ ROM_START( gradiusb ) ROM_REGION( 0x80000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_WORD( "boot.bin", 0x0000, 0x1e0, CRC(f0774fc2) SHA1(84fade54e025f170d983200a86c1ed96ef1a9ed3) ) - ROM_REGION( 0x48360, "bubblememory", 0 ) + ROM_REGION( 0x48360, "bubblememory", 0 ) /* The Gradius cartridge contains 0x807 pages of 130 bytes each */ ROM_LOAD16_WORD_SWAP( "gradius.bin", 0x000, 0x48360, CRC(f83b9607) SHA1(53493c2d5b0e66dd6b75865abf0982ee50c01a6f) ) @@ -2941,27 +2941,27 @@ ROM_END void nemesis_state::bubsys_init() { /* - The MCU is the master of the system and controls the /RESET and /HALT lines of the 68000. - At boot the MCU halts the 68000 and copies the 68000 boot program to shared RAM which - takes 30.65 milliseconds then the 68000 starts execution. - - As the MCU is not dumped we effectively start the simulation at the point the 68000 - is released, and manually copy the boot program to 68000 address space. + The MCU is the master of the system and controls the /RESET and /HALT lines of the 68000. + At boot the MCU halts the 68000 and copies the 68000 boot program to shared RAM which + takes 30.65 milliseconds then the 68000 starts execution. + + As the MCU is not dumped we effectively start the simulation at the point the 68000 + is released, and manually copy the boot program to 68000 address space. */ - + const uint8_t *src = memregion("maincpu")->base(); memcpy(m_bubsys_shared_ram, src, 0x1e0); /* - The MCU sets this flag once the boot program is copied. The 68000 will reset - if the value is not correct. + The MCU sets this flag once the boot program is copied. The 68000 will reset + if the value is not correct. */ - m_bubsys_control_ram[3]=0x240; + m_bubsys_control_ram[3]=0x240; } GAME( 1985, bubsys, 0, bubsys, bubsys, nemesis_state, bubsys_init, ROT0, "Konami", "Bubble System BIOS", MACHINE_IS_BIOS_ROOT ) GAME( 1985, gradiusb, bubsys, bubsys, bubsys, nemesis_state, bubsys_init, ROT0, "Konami", "Gradius (Bubble System)", 0 ) // Bubble System Twinbee -// Bubble System RF2 +// Bubble System RF2 // Bubble System Galactic Warriors // Bubble System Attack Rush diff --git a/src/mame/drivers/neogeo.cpp b/src/mame/drivers/neogeo.cpp index a11b3202635..6b8390be27d 100644 --- a/src/mame/drivers/neogeo.cpp +++ b/src/mame/drivers/neogeo.cpp @@ -4940,7 +4940,7 @@ ROM_START( viewpoinp ) // crashes during stage 4 on real hardware (but stage 5 c ROM_LOAD32_BYTE( "c3", 0x000001, 0x080000, CRC(b017d2d1) SHA1(160bd4f3f4c09a244a9cfdd076f37299ec0ae4d5) ) ROM_LOAD32_BYTE( "c4", 0x000003, 0x080000, CRC(10f1624a) SHA1(762fd106886c7f13cb29c97c3a3af9fbd6b30405) ) ROM_LOAD32_BYTE( "c5", 0x200000, 0x080000, CRC(714a8bc4) SHA1(5f69a7e6acaf6916d76f3de6465a5b548d90af68) ) - ROM_LOAD32_BYTE( "c6", 0x200002, 0x080000, CRC(5bc32495) SHA1(d9e2635de3fe60d4adcc11d4acde2d613808c0b8) ) + ROM_LOAD32_BYTE( "c6", 0x200002, 0x080000, CRC(5bc32495) SHA1(d9e2635de3fe60d4adcc11d4acde2d613808c0b8) ) ROM_LOAD32_BYTE( "c7", 0x200001, 0x080000, CRC(28a0a127) SHA1(488fa8acd474cd357e3d18043341bc7b5a1a654e) ) ROM_LOAD32_BYTE( "c8", 0x200003, 0x080000, CRC(439c9036) SHA1(7a5b965ceab9343ece3b6d02cc6dbfc83ec67f04) ) ROM_END diff --git a/src/mame/drivers/segaatom.cpp b/src/mame/drivers/segaatom.cpp index 83f31daddb9..aa337cc8531 100644 --- a/src/mame/drivers/segaatom.cpp +++ b/src/mame/drivers/segaatom.cpp @@ -3,7 +3,7 @@ /*************************************************************************** Atom II - (c) Sega 200? + (c) Sega 200? Main board: Sega PC BD ATOM II diff --git a/src/mame/drivers/skimaxx.cpp b/src/mame/drivers/skimaxx.cpp index 6b9a540a05f..7ffb8ed5561 100644 --- a/src/mame/drivers/skimaxx.cpp +++ b/src/mame/drivers/skimaxx.cpp @@ -378,7 +378,7 @@ void skimaxx_state::m68030_2_map(address_map &map) map(0xfffc0000, 0xfffcffff).ram().share("share1"); // AM_RANGE(0xfffe0000, 0xffffffff) AM_RAM // I think this is banked with the shared RAM? (see CPU sync routines) map(0xfffe0000, 0xfffeffff).ram().share("share1"); // HACK - // map(0xfffe0010, 0xfffeffff).ram(); // HACK + // map(0xfffe0010, 0xfffeffff).ram(); // HACK map(0xffff0000, 0xffffffff).ram(); } diff --git a/src/mame/drivers/starrider.cpp b/src/mame/drivers/starrider.cpp index 8ceaed9e845..261371963c5 100644 --- a/src/mame/drivers/starrider.cpp +++ b/src/mame/drivers/starrider.cpp @@ -20,7 +20,7 @@ * D-9926 Image ROM board (ROM) * D-9930 Video Expander board (EXP) * D-9941 Sound System board (Sound) - + C-9928 PIF: ----------- Handles communication with the LaserDisc player. Uses a 68029E CPU diff --git a/src/mame/drivers/sunplus_gcm394.cpp b/src/mame/drivers/sunplus_gcm394.cpp index a4204a58d97..6bfcb0dd472 100644 --- a/src/mame/drivers/sunplus_gcm394.cpp +++ b/src/mame/drivers/sunplus_gcm394.cpp @@ -48,7 +48,7 @@ protected: required_device m_spg; optional_memory_bank m_bank; - + required_ioport m_io_p1; required_ioport m_io_p2; diff --git a/src/mame/drivers/talkingbb.cpp b/src/mame/drivers/talkingbb.cpp index 253dec3e01c..ea57bc94b14 100644 --- a/src/mame/drivers/talkingbb.cpp +++ b/src/mame/drivers/talkingbb.cpp @@ -288,7 +288,7 @@ void talkingbb_state::main_io(address_map &map) RUNNER] STEAL] X-BASE] ENTER] | REPLAY] RELIEF] SUB] ENTER] | [0 | [0 - SWING] | BALL] + SWING] | BALL] */ static INPUT_PORTS_START( talkingbb ) diff --git a/src/mame/drivers/tetrisp2.cpp b/src/mame/drivers/tetrisp2.cpp index b855fe4d0bb..ef53ea78535 100644 --- a/src/mame/drivers/tetrisp2.cpp +++ b/src/mame/drivers/tetrisp2.cpp @@ -1574,26 +1574,26 @@ static const gfx_layout layout_16x16x8 = /* sprites are contained in 256x256 "tiles" */ -static const uint32_t sprite_xoffset[256] = +static const uint32_t sprite_xoffset[256] = { - STEP8(8*8*8*0, 8), STEP8(8*8*8*1, 8), STEP8(8*8*8*2, 8), STEP8(8*8*8*3, 8), - STEP8(8*8*8*4, 8), STEP8(8*8*8*5, 8), STEP8(8*8*8*6, 8), STEP8(8*8*8*7, 8), - STEP8(8*8*8*8, 8), STEP8(8*8*8*9, 8), STEP8(8*8*8*10, 8), STEP8(8*8*8*11, 8), - STEP8(8*8*8*12, 8), STEP8(8*8*8*13, 8), STEP8(8*8*8*14, 8), STEP8(8*8*8*15, 8), - STEP8(8*8*8*16, 8), STEP8(8*8*8*17, 8), STEP8(8*8*8*18, 8), STEP8(8*8*8*19, 8), - STEP8(8*8*8*20, 8), STEP8(8*8*8*21, 8), STEP8(8*8*8*22, 8), STEP8(8*8*8*23, 8), - STEP8(8*8*8*24, 8), STEP8(8*8*8*25, 8), STEP8(8*8*8*26, 8), STEP8(8*8*8*27, 8), + STEP8(8*8*8*0, 8), STEP8(8*8*8*1, 8), STEP8(8*8*8*2, 8), STEP8(8*8*8*3, 8), + STEP8(8*8*8*4, 8), STEP8(8*8*8*5, 8), STEP8(8*8*8*6, 8), STEP8(8*8*8*7, 8), + STEP8(8*8*8*8, 8), STEP8(8*8*8*9, 8), STEP8(8*8*8*10, 8), STEP8(8*8*8*11, 8), + STEP8(8*8*8*12, 8), STEP8(8*8*8*13, 8), STEP8(8*8*8*14, 8), STEP8(8*8*8*15, 8), + STEP8(8*8*8*16, 8), STEP8(8*8*8*17, 8), STEP8(8*8*8*18, 8), STEP8(8*8*8*19, 8), + STEP8(8*8*8*20, 8), STEP8(8*8*8*21, 8), STEP8(8*8*8*22, 8), STEP8(8*8*8*23, 8), + STEP8(8*8*8*24, 8), STEP8(8*8*8*25, 8), STEP8(8*8*8*26, 8), STEP8(8*8*8*27, 8), STEP8(8*8*8*28, 8), STEP8(8*8*8*29, 8), STEP8(8*8*8*30, 8), STEP8(8*8*8*31, 8) }; -static const uint32_t sprite_yoffset[256] = +static const uint32_t sprite_yoffset[256] = { - STEP8(8*8*8*0, 8*8), STEP8(8*8*8*32, 8*8), STEP8(8*8*8*64, 8*8), STEP8(8*8*8*96, 8*8), - STEP8(8*8*8*128,8*8), STEP8(8*8*8*160,8*8), STEP8(8*8*8*192,8*8), STEP8(8*8*8*224,8*8), - STEP8(8*8*8*256,8*8), STEP8(8*8*8*288,8*8), STEP8(8*8*8*320,8*8), STEP8(8*8*8*352,8*8), - STEP8(8*8*8*384,8*8), STEP8(8*8*8*416,8*8), STEP8(8*8*8*448,8*8), STEP8(8*8*8*480,8*8), - STEP8(8*8*8*512,8*8), STEP8(8*8*8*544,8*8), STEP8(8*8*8*576,8*8), STEP8(8*8*8*608,8*8), - STEP8(8*8*8*640,8*8), STEP8(8*8*8*672,8*8), STEP8(8*8*8*704,8*8), STEP8(8*8*8*736,8*8), - STEP8(8*8*8*768,8*8), STEP8(8*8*8*800,8*8), STEP8(8*8*8*832,8*8), STEP8(8*8*8*864,8*8), + STEP8(8*8*8*0, 8*8), STEP8(8*8*8*32, 8*8), STEP8(8*8*8*64, 8*8), STEP8(8*8*8*96, 8*8), + STEP8(8*8*8*128,8*8), STEP8(8*8*8*160,8*8), STEP8(8*8*8*192,8*8), STEP8(8*8*8*224,8*8), + STEP8(8*8*8*256,8*8), STEP8(8*8*8*288,8*8), STEP8(8*8*8*320,8*8), STEP8(8*8*8*352,8*8), + STEP8(8*8*8*384,8*8), STEP8(8*8*8*416,8*8), STEP8(8*8*8*448,8*8), STEP8(8*8*8*480,8*8), + STEP8(8*8*8*512,8*8), STEP8(8*8*8*544,8*8), STEP8(8*8*8*576,8*8), STEP8(8*8*8*608,8*8), + STEP8(8*8*8*640,8*8), STEP8(8*8*8*672,8*8), STEP8(8*8*8*704,8*8), STEP8(8*8*8*736,8*8), + STEP8(8*8*8*768,8*8), STEP8(8*8*8*800,8*8), STEP8(8*8*8*832,8*8), STEP8(8*8*8*864,8*8), STEP8(8*8*8*896,8*8), STEP8(8*8*8*928,8*8), STEP8(8*8*8*960,8*8), STEP8(8*8*8*992,8*8) }; static const gfx_layout spritelayout = diff --git a/src/mame/drivers/tmc1800.cpp b/src/mame/drivers/tmc1800.cpp index eb2a6f387a4..06473213ce8 100644 --- a/src/mame/drivers/tmc1800.cpp +++ b/src/mame/drivers/tmc1800.cpp @@ -99,59 +99,59 @@ Notes: CN2 - video connector CN3 - power connector CN4 - expansion connector - + Usage: - Enter operating system with MONITOR key + Enter operating system with MONITOR key - Commands: - B N Load N pages (of 256 bytes) from tape to current address, e.g. "MONITOR 0000 B 4" loads 4 pages to 0x0000 - F N Save N pages (of 256 bytes) to tape starting from current address, e.g. "MONITOR 0200 F 4" saves 4 pages starting from 0x0200 - 0 Write memory, e.g. "MONITOR 0400 0 A1 A3" writes 0xA1 to 0x0400 and 0xA3 to 0x0401 - A Read memory, e.g. "MONITOR 0400 A 0 0 0" shows memory contents for 0x0400, 0x0401, 0x0402, 0x0403 + Commands: + B N Load N pages (of 256 bytes) from tape to current address, e.g. "MONITOR 0000 B 4" loads 4 pages to 0x0000 + F N Save N pages (of 256 bytes) to tape starting from current address, e.g. "MONITOR 0200 F 4" saves 4 pages starting from 0x0200 + 0 Write memory, e.g. "MONITOR 0400 0 A1 A3" writes 0xA1 to 0x0400 and 0xA3 to 0x0401 + A Read memory, e.g. "MONITOR 0400 A 0 0 0" shows memory contents for 0x0400, 0x0401, 0x0402, 0x0403 - Loading software from tape: - - Press MONITOR - - Enter loading address (0000) - - Press B - - Enter length of program in pages (4) - - Press RUN after program has loaded + Loading software from tape: + - Press MONITOR + - Enter loading address (0000) + - Press B + - Enter length of program in pages (4) + - Press RUN after program has loaded Demo tape contents: - Side A - - 1. Esittelyohjelma (Demonstration Program) [length A pages] - 2. Reaktioaikatesti (Reaction Time Test) [4] - 3. Kaleidoskooppi (Kaleidoscope) [3] [CHIP-8] - 4. Labyrinttiohjelma (Labyrinth Program) [4] - 5. Labyrinttipeli (Labyrinth Game) [4] [CHIP-8] - 6. Yhteenlaskuohjelma (Addition Program) [4] [CHIP-8] - 7. Miinakenttä (Minefield) [4] [CHIP-8] - 8. Herästyskello (Alarm Clock) [4] [CHIP-8] - 9. Move Loop eli ansapeli [4] - 10. Pingis (Ping Pong) [6] [CHIP-8] - 11. Numeron arvaus (Number Guess) [3] [CHIP-8] - 12. Numeroiden kaato [4] [CHIP-8] - 13. Pyyhkäisypeli, yksinpelattava (Sweeping Game Single Player) [3] [CHIP-8] - 14. Pyyhkäisypeli, kaksinpelattava (Sweeping Game Dual Player) [6] [CHIP-8] - 15. Tikkupeli (Stick Game) [8] [CHIP-8] - - Side B - - 16. Ampujaukko (Shooter Man) [4] [CHIP-8] - 17. Ufojen ammunta (UFO Shootout) [3] - 18. Jätkän shakki (Noughs and Crosses) [4] [CHIP-8] - 19. Jackpot [4] [CHIP-8] - 20. Tankki ja ohjus (Tank and Missile) [5] [CHIP-8] - 21. Parien etsintä (Find the Pairs) [4] [CHIP-8] - 22. Tähtien ammunta (Star Shootout) [4] [CHIP-8] - 23. Vedonlyöntipeli (Betting Game) [4] [CHIP-8] - 24. Päättelytehtävä (Master Mind) [4] [CHIP-8] - 25. Piirtelyohjelma (Doodle) [4] [CHIP-8] - 26. Säkkijärven polkka [4] - 27. Heksadesimaalikoodien harjoittelu (Hexadecimal Practice) [3] - 28. Histogrammaohjelma (Histogram) [4] [CHIP-8] - 29. M2-ohjelmointikieli (M2 Programming Language) [F] - 30. RAM-muistin testiohjelma (RAM Test) [?] + Side A + + 1. Esittelyohjelma (Demonstration Program) [length A pages] + 2. Reaktioaikatesti (Reaction Time Test) [4] + 3. Kaleidoskooppi (Kaleidoscope) [3] [CHIP-8] + 4. Labyrinttiohjelma (Labyrinth Program) [4] + 5. Labyrinttipeli (Labyrinth Game) [4] [CHIP-8] + 6. Yhteenlaskuohjelma (Addition Program) [4] [CHIP-8] + 7. Miinakenttä (Minefield) [4] [CHIP-8] + 8. Herästyskello (Alarm Clock) [4] [CHIP-8] + 9. Move Loop eli ansapeli [4] + 10. Pingis (Ping Pong) [6] [CHIP-8] + 11. Numeron arvaus (Number Guess) [3] [CHIP-8] + 12. Numeroiden kaato [4] [CHIP-8] + 13. Pyyhkäisypeli, yksinpelattava (Sweeping Game Single Player) [3] [CHIP-8] + 14. Pyyhkäisypeli, kaksinpelattava (Sweeping Game Dual Player) [6] [CHIP-8] + 15. Tikkupeli (Stick Game) [8] [CHIP-8] + + Side B + + 16. Ampujaukko (Shooter Man) [4] [CHIP-8] + 17. Ufojen ammunta (UFO Shootout) [3] + 18. Jätkän shakki (Noughs and Crosses) [4] [CHIP-8] + 19. Jackpot [4] [CHIP-8] + 20. Tankki ja ohjus (Tank and Missile) [5] [CHIP-8] + 21. Parien etsintä (Find the Pairs) [4] [CHIP-8] + 22. Tähtien ammunta (Star Shootout) [4] [CHIP-8] + 23. Vedonlyöntipeli (Betting Game) [4] [CHIP-8] + 24. Päättelytehtävä (Master Mind) [4] [CHIP-8] + 25. Piirtelyohjelma (Doodle) [4] [CHIP-8] + 26. Säkkijärven polkka [4] + 27. Heksadesimaalikoodien harjoittelu (Hexadecimal Practice) [3] + 28. Histogrammaohjelma (Histogram) [4] [CHIP-8] + 29. M2-ohjelmointikieli (M2 Programming Language) [F] + 30. RAM-muistin testiohjelma (RAM Test) [?] */ diff --git a/src/mame/drivers/trkfldch.cpp b/src/mame/drivers/trkfldch.cpp index 6ece66806a8..b4ac51543f9 100644 --- a/src/mame/drivers/trkfldch.cpp +++ b/src/mame/drivers/trkfldch.cpp @@ -98,16 +98,16 @@ uint32_t trkfldch_state::screen_update_trkfldch(screen_device &screen, bitmap_in spritelistend &= 0x3fff; gfx_element* gfx; - + if (spritelistend >= spritelistbase) { for (int i = spritelistend; i >= spritelistbase; i -= 5) { - // printf("entry %02x %02x %02x %02x %02x\n", m_mainram[i + 0], m_mainram[i + 1], m_mainram[i + 2], m_mainram[i + 3], m_mainram[i + 4]); - // int tilegfxbase = 0x1f80; // select mode - // int tilegfxbase = 0x2780; // 2nd demo (+0x800 from above) - // int tilegfxbase = 0x3780; // 1st demo and 'letters' minigame (+0x1000 from above) + // printf("entry %02x %02x %02x %02x %02x\n", m_mainram[i + 0], m_mainram[i + 1], m_mainram[i + 2], m_mainram[i + 3], m_mainram[i + 4]); + // int tilegfxbase = 0x1f80; // select mode + // int tilegfxbase = 0x2780; // 2nd demo (+0x800 from above) + // int tilegfxbase = 0x3780; // 1st demo and 'letters' minigame (+0x1000 from above) int tilegfxbase = (m_unkregs[0x15] * 0x800); int y = m_mainram[i + 1]; @@ -130,7 +130,7 @@ uint32_t trkfldch_state::screen_update_trkfldch(screen_device &screen, bitmap_in tile += 0x400; //if (unk) // set on score + 'press start' in ddr, priority? palette select? - // tile = machine().rand(); + // tile = machine().rand(); int xhigh = m_mainram[i + 4] & 0x01; @@ -209,11 +209,11 @@ READ8_MEMBER(trkfldch_state::read_vector) logerror("reading vector offset %02x\n", offset); if (offset == 0x0b) - { // NMI + { // NMI return rom[m_which_vector+1]; } else if (offset == 0x0a) - { // NMI + { // NMI return rom[m_which_vector]; } @@ -346,19 +346,19 @@ GFXDECODE_END 0002 - ? (there is no irq 0x02) 0004 used in irq 0x04 0008 used in irq 0x06 - 0010 used in irq 0x08 - 0020 used in irq 0x0a - 0x40 used in irq 0x0c - 0x80 used in irq 0x0e (and by code accessing other ports in the main execution?!) + 0010 used in irq 0x08 + 0020 used in irq 0x0a + 0x40 used in irq 0x0c + 0x80 used in irq 0x0e (and by code accessing other ports in the main execution?!) 7801 : 0001 used in irq 0x10 : 0002 used in irq 0x12 - : 0004 used in irq 0x14 - : 0008 - ? (there is no irq 0x016, it points to unknown area? and we have no code touching this bit) - : 0010 used in irq 0x18 - : 0020 used in irq 0x1a and 0x06?! (used with OR instead of EOR in 0x06, force IRQ?) - : 0x40 - ? (there is no irq 0x1c - it's the boot vector) - : 0x80 - ? (there is no irq 0x1e) + : 0004 used in irq 0x14 + : 0008 - ? (there is no irq 0x016, it points to unknown area? and we have no code touching this bit) + : 0010 used in irq 0x18 + : 0020 used in irq 0x1a and 0x06?! (used with OR instead of EOR in 0x06, force IRQ?) + : 0x40 - ? (there is no irq 0x1c - it's the boot vector) + : 0x80 - ? (there is no irq 0x1e) */ @@ -492,11 +492,11 @@ WRITE8_MEMBER(trkfldch_state::unkregs_w) switch (offset) { case 0x00: // IRQ ack/force?, see above - // logerror("%s: unkregs_w (IRQ ack/force?) %04x %02x\n", machine().describe_context(), offset, data); + // logerror("%s: unkregs_w (IRQ ack/force?) %04x %02x\n", machine().describe_context(), offset, data); break; case 0x01: // IRQ maybe status, see above - // logerror("%s: unkregs_w (IRQ ack/force?) %04x %02x\n", machine().describe_context(), offset, data); + // logerror("%s: unkregs_w (IRQ ack/force?) %04x %02x\n", machine().describe_context(), offset, data); break; case 0x02: // startup @@ -576,7 +576,7 @@ WRITE8_MEMBER(trkfldch_state::unkregs_w) case 0x22: // rarely //logerror("%s: unkregs_w %04x %02x\n", machine().describe_context(), offset, data); break; - + case 0x23: // after a long time //logerror("%s: unkregs_w %04x %02x\n", machine().describe_context(), offset, data); break; @@ -688,7 +688,7 @@ WRITE8_MEMBER(trkfldch_state::unkregs_w) //logerror("%s: unkregs_w %04x %02x\n", machine().describe_context(), offset, data); break; - case 0x62: + case 0x62: //logerror("%s: unkregs_w %04x %02x\n", machine().describe_context(), offset, data); break; @@ -764,7 +764,7 @@ WRITE8_MEMBER(trkfldch_state::unkregs_w) case 0x77: // every second or so //logerror("%s: unkregs_w %04x %02x\n", machine().describe_context(), offset, data); break; - + case 0x78: // startup //logerror("%s: unkregs_w %04x %02x\n", machine().describe_context(), offset, data); break; @@ -804,8 +804,8 @@ WRITE8_MEMBER(trkfldch_state::unkregs_w) break; case 0xb6: // significant data transfer shortly after boot, seems to clock writes with 0073 writing d0 / c0? (then writes 2 bytes here) - // values are coming from a structure in RAM - // how does it reset? + // values are coming from a structure in RAM + // how does it reset? //logerror("%s: unkregs_w %04x %02x\n", machine().describe_context(), offset, data); m_unkdata[m_unkdata_addr] = data; @@ -850,7 +850,7 @@ void trkfldch_state::machine_reset() for (int i = 0; i < 0x100000; i++) m_unkdata[i] = 0; - + m_unkdata_addr = 0; } diff --git a/src/mame/includes/nemesis.h b/src/mame/includes/nemesis.h index 0e7ae620a9b..bc9710367a7 100644 --- a/src/mame/includes/nemesis.h +++ b/src/mame/includes/nemesis.h @@ -33,7 +33,7 @@ public: m_paletteram(*this, "paletteram"), m_gx400_shared_ram(*this, "gx400_shared"), m_bubsys_shared_ram(*this, "bubsys_shared"), - m_bubsys_control_ram(*this, "bubsys_control"), + m_bubsys_control_ram(*this, "bubsys_control"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_filter1(*this, "filter1"), @@ -148,7 +148,7 @@ private: uint32_t screen_update_nemesis(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(nemesis_vblank_irq); DECLARE_WRITE_LINE_MEMBER(bubsys_vblank_irq); - + DECLARE_WRITE_LINE_MEMBER(blkpnthr_vblank_irq); TIMER_DEVICE_CALLBACK_MEMBER(konamigt_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(gx400_interrupt); diff --git a/src/mame/layout/fccpu1.lay b/src/mame/layout/fccpu1.lay index ef544908740..445f21a93ab 100644 --- a/src/mame/layout/fccpu1.lay +++ b/src/mame/layout/fccpu1.lay @@ -6,11 +6,11 @@ Force Computers CPU-1 layout --> - + - + diff --git a/src/mame/machine/hpc3.cpp b/src/mame/machine/hpc3.cpp index ef2117a842f..19bc0d71132 100644 --- a/src/mame/machine/hpc3.cpp +++ b/src/mame/machine/hpc3.cpp @@ -17,7 +17,7 @@ #define LOG_ETHERNET (1 << 5) #define LOG_PBUS4 (1 << 6) #define LOG_CHAIN (1 << 7) -#define LOG_EEPROM (1 << 8) +#define LOG_EEPROM (1 << 8) #define LOG_ALL (LOG_UNKNOWN | LOG_PBUS_DMA | LOG_SCSI | LOG_SCSI_DMA | LOG_SCSI_IRQ | LOG_ETHERNET | LOG_PBUS4 | LOG_CHAIN | LOG_EEPROM) #define VERBOSE (0) diff --git a/src/mame/machine/ioc2.h b/src/mame/machine/ioc2.h index 0d61bda84b7..31cf623d435 100644 --- a/src/mame/machine/ioc2.h +++ b/src/mame/machine/ioc2.h @@ -11,7 +11,7 @@ #pragma once -#define IOC2_NEW_KBDC (0) +#define IOC2_NEW_KBDC (0) #if IOC2_NEW_KBDC #include "machine/at_keybc.h" diff --git a/src/mame/machine/k573fpga.cpp b/src/mame/machine/k573fpga.cpp index d28a9e076bb..eb2197f7c77 100644 --- a/src/mame/machine/k573fpga.cpp +++ b/src/mame/machine/k573fpga.cpp @@ -21,461 +21,461 @@ #include "minimp3/minimp3_ex.h" k573fpga_device::k573fpga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, KONAMI_573_DIGITAL_FPGA, tag, owner, clock), - mas3507d(*this, "mpeg"), - m_samples(*this, "samples"), - use_ddrsbm_fpga(false) + device_t(mconfig, KONAMI_573_DIGITAL_FPGA, tag, owner, clock), + mas3507d(*this, "mpeg"), + m_samples(*this, "samples"), + use_ddrsbm_fpga(false) { } void k573fpga_device::device_start() { - ram_swap = std::make_unique(32 * 1024 * 1024); - save_pointer(NAME(ram_swap), 32 * 1024 * 1024); + ram_swap = std::make_unique(32 * 1024 * 1024); + save_pointer(NAME(ram_swap), 32 * 1024 * 1024); - device_reset(); + device_reset(); } void k573fpga_device::device_reset() { - mp3_start_adr = 0; - mp3_end_adr = 0; - crypto_key1 = 0; - crypto_key2 = 0; - crypto_key3 = 0; - mp3_last_adr = 0; - mp3_last_decrypt_adr = 0; - mp3_next_sync = 0; - last_copied_samples = 0; - decrypt_finished = false; - - if (!channel_l_pcm) { - free(channel_l_pcm); - } - - channel_l_pcm = nullptr; - last_buffer_size_channel_l = 0; - - if (!channel_r_pcm) { - free(channel_r_pcm); - } - - channel_r_pcm = nullptr; - last_buffer_size_channel_r = 0; - - memset((void*)ram_swap.get(), 0, 32 * 1024 * 1024 * 2); - memset(&mp3_info, 0, sizeof(mp3_info)); - - mas3507d->set_samples(m_samples); - - last_position_update = 0; - position_diff = 0; + mp3_start_adr = 0; + mp3_end_adr = 0; + crypto_key1 = 0; + crypto_key2 = 0; + crypto_key3 = 0; + mp3_last_adr = 0; + mp3_last_decrypt_adr = 0; + mp3_next_sync = 0; + last_copied_samples = 0; + decrypt_finished = false; + + if (!channel_l_pcm) { + free(channel_l_pcm); + } + + channel_l_pcm = nullptr; + last_buffer_size_channel_l = 0; + + if (!channel_r_pcm) { + free(channel_r_pcm); + } + + channel_r_pcm = nullptr; + last_buffer_size_channel_r = 0; + + memset((void*)ram_swap.get(), 0, 32 * 1024 * 1024 * 2); + memset(&mp3_info, 0, sizeof(mp3_info)); + + mas3507d->set_samples(m_samples); + + last_position_update = 0; + position_diff = 0; } void k573fpga_device::device_add_mconfig(machine_config &config) { - MAS3507D(config, "mpeg"); - - /* sound hardware */ - SPEAKER(config, "lspeaker").front_left(); - SPEAKER(config, "rspeaker").front_right(); - SAMPLES(config, m_samples); - m_samples->set_channels(2); - m_samples->set_samples_update_callback(FUNC(k573fpga_device::k573fpga_stream_update)); - m_samples->add_route(0, "lspeaker", 1.0); - m_samples->add_route(1, "rspeaker", 1.0); + MAS3507D(config, "mpeg"); + + /* sound hardware */ + SPEAKER(config, "lspeaker").front_left(); + SPEAKER(config, "rspeaker").front_right(); + SAMPLES(config, m_samples); + m_samples->set_channels(2); + m_samples->set_samples_update_callback(FUNC(k573fpga_device::k573fpga_stream_update)); + m_samples->add_route(0, "lspeaker", 1.0); + m_samples->add_route(1, "rspeaker", 1.0); } uint32_t k573fpga_device::get_mp3_playback() { - if (m_samples->get_position(0) == 0 && decrypt_finished) { - // The game is still requesting position updates after the song has ended. - // This happens in some games like DDR 4th Mix Plus where it uses - // the position in song for actual game engine timings. - // The counter will properly end when the game signals to the FPGA to stop playback. - last_position_update += position_diff; - } else { - if (m_samples->get_position(0) - last_position_update > 0) { - position_diff = m_samples->get_position(0) - last_position_update; - } - - last_position_update = m_samples->get_position(0); - } - - return last_position_update; + if (m_samples->get_position(0) == 0 && decrypt_finished) { + // The game is still requesting position updates after the song has ended. + // This happens in some games like DDR 4th Mix Plus where it uses + // the position in song for actual game engine timings. + // The counter will properly end when the game signals to the FPGA to stop playback. + last_position_update += position_diff; + } else { + if (m_samples->get_position(0) - last_position_update > 0) { + position_diff = m_samples->get_position(0) - last_position_update; + } + + last_position_update = m_samples->get_position(0); + } + + return last_position_update; } uint16_t k573fpga_device::i2c_read() { - int scl = mas3507d->i2c_scl_r() << 13; - int sda = mas3507d->i2c_sda_r() << 12; + int scl = mas3507d->i2c_scl_r() << 13; + int sda = mas3507d->i2c_sda_r() << 12; - return scl | sda; + return scl | sda; } void k573fpga_device::i2c_write(uint16_t data) { - mas3507d->i2c_scl_w(data & 0x2000); - mas3507d->i2c_sda_w(data & 0x1000); + mas3507d->i2c_scl_w(data & 0x2000); + mas3507d->i2c_sda_w(data & 0x1000); } uint16_t k573fpga_device::get_mpeg_ctrl() { - if (mpeg_ctrl_flag == 0xe000 || m_samples->get_position(0) > 0) { - // This has been tested with real hardware, but this flag is always held 0x1000 when the audio is being played - return 0x1000; - } + if (mpeg_ctrl_flag == 0xe000 || m_samples->get_position(0) > 0) { + // This has been tested with real hardware, but this flag is always held 0x1000 when the audio is being played + return 0x1000; + } - return 0x0000; + return 0x0000; } void k573fpga_device::set_mpeg_ctrl(uint16_t data) { - logerror("FPGA MPEG control %c%c%c | %08x %08x\n", - data & 0x8000 ? '#' : '.', - data & 0x4000 ? '#' : '.', - data & 0x2000 ? '#' : '.', - mp3_start_adr, mp3_end_adr); - - mpeg_ctrl_flag = data; - - if (data == 0xa000) { - // Stop playback - m_samples->stop(0); - m_samples->stop(1); - } - - if ((data & 0xa000) == 0xa000) { - // Reset playback state for start and stop events - mp3_next_sync = 0; - mp3_last_adr = mp3_start_adr; - mp3_last_decrypt_adr = mp3_start_adr; - last_copied_samples = 0; - last_buffer_size_channel_l = 0; - last_buffer_size_channel_r = 0; - - last_position_update = 0; - position_diff = 0; - decrypt_finished = false; - - if (channel_l_pcm) { - free(channel_l_pcm); - channel_l_pcm = nullptr; - } - - if (channel_r_pcm) { - free(channel_r_pcm); - channel_r_pcm = nullptr; - } - } + logerror("FPGA MPEG control %c%c%c | %08x %08x\n", + data & 0x8000 ? '#' : '.', + data & 0x4000 ? '#' : '.', + data & 0x2000 ? '#' : '.', + mp3_start_adr, mp3_end_adr); + + mpeg_ctrl_flag = data; + + if (data == 0xa000) { + // Stop playback + m_samples->stop(0); + m_samples->stop(1); + } + + if ((data & 0xa000) == 0xa000) { + // Reset playback state for start and stop events + mp3_next_sync = 0; + mp3_last_adr = mp3_start_adr; + mp3_last_decrypt_adr = mp3_start_adr; + last_copied_samples = 0; + last_buffer_size_channel_l = 0; + last_buffer_size_channel_r = 0; + + last_position_update = 0; + position_diff = 0; + decrypt_finished = false; + + if (channel_l_pcm) { + free(channel_l_pcm); + channel_l_pcm = nullptr; + } + + if (channel_r_pcm) { + free(channel_r_pcm); + channel_r_pcm = nullptr; + } + } } inline uint16_t k573fpga_device::fpga_decrypt_byte_real(uint16_t v) { - uint16_t m = crypto_key1 ^ crypto_key2; - - v = bitswap<16>( - v, - 15 - BIT(m, 0xF), - 14 + BIT(m, 0xF), - 13 - BIT(m, 0xE), - 12 + BIT(m, 0xE), - 11 - BIT(m, 0xB), - 10 + BIT(m, 0xB), - 9 - BIT(m, 0x9), - 8 + BIT(m, 0x9), - 7 - BIT(m, 0x8), - 6 + BIT(m, 0x8), - 5 - BIT(m, 0x5), - 4 + BIT(m, 0x5), - 3 - BIT(m, 0x3), - 2 + BIT(m, 0x3), - 1 - BIT(m, 0x2), - 0 + BIT(m, 0x2) - ); - - v ^= (BIT(m, 0xD) << 14) ^ - (BIT(m, 0xC) << 12) ^ - (BIT(m, 0xA) << 10) ^ - (BIT(m, 0x7) << 8) ^ - (BIT(m, 0x6) << 6) ^ - (BIT(m, 0x4) << 4) ^ - (BIT(m, 0x1) << 2) ^ - (BIT(m, 0x0) << 0); - - v ^= bitswap<16>( - (uint16_t)crypto_key3, - 7, 0, 6, 1, - 5, 2, 4, 3, - 3, 4, 2, 5, - 1, 6, 0, 7 - ); - - return (v >> 8) | ((v & 0xff) << 8); + uint16_t m = crypto_key1 ^ crypto_key2; + + v = bitswap<16>( + v, + 15 - BIT(m, 0xF), + 14 + BIT(m, 0xF), + 13 - BIT(m, 0xE), + 12 + BIT(m, 0xE), + 11 - BIT(m, 0xB), + 10 + BIT(m, 0xB), + 9 - BIT(m, 0x9), + 8 + BIT(m, 0x9), + 7 - BIT(m, 0x8), + 6 + BIT(m, 0x8), + 5 - BIT(m, 0x5), + 4 + BIT(m, 0x5), + 3 - BIT(m, 0x3), + 2 + BIT(m, 0x3), + 1 - BIT(m, 0x2), + 0 + BIT(m, 0x2) + ); + + v ^= (BIT(m, 0xD) << 14) ^ + (BIT(m, 0xC) << 12) ^ + (BIT(m, 0xA) << 10) ^ + (BIT(m, 0x7) << 8) ^ + (BIT(m, 0x6) << 6) ^ + (BIT(m, 0x4) << 4) ^ + (BIT(m, 0x1) << 2) ^ + (BIT(m, 0x0) << 0); + + v ^= bitswap<16>( + (uint16_t)crypto_key3, + 7, 0, 6, 1, + 5, 2, 4, 3, + 3, 4, 2, 5, + 1, 6, 0, 7 + ); + + return (v >> 8) | ((v & 0xff) << 8); } inline uint16_t k573fpga_device::fpga_decrypt_byte_ddrsbm(uint16_t data, uint32_t crypto_idx) { - uint8_t key[16] = {0}; - uint16_t key_state = bitswap<16>( - crypto_key1, - 13, 11, 9, 7, - 5, 3, 1, 15, - 14, 12, 10, 8, - 6, 4, 2, 0 - ); - - for (int i = 0; i < 8; i++) { - key[i * 2] = key_state & 0xff; - key[i * 2 + 1] = (key_state >> 8) & 0xff; - key_state = (((((key_state >> 8) >> 7) & 1) | (((key_state >> 8) << 1) & 0xff)) << 8) | - (((key_state & 0xff) >> 7) & 1) | (((key_state & 0xff) << 1) & 0xff); - } - - uint16_t output_word = 0; - for (int cur_bit = 0; cur_bit < 8; cur_bit++) { - int even_bit_shift = (cur_bit * 2) & 0xff; - int odd_bit_shift = (cur_bit * 2 + 1) & 0xff; - int is_even_bit_set = (data & (1 << even_bit_shift)) != 0; - int is_odd_bit_set = (data & (1 << odd_bit_shift)) != 0; - int is_key_bit_set = (key[crypto_idx % 16] & (1 << cur_bit)) != 0; - int is_scramble_bit_set = (key[(crypto_idx - 1) % 16] & (1 << cur_bit)) != 0; - - if (is_scramble_bit_set == 1) { - int t = is_even_bit_set; - is_even_bit_set = is_odd_bit_set; - is_odd_bit_set = t; - } - - if (((is_even_bit_set ^ is_key_bit_set)) == 1) { - output_word |= 1 << even_bit_shift; - } - - if ((is_odd_bit_set) == 1) { - output_word |= 1 << odd_bit_shift; - } - } - - return (output_word >> 8) | ((output_word & 0xff) << 8); + uint8_t key[16] = {0}; + uint16_t key_state = bitswap<16>( + crypto_key1, + 13, 11, 9, 7, + 5, 3, 1, 15, + 14, 12, 10, 8, + 6, 4, 2, 0 + ); + + for (int i = 0; i < 8; i++) { + key[i * 2] = key_state & 0xff; + key[i * 2 + 1] = (key_state >> 8) & 0xff; + key_state = (((((key_state >> 8) >> 7) & 1) | (((key_state >> 8) << 1) & 0xff)) << 8) | + (((key_state & 0xff) >> 7) & 1) | (((key_state & 0xff) << 1) & 0xff); + } + + uint16_t output_word = 0; + for (int cur_bit = 0; cur_bit < 8; cur_bit++) { + int even_bit_shift = (cur_bit * 2) & 0xff; + int odd_bit_shift = (cur_bit * 2 + 1) & 0xff; + int is_even_bit_set = (data & (1 << even_bit_shift)) != 0; + int is_odd_bit_set = (data & (1 << odd_bit_shift)) != 0; + int is_key_bit_set = (key[crypto_idx % 16] & (1 << cur_bit)) != 0; + int is_scramble_bit_set = (key[(crypto_idx - 1) % 16] & (1 << cur_bit)) != 0; + + if (is_scramble_bit_set == 1) { + int t = is_even_bit_set; + is_even_bit_set = is_odd_bit_set; + is_odd_bit_set = t; + } + + if (((is_even_bit_set ^ is_key_bit_set)) == 1) { + output_word |= 1 << even_bit_shift; + } + + if ((is_odd_bit_set) == 1) { + output_word |= 1 << odd_bit_shift; + } + } + + return (output_word >> 8) | ((output_word & 0xff) << 8); } SAMPLES_UPDATE_CB_MEMBER(k573fpga_device::k573fpga_stream_update) { - if (mp3_last_adr >= mp3_end_adr) { - mp3_next_sync = 0; - return; - } + if (mp3_last_adr >= mp3_end_adr) { + mp3_next_sync = 0; + return; + } - if ((mpeg_ctrl_flag & 0xe000) != 0xe000 || (m_samples->get_position(0) < mp3_next_sync && mp3_next_sync != 0)) { - return; - } + if ((mpeg_ctrl_flag & 0xe000) != 0xe000 || (m_samples->get_position(0) < mp3_next_sync && mp3_next_sync != 0)) { + return; + } - int new_samples = mp3_info.samples; - int decrypt_buffer_speed = buffer_speed; + int new_samples = mp3_info.samples; + int decrypt_buffer_speed = buffer_speed; - if (mp3_next_sync == 0 && last_copied_samples == 0) { - crypto_key1 = orig_crypto_key1; - crypto_key2 = orig_crypto_key2; - crypto_key3 = orig_crypto_key3; + if (mp3_next_sync == 0 && last_copied_samples == 0) { + crypto_key1 = orig_crypto_key1; + crypto_key2 = orig_crypto_key2; + crypto_key3 = orig_crypto_key3; - mp3_last_decrypt_adr = mp3_start_adr; + mp3_last_decrypt_adr = mp3_start_adr; - // Cover a large chunk of ID3 or junk at the beginning of a file when decrypting first frame - decrypt_buffer_speed = buffer_speed = 0xe00; - - last_position_update = 0; - position_diff = 0; - decrypt_finished = false; - } + // Cover a large chunk of ID3 or junk at the beginning of a file when decrypting first frame + decrypt_buffer_speed = buffer_speed = 0xe00; + + last_position_update = 0; + position_diff = 0; + decrypt_finished = false; + } - // Decrypt chunk of data - if (mp3_last_decrypt_adr < mp3_end_adr && mp3_last_adr + decrypt_buffer_speed >= mp3_last_decrypt_adr) { - int32_t cur_idx; - - for (cur_idx = mp3_last_decrypt_adr; cur_idx - mp3_last_decrypt_adr < decrypt_buffer_speed && cur_idx < mp3_end_adr; cur_idx += 2) { - if (use_ddrsbm_fpga) { - ram_swap[cur_idx >> 1] = fpga_decrypt_byte_ddrsbm(ram[cur_idx >> 1], (cur_idx - mp3_start_adr) / 2); - } else { - ram_swap[cur_idx >> 1] = fpga_decrypt_byte_real(ram[cur_idx >> 1]); - } - - if (!use_ddrsbm_fpga) { - crypto_key1 = (crypto_key1 & 0x8000) | ((crypto_key1 << 1) & 0x7FFE) | ((crypto_key1 >> 14) & 1); - - if ((((crypto_key1 >> 15) ^ crypto_key1) & 1) != 0) { - crypto_key2 = (crypto_key2 << 1) | (crypto_key2 >> 15); - } - } - - crypto_key3++; - } - - mp3_last_decrypt_adr = cur_idx; - } - - int samples; - int free_format_bytes = 0, frame_size = 0; - int buf_size = decrypt_buffer_speed; - - uint8_t *buf = (uint8_t*)ram_swap.get() + mp3_last_adr; - - // Detect first frame in MP3 data - if (mp3_next_sync == 0 && last_copied_samples == 0) { - buf_size = 0xe00; - - // Everything on the System 573 has a header 0x600 or less from what I've seen, but just ot be sure, check the first 0xe00 bytes - uint32_t first_frame = mp3d_find_frame(buf, buf_size, &free_format_bytes, &frame_size); - buf += first_frame; - mp3_last_adr += first_frame; - buf_size -= first_frame; - - buffer_speed = hdr_frame_bytes(buf, free_format_bytes) * 2; - } - - if (mp3_last_adr >= mp3_end_adr) { - mp3_next_sync = 0; - return; - } - - if (mp3_next_sync == 0 && last_copied_samples == 0) { - // For the first iteration, we need to set up the MP3 state and such - if (mp3_info.buffer != NULL) { - free(mp3_info.buffer); - } - - memset(&mp3_info, 0, sizeof(mp3_info)); - memset(&mp3_frame_info, 0, sizeof(mp3_frame_info)); - new_samples = 0; - - /* try to make allocation size assumption by first frame */ - mp3dec_init(&mp3_dec); - - samples = mp3dec_decode_frame(&mp3_dec, buf, buf_size, mp3_pcm, &mp3_frame_info); - - if (!samples) { - return; - } - - samples *= mp3_frame_info.channels; - - mp3_allocated = (buf_size / mp3_frame_info.frame_bytes) * samples * sizeof(mp3d_sample_t) + MINIMP3_MAX_SAMPLES_PER_FRAME * sizeof(mp3d_sample_t); - mp3_info.buffer = (mp3d_sample_t*)malloc(mp3_allocated); - - if (!mp3_info.buffer) { - return; - } - - mp3_info.samples = samples; - memcpy(mp3_info.buffer, mp3_pcm, mp3_info.samples * sizeof(mp3d_sample_t)); - - /* save info */ - mp3_info.channels = mp3_frame_info.channels; - mp3_info.hz = mp3_frame_info.hz; - mp3_info.layer = mp3_frame_info.layer; - mp3_last_adr += mp3_frame_info.frame_bytes; - } else { - /* decode rest frames */ - buf_size = decrypt_buffer_speed * 2; - - if (buf < (uint8_t*)ram_swap.get() + mp3_end_adr) { - if (buf + buf_size > (uint8_t*)ram_swap.get() + mp3_end_adr) { - buf_size = ((uint8_t*)ram_swap.get() + mp3_end_adr) - buf; - } - if ((mp3_allocated - mp3_info.samples * sizeof(mp3d_sample_t)) < MINIMP3_MAX_SAMPLES_PER_FRAME * sizeof(mp3d_sample_t)) { - mp3_allocated *= 2; - mp3_info.buffer = (mp3d_sample_t*)realloc(mp3_info.buffer, mp3_allocated); - } - - samples = mp3dec_decode_frame(&mp3_dec, buf, buf_size, mp3_info.buffer + mp3_info.samples, &mp3_frame_info); - - if (!samples) { - mp3_last_decrypt_adr = mp3_start_adr; // Force it to redecrypt everything in case the previous decrypt was too fast to find a full frame - crypto_key1 = orig_crypto_key1; - crypto_key2 = orig_crypto_key2; - crypto_key3 = orig_crypto_key3; - - if (buf + buf_size >= (uint8_t*)ram_swap.get() + mp3_end_adr) { - // Some songs have a weird frame at the very end of the song which can be skipped usually. - mp3_last_adr += buf_size; - } - } else if (mp3_info.hz == mp3_frame_info.hz && mp3_info.layer == mp3_frame_info.layer && mp3_info.channels && mp3_info.channels == mp3_frame_info.channels) { - mp3_last_adr += mp3_frame_info.frame_bytes; - mp3_info.samples += samples * mp3_frame_info.channels; - } - } - } - - new_samples = mp3_info.samples - new_samples; - - if (new_samples > 0) { - size_t buffer_size = 0; - - if (mp3_info.channels == 1) { - buffer_size = mp3_info.samples; - } else { - buffer_size = mp3_info.samples / 2; - } - - if (channel_l_pcm == nullptr) { - last_buffer_size_channel_l = buffer_size * 2; - - if (last_buffer_size_channel_l == 0) { - last_buffer_size_channel_l = 0x1000; - } - - channel_l_pcm = (mp3d_sample_t*)calloc(last_buffer_size_channel_l, sizeof(mp3d_sample_t)); - } else if (buffer_size > last_buffer_size_channel_l) { - // realloc - last_buffer_size_channel_l = buffer_size * 2; - - if (last_buffer_size_channel_l == 0) { - last_buffer_size_channel_l = 0x1000; - } - - channel_l_pcm = (mp3d_sample_t*)realloc(channel_l_pcm, last_buffer_size_channel_l * sizeof(mp3d_sample_t)); - } - - if (channel_r_pcm == nullptr) { - last_buffer_size_channel_r = buffer_size * 2; - - if (last_buffer_size_channel_r == 0) { - last_buffer_size_channel_r = 0x1000; - } - - channel_r_pcm = (mp3d_sample_t*)calloc(last_buffer_size_channel_r, sizeof(mp3d_sample_t)); - } else if (buffer_size > last_buffer_size_channel_r) { - // realloc - last_buffer_size_channel_r = buffer_size * 2; - - if (last_buffer_size_channel_r == 0) { - last_buffer_size_channel_r = 0x1000; - } - - channel_r_pcm = (mp3d_sample_t*)realloc(channel_r_pcm, last_buffer_size_channel_r * sizeof(mp3d_sample_t)); - } - - if (mp3_info.channels == 1) { - memcpy(((int8_t*)channel_l_pcm) + (last_copied_samples * sizeof(mp3d_sample_t)), ((int8_t*)mp3_info.buffer) + (last_copied_samples * sizeof(mp3d_sample_t)), (buffer_size - last_copied_samples) * sizeof(mp3d_sample_t)); - memcpy(((int8_t*)channel_r_pcm) + (last_copied_samples * sizeof(mp3d_sample_t)), ((int8_t*)mp3_info.buffer) + (last_copied_samples * sizeof(mp3d_sample_t)), (buffer_size - last_copied_samples) * sizeof(mp3d_sample_t)); - } else { - for (size_t i = last_copied_samples; i < buffer_size; i++) { - channel_l_pcm[i] = mp3_info.buffer[i * sizeof(mp3d_sample_t)]; - channel_r_pcm[i] = mp3_info.buffer[i * sizeof(mp3d_sample_t) + 1]; - } - } - - last_copied_samples = buffer_size; - - if (last_copied_samples > SAMPLES_BUFFER) { - m_samples->update_raw(0, channel_l_pcm, buffer_size, mp3_info.hz, mp3_start_adr != mp3_dynamic_base); - m_samples->update_raw(1, channel_r_pcm, buffer_size, mp3_info.hz, mp3_start_adr != mp3_dynamic_base); - - mp3_next_sync = buffer_size - (buffer_size / 4); // Grab more data sometime before the current buffer ends. This is arbitrary and kinda hacky, but it worked best between various games in my testing. - } - } - - if (mp3_last_adr >= mp3_end_adr) { - decrypt_finished = true; - } + // Decrypt chunk of data + if (mp3_last_decrypt_adr < mp3_end_adr && mp3_last_adr + decrypt_buffer_speed >= mp3_last_decrypt_adr) { + int32_t cur_idx; + + for (cur_idx = mp3_last_decrypt_adr; cur_idx - mp3_last_decrypt_adr < decrypt_buffer_speed && cur_idx < mp3_end_adr; cur_idx += 2) { + if (use_ddrsbm_fpga) { + ram_swap[cur_idx >> 1] = fpga_decrypt_byte_ddrsbm(ram[cur_idx >> 1], (cur_idx - mp3_start_adr) / 2); + } else { + ram_swap[cur_idx >> 1] = fpga_decrypt_byte_real(ram[cur_idx >> 1]); + } + + if (!use_ddrsbm_fpga) { + crypto_key1 = (crypto_key1 & 0x8000) | ((crypto_key1 << 1) & 0x7FFE) | ((crypto_key1 >> 14) & 1); + + if ((((crypto_key1 >> 15) ^ crypto_key1) & 1) != 0) { + crypto_key2 = (crypto_key2 << 1) | (crypto_key2 >> 15); + } + } + + crypto_key3++; + } + + mp3_last_decrypt_adr = cur_idx; + } + + int samples; + int free_format_bytes = 0, frame_size = 0; + int buf_size = decrypt_buffer_speed; + + uint8_t *buf = (uint8_t*)ram_swap.get() + mp3_last_adr; + + // Detect first frame in MP3 data + if (mp3_next_sync == 0 && last_copied_samples == 0) { + buf_size = 0xe00; + + // Everything on the System 573 has a header 0x600 or less from what I've seen, but just ot be sure, check the first 0xe00 bytes + uint32_t first_frame = mp3d_find_frame(buf, buf_size, &free_format_bytes, &frame_size); + buf += first_frame; + mp3_last_adr += first_frame; + buf_size -= first_frame; + + buffer_speed = hdr_frame_bytes(buf, free_format_bytes) * 2; + } + + if (mp3_last_adr >= mp3_end_adr) { + mp3_next_sync = 0; + return; + } + + if (mp3_next_sync == 0 && last_copied_samples == 0) { + // For the first iteration, we need to set up the MP3 state and such + if (mp3_info.buffer != NULL) { + free(mp3_info.buffer); + } + + memset(&mp3_info, 0, sizeof(mp3_info)); + memset(&mp3_frame_info, 0, sizeof(mp3_frame_info)); + new_samples = 0; + + /* try to make allocation size assumption by first frame */ + mp3dec_init(&mp3_dec); + + samples = mp3dec_decode_frame(&mp3_dec, buf, buf_size, mp3_pcm, &mp3_frame_info); + + if (!samples) { + return; + } + + samples *= mp3_frame_info.channels; + + mp3_allocated = (buf_size / mp3_frame_info.frame_bytes) * samples * sizeof(mp3d_sample_t) + MINIMP3_MAX_SAMPLES_PER_FRAME * sizeof(mp3d_sample_t); + mp3_info.buffer = (mp3d_sample_t*)malloc(mp3_allocated); + + if (!mp3_info.buffer) { + return; + } + + mp3_info.samples = samples; + memcpy(mp3_info.buffer, mp3_pcm, mp3_info.samples * sizeof(mp3d_sample_t)); + + /* save info */ + mp3_info.channels = mp3_frame_info.channels; + mp3_info.hz = mp3_frame_info.hz; + mp3_info.layer = mp3_frame_info.layer; + mp3_last_adr += mp3_frame_info.frame_bytes; + } else { + /* decode rest frames */ + buf_size = decrypt_buffer_speed * 2; + + if (buf < (uint8_t*)ram_swap.get() + mp3_end_adr) { + if (buf + buf_size > (uint8_t*)ram_swap.get() + mp3_end_adr) { + buf_size = ((uint8_t*)ram_swap.get() + mp3_end_adr) - buf; + } + if ((mp3_allocated - mp3_info.samples * sizeof(mp3d_sample_t)) < MINIMP3_MAX_SAMPLES_PER_FRAME * sizeof(mp3d_sample_t)) { + mp3_allocated *= 2; + mp3_info.buffer = (mp3d_sample_t*)realloc(mp3_info.buffer, mp3_allocated); + } + + samples = mp3dec_decode_frame(&mp3_dec, buf, buf_size, mp3_info.buffer + mp3_info.samples, &mp3_frame_info); + + if (!samples) { + mp3_last_decrypt_adr = mp3_start_adr; // Force it to redecrypt everything in case the previous decrypt was too fast to find a full frame + crypto_key1 = orig_crypto_key1; + crypto_key2 = orig_crypto_key2; + crypto_key3 = orig_crypto_key3; + + if (buf + buf_size >= (uint8_t*)ram_swap.get() + mp3_end_adr) { + // Some songs have a weird frame at the very end of the song which can be skipped usually. + mp3_last_adr += buf_size; + } + } else if (mp3_info.hz == mp3_frame_info.hz && mp3_info.layer == mp3_frame_info.layer && mp3_info.channels && mp3_info.channels == mp3_frame_info.channels) { + mp3_last_adr += mp3_frame_info.frame_bytes; + mp3_info.samples += samples * mp3_frame_info.channels; + } + } + } + + new_samples = mp3_info.samples - new_samples; + + if (new_samples > 0) { + size_t buffer_size = 0; + + if (mp3_info.channels == 1) { + buffer_size = mp3_info.samples; + } else { + buffer_size = mp3_info.samples / 2; + } + + if (channel_l_pcm == nullptr) { + last_buffer_size_channel_l = buffer_size * 2; + + if (last_buffer_size_channel_l == 0) { + last_buffer_size_channel_l = 0x1000; + } + + channel_l_pcm = (mp3d_sample_t*)calloc(last_buffer_size_channel_l, sizeof(mp3d_sample_t)); + } else if (buffer_size > last_buffer_size_channel_l) { + // realloc + last_buffer_size_channel_l = buffer_size * 2; + + if (last_buffer_size_channel_l == 0) { + last_buffer_size_channel_l = 0x1000; + } + + channel_l_pcm = (mp3d_sample_t*)realloc(channel_l_pcm, last_buffer_size_channel_l * sizeof(mp3d_sample_t)); + } + + if (channel_r_pcm == nullptr) { + last_buffer_size_channel_r = buffer_size * 2; + + if (last_buffer_size_channel_r == 0) { + last_buffer_size_channel_r = 0x1000; + } + + channel_r_pcm = (mp3d_sample_t*)calloc(last_buffer_size_channel_r, sizeof(mp3d_sample_t)); + } else if (buffer_size > last_buffer_size_channel_r) { + // realloc + last_buffer_size_channel_r = buffer_size * 2; + + if (last_buffer_size_channel_r == 0) { + last_buffer_size_channel_r = 0x1000; + } + + channel_r_pcm = (mp3d_sample_t*)realloc(channel_r_pcm, last_buffer_size_channel_r * sizeof(mp3d_sample_t)); + } + + if (mp3_info.channels == 1) { + memcpy(((int8_t*)channel_l_pcm) + (last_copied_samples * sizeof(mp3d_sample_t)), ((int8_t*)mp3_info.buffer) + (last_copied_samples * sizeof(mp3d_sample_t)), (buffer_size - last_copied_samples) * sizeof(mp3d_sample_t)); + memcpy(((int8_t*)channel_r_pcm) + (last_copied_samples * sizeof(mp3d_sample_t)), ((int8_t*)mp3_info.buffer) + (last_copied_samples * sizeof(mp3d_sample_t)), (buffer_size - last_copied_samples) * sizeof(mp3d_sample_t)); + } else { + for (size_t i = last_copied_samples; i < buffer_size; i++) { + channel_l_pcm[i] = mp3_info.buffer[i * sizeof(mp3d_sample_t)]; + channel_r_pcm[i] = mp3_info.buffer[i * sizeof(mp3d_sample_t) + 1]; + } + } + + last_copied_samples = buffer_size; + + if (last_copied_samples > SAMPLES_BUFFER) { + m_samples->update_raw(0, channel_l_pcm, buffer_size, mp3_info.hz, mp3_start_adr != mp3_dynamic_base); + m_samples->update_raw(1, channel_r_pcm, buffer_size, mp3_info.hz, mp3_start_adr != mp3_dynamic_base); + + mp3_next_sync = buffer_size - (buffer_size / 4); // Grab more data sometime before the current buffer ends. This is arbitrary and kinda hacky, but it worked best between various games in my testing. + } + } + + if (mp3_last_adr >= mp3_end_adr) { + decrypt_finished = true; + } } DEFINE_DEVICE_TYPE(KONAMI_573_DIGITAL_FPGA, k573fpga_device, "k573fpga", "Konami 573 Digital I/O FPGA") diff --git a/src/mame/machine/vino.cpp b/src/mame/machine/vino.cpp index af88fa129fc..0535ed1d567 100644 --- a/src/mame/machine/vino.cpp +++ b/src/mame/machine/vino.cpp @@ -85,135 +85,135 @@ READ32_MEMBER(vino_device::read) { switch (offset & ~1) { - case 0x0000/4: // Rev/ID + case 0x0000/4: // Rev/ID LOGMASKED(LOG_READS, "%s: Rev/ID read: %08x & %08x\n", machine().describe_context(), m_rev_id, mem_mask); return m_rev_id; - case 0x0008/4: // Control + case 0x0008/4: // Control LOGMASKED(LOG_READS, "%s: Control read: %08x & %08x\n", machine().describe_context(), m_control, mem_mask); return m_control; - case 0x0010/4: // Interrupt Status + case 0x0010/4: // Interrupt Status LOGMASKED(LOG_READS, "%s: Interrupt Status read: %08x & %08x\n", machine().describe_context(), m_int_status, mem_mask); return m_int_status; - case 0x0018/4: // I2C Control + case 0x0018/4: // I2C Control LOGMASKED(LOG_READS, "%s: I2C Control read: %08x & %08x\n", machine().describe_context(), m_i2c_ctrl, mem_mask); return m_i2c_ctrl; - case 0x0020/4: // I2C Data + case 0x0020/4: // I2C Data LOGMASKED(LOG_READS, "%s: I2C Data read: %08x & %08x\n", machine().describe_context(), m_i2c_data, mem_mask); return m_i2c_data; - case 0x0028/4: // ChA Alpha - case 0x00b0/4: // ChB ... + case 0x0028/4: // ChA Alpha + case 0x00b0/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Alpha read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_alpha, mem_mask); return m_channels[channel].m_alpha; } - case 0x0030/4: // ChA Clipping Start - case 0x00b8/4: // ChB ... + case 0x0030/4: // ChA Clipping Start + case 0x00b8/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Clipping Start read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_clip_start, mem_mask); return m_channels[channel].m_clip_start; } - case 0x0038/4: // ChA Clipping End - case 0x00c0/4: // ChB ... + case 0x0038/4: // ChA Clipping End + case 0x00c0/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Clipping End read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_clip_end, mem_mask); return m_channels[channel].m_clip_end; } - case 0x0040/4: // ChA Frame Rate - case 0x00c8/4: // ChB ... + case 0x0040/4: // ChA Frame Rate + case 0x00c8/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Frame Rate read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_frame_rate, mem_mask); return m_channels[channel].m_frame_rate; } - case 0x0048/4: // ChA Field Counter - case 0x00d0/4: // ChB ... + case 0x0048/4: // ChA Field Counter + case 0x00d0/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Field Counter read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_field_counter, mem_mask); return m_channels[channel].m_field_counter; } - case 0x0050/4: // ChA Line Size - case 0x00d8/4: // ChB ... + case 0x0050/4: // ChA Line Size + case 0x00d8/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Line Size read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_line_size, mem_mask); return m_channels[channel].m_line_size; } - case 0x0058/4: // ChA Line Counter - case 0x00e0/4: // ChB ... + case 0x0058/4: // ChA Line Counter + case 0x00e0/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Line Counter read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_line_counter, mem_mask); return m_channels[channel].m_line_counter; } - case 0x0060/4: // ChA Page Index - case 0x00e8/4: // ChB ... + case 0x0060/4: // ChA Page Index + case 0x00e8/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Page Index read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_page_index, mem_mask); return m_channels[channel].m_page_index; } - case 0x0068/4: // ChA Pointer to Next Four Descriptors - case 0x00f0/4: // ChB ... + case 0x0068/4: // ChA Pointer to Next Four Descriptors + case 0x00f0/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Pointer to Next Four Descriptors read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_next_desc_ptr, mem_mask); return m_channels[channel].m_next_desc_ptr; } - case 0x0070/4: // ChA Pointer to Start of Descriptor Table - case 0x00f8/4: // ChB ... + case 0x0070/4: // ChA Pointer to Start of Descriptor Table + case 0x00f8/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Pointer to Start of Descriptor Table read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_start_desc_ptr, mem_mask); return m_channels[channel].m_start_desc_ptr; } - case 0x0078/4: // ChA Descriptor 0 - case 0x0100/4: // ChB ... + case 0x0078/4: // ChA Descriptor 0 + case 0x0100/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Descriptor 0 Data read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_descriptors[0], mem_mask); return m_channels[channel].m_descriptors[0]; } - case 0x0080/4: // ChA Descriptor 1 - case 0x0108/4: // ChB ... + case 0x0080/4: // ChA Descriptor 1 + case 0x0108/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Descriptor 1 Data read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_descriptors[1], mem_mask); return m_channels[channel].m_descriptors[1]; } - case 0x0088/4: // ChA Descriptor 2 - case 0x0110/4: // ChB ... + case 0x0088/4: // ChA Descriptor 2 + case 0x0110/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Descriptor 2 Data read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_descriptors[2], mem_mask); return m_channels[channel].m_descriptors[2]; } - case 0x0090/4: // ChA Descriptor 3 - case 0x0118/4: // ChB ... + case 0x0090/4: // ChA Descriptor 3 + case 0x0118/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c Descriptor 3 Data read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_descriptors[3], mem_mask); return m_channels[channel].m_descriptors[3]; } - case 0x0098/4: // ChA FIFO Threshold - case 0x0120/4: // ChB ... + case 0x0098/4: // ChA FIFO Threshold + case 0x0120/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c FIFO Threshold read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_fifo_threshold, mem_mask); return m_channels[channel].m_fifo_threshold; } - case 0x00a0/4: // ChA FIFO Read Pointer - case 0x0128/4: // ChB ... + case 0x00a0/4: // ChA FIFO Read Pointer + case 0x0128/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c FIFO Read Pointer read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_fifo_gio_ptr, mem_mask); return m_channels[channel].m_fifo_gio_ptr; } - case 0x00a8/4: // ChA FIFO Write Pointer - case 0x0130/4: // ChB ... + case 0x00a8/4: // ChA FIFO Write Pointer + case 0x0130/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_READS, "%s: Ch%c FIFO Write Pointer read: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', m_channels[channel].m_fifo_video_ptr, mem_mask); @@ -230,14 +230,14 @@ WRITE32_MEMBER(vino_device::write) { switch (offset & ~1) { - case 0x0000/4: // Rev/ID + case 0x0000/4: // Rev/ID LOGMASKED(LOG_WRITES, "%s: Rev/ID write (ignored): %08x & %08x\n", machine().describe_context(), data, mem_mask); break; - case 0x0008/4: // Control + case 0x0008/4: // Control LOGMASKED(LOG_WRITES, "%s: Control write: %08x & %08x\n", machine().describe_context(), data, mem_mask); m_control = data & CTRL_MASK; break; - case 0x0010/4: // Interrupt Status + case 0x0010/4: // Interrupt Status LOGMASKED(LOG_WRITES, "%s: Interrupt Status write: %08x & %08x\n", machine().describe_context(), data, mem_mask); for (uint32_t i = 0; i < 6; i++) { @@ -248,95 +248,95 @@ WRITE32_MEMBER(vino_device::write) } // TODO: Handle interrupt all-clear break; - case 0x0018/4: // I2C Control + case 0x0018/4: // I2C Control LOGMASKED(LOG_WRITES, "%s: I2C Control write: %08x & %08x\n", machine().describe_context(), data, mem_mask); m_i2c_ctrl = data & I2C_CTRL_MASK; break; - case 0x0020/4: // I2C Data + case 0x0020/4: // I2C Data LOGMASKED(LOG_WRITES, "%s: I2C Data write: %08x & %08x\n", machine().describe_context(), data, mem_mask); m_i2c_data = data & I2C_DATA_MASK; break; - case 0x0028/4: // ChA Alpha - case 0x00b0/4: // ChB ... + case 0x0028/4: // ChA Alpha + case 0x00b0/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Alpha write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); m_channels[channel].m_alpha = data & ALPHA_MASK; break; } - case 0x0030/4: // ChA Clipping Start - case 0x00b8/4: // ChB ... + case 0x0030/4: // ChA Clipping Start + case 0x00b8/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Clipping Start write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); m_channels[channel].m_clip_start = data & CLIP_REG_MASK; break; } - case 0x0038/4: // ChA Clipping End - case 0x00c0/4: // ChB ... + case 0x0038/4: // ChA Clipping End + case 0x00c0/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Clipping End write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); m_channels[channel].m_clip_end = data & CLIP_REG_MASK; break; } - case 0x0040/4: // ChA Frame Rate - case 0x00c8/4: // ChB ... + case 0x0040/4: // ChA Frame Rate + case 0x00c8/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Frame Rate write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); m_channels[channel].m_frame_rate = data & FRAME_RATE_REG_MASK; break; } - case 0x0048/4: // ChA Field Counter - case 0x00d0/4: // ChB ... + case 0x0048/4: // ChA Field Counter + case 0x00d0/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Field Counter write (ignored): %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); break; } - case 0x0050/4: // ChA Line Size - case 0x00d8/4: // ChB ... + case 0x0050/4: // ChA Line Size + case 0x00d8/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Line Size write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); m_channels[channel].m_line_size = data & LINE_SIZE_MASK; break; } - case 0x0058/4: // ChA Line Counter - case 0x00e0/4: // ChB ... + case 0x0058/4: // ChA Line Counter + case 0x00e0/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Line Counter write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); m_channels[channel].m_line_counter = data & LINE_COUNTER_MASK; break; } - case 0x0060/4: // ChA Page Index - case 0x00e8/4: // ChB ... + case 0x0060/4: // ChA Page Index + case 0x00e8/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Page Index write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); m_channels[channel].m_page_index = data & PAGE_INDEX_MASK; break; } - case 0x0068/4: // ChA Pointer to Next Four Descriptors - case 0x00f0/4: // ChB ... + case 0x0068/4: // ChA Pointer to Next Four Descriptors + case 0x00f0/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Pointer to Next Four Descriptors write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); m_channels[channel].m_next_desc_ptr = data & DESC_PTR_MASK; break; } - case 0x0070/4: // ChA Pointer to Start of Descriptor Table - case 0x00f8/4: // ChB ... + case 0x0070/4: // ChA Pointer to Start of Descriptor Table + case 0x00f8/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Pointer to Start of Descriptor Table write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); m_channels[channel].m_start_desc_ptr = data & DESC_PTR_MASK; break; } - case 0x0078/4: // ChA Descriptor 0 - case 0x0100/4: // ChB ... + case 0x0078/4: // ChA Descriptor 0 + case 0x0100/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Descriptor 0 Data write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); @@ -344,8 +344,8 @@ WRITE32_MEMBER(vino_device::write) m_channels[channel].m_descriptors[0] |= DESC_VALID_BIT; // TODO: Unsure if this is right break; } - case 0x0080/4: // ChA Descriptor 1 - case 0x0108/4: // ChB ... + case 0x0080/4: // ChA Descriptor 1 + case 0x0108/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Descriptor 1 Data write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); @@ -353,8 +353,8 @@ WRITE32_MEMBER(vino_device::write) m_channels[channel].m_descriptors[1] |= DESC_VALID_BIT; // TODO: Unsure if this is right break; } - case 0x0088/4: // ChA Descriptor 2 - case 0x0110/4: // ChB ... + case 0x0088/4: // ChA Descriptor 2 + case 0x0110/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Descriptor 2 Data write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); @@ -362,8 +362,8 @@ WRITE32_MEMBER(vino_device::write) m_channels[channel].m_descriptors[2] |= DESC_VALID_BIT; // TODO: Unsure if this is right break; } - case 0x0090/4: // ChA Descriptor 3 - case 0x0118/4: // ChB ... + case 0x0090/4: // ChA Descriptor 3 + case 0x0118/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c Descriptor 3 Data write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); @@ -371,23 +371,23 @@ WRITE32_MEMBER(vino_device::write) m_channels[channel].m_descriptors[3] |= DESC_VALID_BIT; // TODO: Unsure if this is right break; } - case 0x0098/4: // ChA FIFO Threshold - case 0x0120/4: // ChB ... + case 0x0098/4: // ChA FIFO Threshold + case 0x0120/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c FIFO Threshold write: %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); m_channels[channel].m_fifo_threshold = data & FIFO_MASK; break; } - case 0x00a0/4: // ChA FIFO Read Pointer - case 0x0128/4: // ChB ... + case 0x00a0/4: // ChA FIFO Read Pointer + case 0x0128/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c FIFO Read Pointer write (ignored): %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); break; } - case 0x00a8/4: // ChA FIFO Write Pointer - case 0x0130/4: // ChB ... + case 0x00a8/4: // ChA FIFO Write Pointer + case 0x0130/4: // ChB ... { const uint32_t channel = (offset < 0x00b0/4) ? 0 : 1; LOGMASKED(LOG_WRITES, "%s: Ch%c FIFO Write Pointer write (ignored): %08x & %08x\n", machine().describe_context(), channel ? 'B' : 'A', data, mem_mask); diff --git a/src/mame/machine/vino.h b/src/mame/machine/vino.h index 0280e8d6ae2..d7b5b6ada8f 100644 --- a/src/mame/machine/vino.h +++ b/src/mame/machine/vino.h @@ -36,99 +36,99 @@ private: enum { - CTRL_MASK = 0x7fffffff, - - CTRL_ENDIAN_BIG = (0 << 0), - CTRL_ENDIAN_LITTLE = (1 << 0), - - CTRL_CHA_FIELD_INT_EN = (1 << 1), - CTRL_CHA_FIFO_INT_EN = (1 << 2), - CTRL_CHA_DESC_INT_EN = (1 << 3), - - CTRL_CHB_FIELD_INT_EN = (1 << 4), - CTRL_CHB_FIFO_INT_EN = (1 << 5), - CTRL_CHB_DESC_INT_EN = (1 << 6), - - CTRL_CHA_DMA_EN = (1 << 7), - CTRL_CHA_INTERLEAVE_EN = (1 << 8), - CTRL_CHA_SYNC_EN = (1 << 9), - CTRL_CHA_SELECT_PHILIPS = (0 << 10), - CTRL_CHA_SELECT_D1 = (1 << 10), - CTRL_CHA_COLOR_SPACE_YUV = (0 << 11), - CTRL_CHA_COLOR_SPACE_RGB = (1 << 11), - CTRL_CHA_LUMA_ONLY = (1 << 12), - CTRL_CHA_DECIMATE_EN = (1 << 13), - CTRL_CHA_DECIMATION_SHIFT = 14, - CTRL_CHA_DECIMATION_MASK = 0x7, - CTRL_CHA_DECIMATE_HORIZ_EN = (1 << 17), - CTRL_CHA_DITHER_EN = (1 << 18), - - CTRL_CHB_DMA_EN = (1 << 19), - CTRL_CHB_INTERLEAVE_EN = (1 << 20), - CTRL_CHB_SYNC_EN = (1 << 21), - CTRL_CHB_SELECT_PHILIPS = (0 << 22), - CTRL_CHB_SELECT_D1 = (1 << 22), - CTRL_CHB_COLOR_SPACE_YUV = (0 << 23), - CTRL_CHB_COLOR_SPACE_RGB = (1 << 23), - CTRL_CHB_LUMA_ONLY = (1 << 24), - CTRL_CHB_DECIMATE_EN = (1 << 25), - CTRL_CHB_DECIMATION_SHIFT = 26, - CTRL_CHB_DECIMATION_MASK = 0x7, - CTRL_CHB_DECIMATE_HORIZ_EN = (1 << 29), - CTRL_CHB_DITHER_EN = (1 << 30), - - ISR_CHA_EOF = (1 << 0), - ISR_CHA_FIFO = (1 << 1), - ISR_CHA_DESC = (1 << 2), - ISR_CHB_EOF = (1 << 3), - ISR_CHB_FIFO = (1 << 4), - ISR_CHB_DESC = (1 << 5), - - ALPHA_MASK = 0xff, - - CLIP_X_SHIFT = 0, - CLIP_X_MASK = 0x03ff, - CLIP_YODD_SHIFT = 10, - CLIP_YODD_MASK = 0x01ff, - CLIP_YEVEN_SHIFT = 19, - CLIP_YEVEN_MASK = 0x01ff, - CLIP_REG_MASK = (CLIP_X_MASK << CLIP_X_SHIFT) | (CLIP_YODD_MASK << CLIP_YODD_SHIFT) | (CLIP_YEVEN_MASK << CLIP_YEVEN_SHIFT), - - FRAME_RATE_NTSC = (0 << 0), - FRAME_RATE_PAL = (1 << 0), - FRAME_RATE_SHIFT = 1, - FRAME_RATE_MASK = 0x0fff, - FRAME_RATE_REG_MASK = 0x1fff, - - FIELD_COUNTER_MASK = 0xffff, - LINE_SIZE_MASK = 0x0ff8, - LINE_COUNTER_MASK = 0x0ff8, - PAGE_INDEX_MASK = 0x0ff8, - - DESC_PTR_MASK = 0xfffffff0, - - DESC_VALID_BIT = (1ULL << 32), - DESC_STOP_BIT = (1ULL << 31), - DESC_JUMP_BIT = (1ULL << 30), - DESC_DATA_MASK = 0x00000000ffffffffULL, - - FIFO_MASK = 0x03f8, - - I2C_CTRL_IDLE = (0 << 0), - I2C_CTRL_BUSY = (1 << 0), - I2C_CTRL_FORCE_IDLE = (0 << 0), - I2C_BUS_DIR_WRITE = (0 << 1), - I2C_BUS_DIR_READ = (1 << 1), - I2C_LAST_RELEASE = (0 << 2), - I2C_LAST_HOLD = (1 << 2), - I2C_XFER_DONE = (0 << 4), - I2C_XFER_BUSY = (1 << 4), - I2C_ACK_RECEIVED = (0 << 5), - I2C_ACK_NOT_RECEIVED = (1 << 5), - I2C_BUS_ERROR = (1 << 7), - I2C_CTRL_MASK = 0xb7, - - I2C_DATA_MASK = 0xff + CTRL_MASK = 0x7fffffff, + + CTRL_ENDIAN_BIG = (0 << 0), + CTRL_ENDIAN_LITTLE = (1 << 0), + + CTRL_CHA_FIELD_INT_EN = (1 << 1), + CTRL_CHA_FIFO_INT_EN = (1 << 2), + CTRL_CHA_DESC_INT_EN = (1 << 3), + + CTRL_CHB_FIELD_INT_EN = (1 << 4), + CTRL_CHB_FIFO_INT_EN = (1 << 5), + CTRL_CHB_DESC_INT_EN = (1 << 6), + + CTRL_CHA_DMA_EN = (1 << 7), + CTRL_CHA_INTERLEAVE_EN = (1 << 8), + CTRL_CHA_SYNC_EN = (1 << 9), + CTRL_CHA_SELECT_PHILIPS = (0 << 10), + CTRL_CHA_SELECT_D1 = (1 << 10), + CTRL_CHA_COLOR_SPACE_YUV = (0 << 11), + CTRL_CHA_COLOR_SPACE_RGB = (1 << 11), + CTRL_CHA_LUMA_ONLY = (1 << 12), + CTRL_CHA_DECIMATE_EN = (1 << 13), + CTRL_CHA_DECIMATION_SHIFT = 14, + CTRL_CHA_DECIMATION_MASK = 0x7, + CTRL_CHA_DECIMATE_HORIZ_EN = (1 << 17), + CTRL_CHA_DITHER_EN = (1 << 18), + + CTRL_CHB_DMA_EN = (1 << 19), + CTRL_CHB_INTERLEAVE_EN = (1 << 20), + CTRL_CHB_SYNC_EN = (1 << 21), + CTRL_CHB_SELECT_PHILIPS = (0 << 22), + CTRL_CHB_SELECT_D1 = (1 << 22), + CTRL_CHB_COLOR_SPACE_YUV = (0 << 23), + CTRL_CHB_COLOR_SPACE_RGB = (1 << 23), + CTRL_CHB_LUMA_ONLY = (1 << 24), + CTRL_CHB_DECIMATE_EN = (1 << 25), + CTRL_CHB_DECIMATION_SHIFT = 26, + CTRL_CHB_DECIMATION_MASK = 0x7, + CTRL_CHB_DECIMATE_HORIZ_EN = (1 << 29), + CTRL_CHB_DITHER_EN = (1 << 30), + + ISR_CHA_EOF = (1 << 0), + ISR_CHA_FIFO = (1 << 1), + ISR_CHA_DESC = (1 << 2), + ISR_CHB_EOF = (1 << 3), + ISR_CHB_FIFO = (1 << 4), + ISR_CHB_DESC = (1 << 5), + + ALPHA_MASK = 0xff, + + CLIP_X_SHIFT = 0, + CLIP_X_MASK = 0x03ff, + CLIP_YODD_SHIFT = 10, + CLIP_YODD_MASK = 0x01ff, + CLIP_YEVEN_SHIFT = 19, + CLIP_YEVEN_MASK = 0x01ff, + CLIP_REG_MASK = (CLIP_X_MASK << CLIP_X_SHIFT) | (CLIP_YODD_MASK << CLIP_YODD_SHIFT) | (CLIP_YEVEN_MASK << CLIP_YEVEN_SHIFT), + + FRAME_RATE_NTSC = (0 << 0), + FRAME_RATE_PAL = (1 << 0), + FRAME_RATE_SHIFT = 1, + FRAME_RATE_MASK = 0x0fff, + FRAME_RATE_REG_MASK = 0x1fff, + + FIELD_COUNTER_MASK = 0xffff, + LINE_SIZE_MASK = 0x0ff8, + LINE_COUNTER_MASK = 0x0ff8, + PAGE_INDEX_MASK = 0x0ff8, + + DESC_PTR_MASK = 0xfffffff0, + + DESC_VALID_BIT = (1ULL << 32), + DESC_STOP_BIT = (1ULL << 31), + DESC_JUMP_BIT = (1ULL << 30), + DESC_DATA_MASK = 0x00000000ffffffffULL, + + FIFO_MASK = 0x03f8, + + I2C_CTRL_IDLE = (0 << 0), + I2C_CTRL_BUSY = (1 << 0), + I2C_CTRL_FORCE_IDLE = (0 << 0), + I2C_BUS_DIR_WRITE = (0 << 1), + I2C_BUS_DIR_READ = (1 << 1), + I2C_LAST_RELEASE = (0 << 2), + I2C_LAST_HOLD = (1 << 2), + I2C_XFER_DONE = (0 << 4), + I2C_XFER_BUSY = (1 << 4), + I2C_ACK_RECEIVED = (0 << 5), + I2C_ACK_NOT_RECEIVED = (1 << 5), + I2C_BUS_ERROR = (1 << 7), + I2C_CTRL_MASK = 0xb7, + + I2C_DATA_MASK = 0xff }; struct channel_t diff --git a/src/mame/video/galaga.cpp b/src/mame/video/galaga.cpp index 58ae9e4533d..7de370c1713 100644 --- a/src/mame/video/galaga.cpp +++ b/src/mame/video/galaga.cpp @@ -384,33 +384,33 @@ void galaga_state::galaga_palette(palette_device &palette) const /*************************************************************************** - Star field documentation + Star field documentation - Couriersud, May 2019: + Couriersud, May 2019: - The code below was manually applied based on a pull request from - Jindřich Makovička. He based his work on information published by - Wolfgang Scherr about the 05XX on pin4.at. + The code below was manually applied based on a pull request from + Jindřich Makovička. He based his work on information published by + Wolfgang Scherr about the 05XX on pin4.at. - Wolfgang shared is VHDL implementation with the MAME team. I have - created a spreadsheet implementation for his decode logic. + Wolfgang shared is VHDL implementation with the MAME team. I have + created a spreadsheet implementation for his decode logic. - Both implementations use the same Galois type LFSR( tap 15,12,10,5). - Using the same seed value, the following holds true: + Both implementations use the same Galois type LFSR( tap 15,12,10,5). + Using the same seed value, the following holds true: - Decode_W(lfsr[t-4]) = Decode_J(lfsr[t]) + Decode_W(lfsr[t-4]) = Decode_J(lfsr[t]) - The two decoding algorithm (Wolfgang, Jindřich) thus deliver the same - results but with a 4 clock difference. + The two decoding algorithm (Wolfgang, Jindřich) thus deliver the same + results but with a 4 clock difference. - Jindřich's code filters out stars with y<4. This matches the starfield - measurements documented above. Wolfgang states that his code matches his - measurements and there are stars with y<4. - We need to have a closer look at this. + Jindřich's code filters out stars with y<4. This matches the starfield + measurements documented above. Wolfgang states that his code matches his + measurements and there are stars with y<4. + We need to have a closer look at this. - Both implementations are complex compared to other star field gnerators - used in the industry. We thus now have two decoding solutions matching - the output. I wonder if there is a simpler one. + Both implementations are complex compared to other star field gnerators + used in the industry. We thus now have two decoding solutions matching + the output. I wonder if there is a simpler one. ***************************************************************************/ @@ -433,11 +433,11 @@ void galaga_state::starfield_init() uint16_t xor2 = xor1 ^ (i >> 2); uint16_t oe = (sf1 ? 0 : 0x4000) | ((sf1 ^ sf2) ? 0 : 0x1000); if ((i & 0x8007) == 0x8007 - && (~i & 0x2008) == 0x2008 - && (xor1 & 0x0100) == (sf1 ? 0 : 0x0100) - && (xor2 & 0x0040) == (sf2 ? 0 : 0x0040) - && (i & 0x5000) == oe - && cnt >= 256 * 4) + && (~i & 0x2008) == 0x2008 + && (xor1 & 0x0100) == (sf1 ? 0 : 0x0100) + && (xor2 & 0x0040) == (sf2 ? 0 : 0x0040) + && (i & 0x5000) == oe + && cnt >= 256 * 4) { // color lookup uint16_t xor3 = (i >> 1) ^ (i >> 6); diff --git a/src/mame/video/sknsspr.cpp b/src/mame/video/sknsspr.cpp index 83d7c7749e8..a5ef849c4c4 100644 --- a/src/mame/video/sknsspr.cpp +++ b/src/mame/video/sknsspr.cpp @@ -12,8 +12,8 @@ - Get rid of sprite position kludges - Fix zooming precision/rounding (most noticeable on jchan backgrounds) - RLE uses fifo7200 chips - - reference + + reference - jchan : https://youtu.be/PJijmhRwMUk */ diff --git a/src/mame/video/tutankhm.cpp b/src/mame/video/tutankhm.cpp index eaf4560d316..8df4f9e6f3f 100644 --- a/src/mame/video/tutankhm.cpp +++ b/src/mame/video/tutankhm.cpp @@ -12,8 +12,8 @@ #include "includes/tutankhm.h" #include "video/resnet.h" -#define STAR_RNG_PERIOD ((1 << 17) - 1) -#define RGB_MAXIMUM 224 +#define STAR_RNG_PERIOD ((1 << 17) - 1) +#define RGB_MAXIMUM 224 /************************************* * -- cgit v1.2.3