diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mame/drivers/ddenlovr.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/equites.c | 153 | ||||
-rw-r--r-- | src/mame/drivers/microkit.c | 97 | ||||
-rw-r--r-- | src/mame/includes/equites.h | 29 | ||||
-rw-r--r-- | src/mame/video/equites.c | 8 |
5 files changed, 175 insertions, 114 deletions
diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c index f0cf098b7bc..9ffefd6c454 100644 --- a/src/mame/drivers/ddenlovr.c +++ b/src/mame/drivers/ddenlovr.c @@ -697,7 +697,7 @@ INLINE int fetch_bit( UINT8 *src_data, int src_len, int *bit_addr ) if (baddr / 8 >= src_len) { #ifdef MAME_DEBUG - popmessage("GFX ROM OVER %06x", baddr / 8); +// popmessage("GFX ROM OVER %06x", baddr / 8); #endif return 1; } diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c index ef3cde2eb57..a6aab2c34dc 100644 --- a/src/mame/drivers/equites.c +++ b/src/mame/drivers/equites.c @@ -524,12 +524,8 @@ WRITE_LINE_MEMBER(equites_state::equites_msm5232_gate) /******************************************************************************/ -// Local Functions - -/******************************************************************************/ // Interrupt Handlers -// Equites Hardware TIMER_DEVICE_CALLBACK_MEMBER(equites_state::equites_scanline) { int scanline = param; @@ -596,28 +592,20 @@ WRITE8_MEMBER(equites_state::equites_8155_w) /******************************************************************************/ -// Main CPU Handlers +// CPU Handlers -CUSTOM_INPUT_MEMBER(equites_state::gekisou_unknown_status) +CUSTOM_INPUT_MEMBER(equites_state::gekisou_unknown_bit_r) { - return m_unknown_bit; + return m_gekisou_unknown_bit; } -WRITE16_MEMBER(equites_state::gekisou_unknown_0_w) +WRITE16_MEMBER(equites_state::gekisou_unknown_bit_w) { - m_unknown_bit = 0; -} - -WRITE16_MEMBER(equites_state::gekisou_unknown_1_w) -{ - m_unknown_bit = 1; + // data bit is A16 (offset) + m_gekisou_unknown_bit = (offset == 0) ? 0 : 1;; } - -/******************************************************************************/ -// Main CPU Memory Map - READ16_MEMBER(equites_state::equites_spriteram_kludge_r) { if (m_spriteram[0] == 0x5555) @@ -659,10 +647,14 @@ WRITE16_MEMBER(equites_state::mcu_switch_w) } + +/******************************************************************************/ +// CPU Memory Maps + static ADDRESS_MAP_START( equites_map, AS_PROGRAM, 16, equites_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x000000, 0x00ffff) AM_ROM // ROM area is written several times (dev system?) - AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("nvram") // nvram is for gekisou only + AM_RANGE(0x040000, 0x040fff) AM_RAM AM_RANGE(0x080000, 0x080fff) AM_READWRITE8(equites_fg_videoram_r, equites_fg_videoram_w, 0x00ff) AM_RANGE(0x0c0000, 0x0c01ff) AM_RAM_WRITE(equites_bg_videoram_w) AM_SHARE("bg_videoram") AM_RANGE(0x0c0200, 0x0c0fff) AM_RAM @@ -675,15 +667,20 @@ static ADDRESS_MAP_START( equites_map, AS_PROGRAM, 16, equites_state ) AM_RANGE(0x18c000, 0x18c001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(mcu_switch_w) AM_RANGE(0x1c0000, 0x1c0001) AM_READ_PORT("IN0") AM_WRITE(equites_scrollreg_w) AM_RANGE(0x380000, 0x380001) AM_WRITE8(equites_bgcolor_w, 0xff00) - // 580000 unknown (protection?) (gekisou only, installed by DRIVER_INIT) - // 5a0000 unknown (protection?) (gekisou only, installed by DRIVER_INIT) AM_RANGE(0x780000, 0x780001) AM_WRITE(watchdog_reset16_w) ADDRESS_MAP_END +static ADDRESS_MAP_START( gekisou_map, AS_PROGRAM, 16, equites_state ) + AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("nvram") // mainram is battery-backed + AM_RANGE(0x580000, 0x580001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE(gekisou_unknown_bit_w) + AM_IMPORT_FROM( equites_map ) +ADDRESS_MAP_END + + static ADDRESS_MAP_START( splndrbt_map, AS_PROGRAM, 16, equites_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x000000, 0x00ffff) AM_ROM - AM_RANGE(0x040000, 0x040fff) AM_RAM AM_SHARE("workram") + AM_RANGE(0x040000, 0x040fff) AM_RAM AM_RANGE(0x080000, 0x080001) AM_READ_PORT("IN0") AM_RANGE(0x0c0000, 0x0c0001) AM_READ_PORT("IN1") AM_RANGE(0x0c0000, 0x0c0001) AM_MIRROR(0x020000) AM_MASK(0x020000) AM_WRITE8(equites_bgcolor_w, 0xff00) // note: addressmask does not apply here @@ -702,6 +699,7 @@ static ADDRESS_MAP_START( splndrbt_map, AS_PROGRAM, 16, equites_state ) AM_RANGE(0x600100, 0x6001ff) AM_RAM AM_SHARE("spriteram_2") // sprite RAM 2 (8-bit) ADDRESS_MAP_END + static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, equites_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) @@ -780,7 +778,7 @@ static INPUT_PORTS_START( equites ) /* this is actually a variable resistor */ PORT_START(FRQ_ADJUSTER_TAG) - PORT_ADJUSTER(25, "MSM5232 Clock") + PORT_ADJUSTER(25, "MSM5232 Clock") // approximate factory setting INPUT_PORTS_END /******************************************************************************/ @@ -799,11 +797,11 @@ static INPUT_PORTS_START( gekisou ) PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, equites_state,gekisou_unknown_status, NULL) + PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, equites_state, gekisou_unknown_bit_r, NULL) /* this is actually a variable resistor */ PORT_START(FRQ_ADJUSTER_TAG) - PORT_ADJUSTER(24, "MSM5232 Clock") + PORT_ADJUSTER(24, "MSM5232 Clock") // approximate factory setting INPUT_PORTS_END /******************************************************************************/ @@ -836,7 +834,7 @@ static INPUT_PORTS_START( bullfgtr ) /* this is actually a variable resistor */ PORT_START(FRQ_ADJUSTER_TAG) - PORT_ADJUSTER(33, "MSM5232 Clock") + PORT_ADJUSTER(33, "MSM5232 Clock") // approximate factory setting INPUT_PORTS_END /******************************************************************************/ @@ -869,7 +867,7 @@ static INPUT_PORTS_START( kouyakyu ) /* this is actually a variable resistor */ PORT_START(FRQ_ADJUSTER_TAG) - PORT_ADJUSTER(33, "MSM5232 Clock") + PORT_ADJUSTER(33, "MSM5232 Clock") // approximate factory setting INPUT_PORTS_END /******************************************************************************/ @@ -902,7 +900,7 @@ static INPUT_PORTS_START( splndrbt ) /* this is actually a variable resistor */ PORT_START(FRQ_ADJUSTER_TAG) - PORT_ADJUSTER(28, "MSM5232 Clock") + PORT_ADJUSTER(28, "MSM5232 Clock") // approximate factory setting INPUT_PORTS_END /******************************************************************************/ @@ -951,7 +949,7 @@ static INPUT_PORTS_START( hvoltage ) /* this is actually a variable resistor */ PORT_START(FRQ_ADJUSTER_TAG) - PORT_ADJUSTER(27, "MSM5232 Clock") + PORT_ADJUSTER(27, "MSM5232 Clock") // approximate factory setting INPUT_PORTS_END @@ -1088,8 +1086,27 @@ MACHINE_CONFIG_END /******************************************************************************/ -MACHINE_START_MEMBER(equites_state,equites) +void equites_state::machine_start() { + // zerofill + m_fg_char_bank = 0; + m_bgcolor = 0; + m_splndrbt_bg_scrollx = 0; + m_splndrbt_bg_scrolly = 0; + m_sound_prom_address = 0; + m_dac_latch = 0; + m_eq8155_port_b = 0; + m_eq8155_port_a = 0; + m_eq8155_port_c = 0; + m_ay_port_a = 0; + m_ay_port_b = 0; + m_eq_cymbal_ctrl = 0; + m_cymvol = 0.0; + m_hihatvol = 0.0; + m_timer_count = 0; + m_gekisou_unknown_bit = 0; + + // register for savestates save_item(NAME(m_fg_char_bank)); save_item(NAME(m_bgcolor)); save_item(NAME(m_splndrbt_bg_scrollx)); @@ -1105,7 +1122,7 @@ MACHINE_START_MEMBER(equites_state,equites) save_item(NAME(m_cymvol)); save_item(NAME(m_hihatvol)); save_item(NAME(m_timer_count)); - save_item(NAME(m_unknown_bit)); + save_item(NAME(m_gekisou_unknown_bit)); m_nmi_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(equites_state::equites_nmi_callback), this)); @@ -1113,26 +1130,9 @@ MACHINE_START_MEMBER(equites_state,equites) m_adjuster_timer->adjust(attotime::from_hz(60), 0, attotime::from_hz(60)); } -MACHINE_RESET_MEMBER(equites_state,equites) +void equites_state::machine_reset() { flip_screen_set(0); - - m_fg_char_bank = 0; - m_bgcolor = 0; - m_splndrbt_bg_scrollx = 0; - m_splndrbt_bg_scrolly = 0; - m_sound_prom_address = 0; - m_dac_latch = 0; - m_eq8155_port_b = 0; - m_eq8155_port_a = 0; - m_eq8155_port_c = 0; - m_ay_port_a = 0; - m_ay_port_b = 0; - m_eq_cymbal_ctrl = 0; - m_cymvol = 0.0; - m_hihatvol = 0.0; - m_timer_count = 0; - m_unknown_bit = 0; } @@ -1162,13 +1162,14 @@ static MACHINE_CONFIG_START( equites, equites_state ) MCFG_PALETTE_INIT_OWNER(equites_state,equites) MCFG_VIDEO_START_OVERRIDE(equites_state,equites) - - MCFG_MACHINE_START_OVERRIDE(equites_state,equites) - MCFG_MACHINE_RESET_OVERRIDE(equites_state,equites) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( gekisou, equites ) + /* basic machine hardware */ + MCFG_CPU_MODIFY("maincpu") + MCFG_CPU_PROGRAM_MAP(gekisou_map) + // mcu not dumped, so add simulated mcu MCFG_CPU_ADD("mcu", ALPHA8301L, 4000000/8) MCFG_CPU_PROGRAM_MAP(mcu_map) @@ -1204,9 +1205,6 @@ static MACHINE_CONFIG_START( splndrbt, equites_state ) MCFG_PALETTE_INIT_OWNER(equites_state,splndrbt) MCFG_VIDEO_START_OVERRIDE(equites_state,splndrbt) - - MCFG_MACHINE_START_OVERRIDE(equites_state,equites) - MCFG_MACHINE_RESET_OVERRIDE(equites_state,equites) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( hvoltage, splndrbt ) @@ -1770,19 +1768,18 @@ ROM_END /******************************************************************************/ // Initializations -void equites_state::unpack_block( const char *region, int offset, int size ) +void equites_state::unpack_block(const char *region, int offset, int size) { UINT8 *rom = memregion(region)->base(); - int i; - for (i = 0; i < size; ++i) + for (int i = 0; i < size; i++) { rom[(offset + i + size)] = (rom[(offset + i)] >> 4); rom[(offset + i)] &= 0x0f; } } -void equites_state::unpack_region( const char *region ) +void equites_state::unpack_region(const char *region) { unpack_block(region, 0x0000, 0x2000); unpack_block(region, 0x4000, 0x2000); @@ -1795,28 +1792,6 @@ DRIVER_INIT_MEMBER(equites_state,equites) unpack_region("gfx3"); } -DRIVER_INIT_MEMBER(equites_state,bullfgtr) -{ - unpack_region("gfx2"); - unpack_region("gfx3"); -} - -DRIVER_INIT_MEMBER(equites_state,kouyakyu) -{ - unpack_region("gfx2"); - unpack_region("gfx3"); -} - -DRIVER_INIT_MEMBER(equites_state,gekisou) -{ - unpack_region("gfx2"); - unpack_region("gfx3"); - - // install special handlers for unknown device (protection?) - m_maincpu->space(AS_PROGRAM).install_write_handler(0x580000, 0x580001, write16_delegate(FUNC(equites_state::gekisou_unknown_0_w),this)); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x5a0000, 0x5a0001, write16_delegate(FUNC(equites_state::gekisou_unknown_1_w),this)); -} - DRIVER_INIT_MEMBER(equites_state,splndrbt) { unpack_region("gfx3"); @@ -1829,13 +1804,13 @@ DRIVER_INIT_MEMBER(equites_state,splndrbt) // Game Entries // Equites Hardware -GAME( 1984, equites, 0, equites, equites, equites_state, equites, ROT90, "Alpha Denshi Co.", "Equites", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, equitess, equites, equites, equites, equites_state, equites, ROT90, "Alpha Denshi Co. (Sega license)", "Equites (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, bullfgtr, 0, equites, bullfgtr, equites_state, bullfgtr, ROT90, "Alpha Denshi Co.", "Bull Fighter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, bullfgtrs,bullfgtr, equites, bullfgtr, equites_state, bullfgtr, ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, kouyakyu, 0, equites, kouyakyu, equites_state, kouyakyu, ROT0, "Alpha Denshi Co.", "The Koukou Yakyuu", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, gekisou, 0, gekisou, gekisou, equites_state, gekisou, ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, equites, 0, equites, equites, equites_state, equites, ROT90, "Alpha Denshi Co.", "Equites", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, equitess, equites, equites, equites, equites_state, equites, ROT90, "Alpha Denshi Co. (Sega license)", "Equites (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, bullfgtr, 0, equites, bullfgtr, equites_state, equites, ROT90, "Alpha Denshi Co.", "Bull Fighter", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, bullfgtrs, bullfgtr, equites, bullfgtr, equites_state, equites, ROT90, "Alpha Denshi Co. (Sega license)", "Bull Fighter (Sega)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, kouyakyu, 0, equites, kouyakyu, equites_state, equites, ROT0, "Alpha Denshi Co.", "The Koukou Yakyuu", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, gekisou, 0, gekisou, gekisou, equites_state, equites, ROT90, "Eastern Corp.", "Gekisou (Japan)", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // Splendor Blast Hardware -GAME( 1985, splndrbt, 0, splndrbt, splndrbt, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, hvoltage, 0, hvoltage, hvoltage, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "High Voltage", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, splndrbt, 0, splndrbt, splndrbt, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "Splendor Blast", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, hvoltage, 0, hvoltage, hvoltage, equites_state, splndrbt, ROT0, "Alpha Denshi Co.", "High Voltage", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/drivers/microkit.c b/src/mame/drivers/microkit.c index 9082931f21f..2d225dc65ff 100644 --- a/src/mame/drivers/microkit.c +++ b/src/mame/drivers/microkit.c @@ -6,35 +6,126 @@ http://www.vintagecomputer.net/browse_thread.cfm?id=511 -*/ + Press CR or LF to get the * prompt. + Commands: + $Pxxxx - Jump to address xxxx + ?Mxxxx yyyy - Dump memory starting at xxxx for yyyy bytes + !Mxxxx yy zz... - Write data (yy etc) to memory xxxx. Data gets entered when you + press the space after the data. + + There's no sound or storage facilities, therefore no software. + + ToDo: + - No technical manual or schematic available, so the entire driver is bodgy guesswork. + - Address 0 needs to be read/writeable, otherwise the numbers you enter will get + internally corrupted. + - Address 8000 is IDL which hangs the system, so program counter is preset to 8001. + - The keyboard is hooked up serially, which is ok, but the output to the terminal + is rubbish, so parallel is used so you can at least see something. + - When you enter commands, you can't see what you're doing. + - When you enter numbers, they display as rubbish or act as control codes. They + internally work though. + - The computer looks like a rack-mount metal box with a rudimentary front panel. + Buttons are: Reset; Load; Run program; Run Utility + There is a RUN LED. + None of these items are emulated. + It also has a power switch and lamp, and a fuse. + +*****************************************************************************************/ #include "emu.h" #include "cpu/cosmac/cosmac.h" +#include "bus/rs232/rs232.h" +#include "machine/terminal.h" + class microkit_state : public driver_device { public: microkit_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_rs232(*this, "rs232") + , m_terminal(*this, "terminal") { } + + DECLARE_READ_LINE_MEMBER(clear_r); + DECLARE_WRITE8_MEMBER(ram_w); + DECLARE_READ8_MEMBER(ram_r); + +private: + virtual void machine_reset(); + UINT8 m_resetcnt; + UINT8 m_ram_data; + required_device<cosmac_device> m_maincpu; + required_device<rs232_port_device> m_rs232; + required_device<generic_terminal_device> m_terminal; }; static ADDRESS_MAP_START( microkit_mem, AS_PROGRAM, 8, microkit_state ) - AM_RANGE(0x0000, 0x01ff) AM_ROM AM_REGION("maincpu", 0) + AM_RANGE(0x0000, 0x0000) AM_READWRITE(ram_r,ram_w) + AM_RANGE(0x8000, 0x81ff) AM_ROM AM_REGION("maincpu", 0) + AM_RANGE(0x8200, 0x83ff) AM_RAM ADDRESS_MAP_END static ADDRESS_MAP_START( microkit_io, AS_IO, 8, microkit_state ) + AM_RANGE(0x07, 0x07) AM_WRITENOP // writes a lots of zeros here ADDRESS_MAP_END static INPUT_PORTS_START( microkit ) INPUT_PORTS_END +READ_LINE_MEMBER( microkit_state::clear_r ) +{ + if (m_resetcnt < 0x10) + m_maincpu->set_state_int(COSMAC_R0, 0x8001); // skip IDL + if (m_resetcnt < 0x20) + m_resetcnt++; + // set reset pin to normal + return 1; +} + +READ8_MEMBER( microkit_state::ram_r ) +{ + return m_ram_data; +} + +WRITE8_MEMBER( microkit_state::ram_w ) +{ + m_ram_data = data; + if (data > 0 && data < 0x80) + m_terminal->write(space, 0, data); +} + +void microkit_state::machine_reset() +{ + m_resetcnt = 0; + m_ram_data = 0; +} + +static DEVICE_INPUT_DEFAULTS_START( serial_keyb ) + DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_300 ) + DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_300 ) + DEVICE_INPUT_DEFAULTS( "RS232_STARTBITS", 0xff, RS232_STARTBITS_1 ) + DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 ) + DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE ) + DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 ) +DEVICE_INPUT_DEFAULTS_END + + static MACHINE_CONFIG_START( microkit, microkit_state ) // basic machine hardware - MCFG_CPU_ADD("maincpu", CDP1801, 2000000) + MCFG_CPU_ADD("maincpu", CDP1802, 1750000) MCFG_CPU_PROGRAM_MAP(microkit_mem) MCFG_CPU_IO_MAP(microkit_io) MCFG_COSMAC_WAIT_CALLBACK(VCC) + MCFG_COSMAC_CLEAR_CALLBACK(READLINE(microkit_state, clear_r)) + + /* video hardware */ + MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "keyboard") + MCFG_RS232_RXD_HANDLER(DEVWRITELINE("maincpu", cosmac_device, ef4_w)) + MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("keyboard", serial_keyb) + MCFG_DEVICE_ADD("terminal", GENERIC_TERMINAL, 0) MACHINE_CONFIG_END ROM_START( microkit ) diff --git a/src/mame/includes/equites.h b/src/mame/includes/equites.h index 0e86a00ef6d..a23ac74d5d8 100644 --- a/src/mame/includes/equites.h +++ b/src/mame/includes/equites.h @@ -20,7 +20,6 @@ public: m_bg_videoram(*this, "bg_videoram"), m_spriteram(*this, "spriteram"), m_spriteram_2(*this, "spriteram_2"), - m_workram(*this, "workram"), m_mcuram(*this, "mcuram"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), @@ -40,7 +39,6 @@ public: UINT8 *m_fg_videoram; // 8bits required_shared_ptr<UINT16> m_spriteram; optional_shared_ptr<UINT16> m_spriteram_2; - optional_shared_ptr<UINT16> m_workram; optional_shared_ptr<UINT8> m_mcuram; /* video-related */ @@ -65,7 +63,7 @@ public: float m_cymvol; float m_hihatvol; int m_timer_count; - int m_unknown_bit; // Gekisou special handling + int m_gekisou_unknown_bit; /* devices */ required_device<cpu_device> m_maincpu; @@ -85,8 +83,7 @@ public: DECLARE_WRITE8_MEMBER(equites_dac_latch_w); DECLARE_WRITE8_MEMBER(equites_8155_portb_w); DECLARE_WRITE8_MEMBER(equites_8155_w); - DECLARE_WRITE16_MEMBER(gekisou_unknown_0_w); - DECLARE_WRITE16_MEMBER(gekisou_unknown_1_w); + DECLARE_WRITE16_MEMBER(gekisou_unknown_bit_w); DECLARE_READ16_MEMBER(equites_spriteram_kludge_r); DECLARE_READ8_MEMBER(mcu_ram_r); DECLARE_WRITE8_MEMBER(mcu_ram_w); @@ -102,20 +99,15 @@ public: DECLARE_WRITE8_MEMBER(equites_flipb_w); DECLARE_WRITE16_MEMBER(splndrbt_bg_scrollx_w); DECLARE_WRITE16_MEMBER(splndrbt_bg_scrolly_w); - DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_status); + DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_bit_r); DECLARE_WRITE8_MEMBER(equites_8910porta_w); DECLARE_WRITE8_MEMBER(equites_8910portb_w); - DECLARE_DRIVER_INIT(bullfgtr); - DECLARE_DRIVER_INIT(kouyakyu); - DECLARE_DRIVER_INIT(gekisou); DECLARE_DRIVER_INIT(splndrbt); DECLARE_DRIVER_INIT(equites); TILE_GET_INFO_MEMBER(equites_fg_info); TILE_GET_INFO_MEMBER(splndrbt_fg_info); TILE_GET_INFO_MEMBER(equites_bg_info); TILE_GET_INFO_MEMBER(splndrbt_bg_info); - DECLARE_MACHINE_START(equites); - DECLARE_MACHINE_RESET(equites); DECLARE_VIDEO_START(equites); DECLARE_PALETTE_INIT(equites); DECLARE_VIDEO_START(splndrbt); @@ -127,11 +119,14 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(equites_scanline); TIMER_DEVICE_CALLBACK_MEMBER(splndrbt_scanline); DECLARE_WRITE_LINE_MEMBER(equites_msm5232_gate); - void equites_draw_sprites_block( bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end ); + void equites_draw_sprites_block(bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end); void equites_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); - void splndrbt_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void splndrbt_copy_bg( bitmap_ind16 &dst_bitmap, const rectangle &cliprect ); - void equites_update_dac( ); - void unpack_block( const char *region, int offset, int size ); - void unpack_region( const char *region ); + void splndrbt_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); + void splndrbt_copy_bg(bitmap_ind16 &dst_bitmap, const rectangle &cliprect); + void equites_update_dac(); + void unpack_block(const char *region, int offset, int size); + void unpack_region(const char *region); + + virtual void machine_start(); + virtual void machine_reset(); }; diff --git a/src/mame/video/equites.c b/src/mame/video/equites.c index 528b899c24a..79d8e4dd93e 100644 --- a/src/mame/video/equites.c +++ b/src/mame/video/equites.c @@ -230,7 +230,7 @@ WRITE16_MEMBER(equites_state::splndrbt_bg_scrolly_w) * *************************************/ -void equites_state::equites_draw_sprites_block( bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end ) +void equites_state::equites_draw_sprites_block(bitmap_ind16 &bitmap, const rectangle &cliprect, int start, int end) { for (int offs = end - 2; offs >= start; offs -= 2) { @@ -301,7 +301,7 @@ Also, note that sprites are 30x30, not 32x32. 03020303 03030303 03030303 03030303 */ -void equites_state::splndrbt_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ) +void equites_state::splndrbt_draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { const UINT8 * const xrom = memregion("user2")->base(); const UINT8 * const yrom = xrom + 0x100; @@ -360,7 +360,7 @@ void equites_state::splndrbt_draw_sprites( bitmap_ind16 &bitmap, const rectangle if (bx >= cliprect.min_x && bx <= cliprect.max_x) { int xx = scalex ? (x * 29 + scalex) / (scalex << 1) + 1 : 16; // FIXME This is wrong. Should use the PROM. - int const offset = (fx ? (31 - xx) : xx) + ((fy ^ yhalf) ? (16 + line) : (15 - line) ) * gfx->rowbytes(); + int const offset = (fx ? (31 - xx) : xx) + ((fy ^ yhalf) ? (16 + line) : (15 - line)) * gfx->rowbytes(); int pen = srcgfx[offset]; @@ -375,7 +375,7 @@ void equites_state::splndrbt_draw_sprites( bitmap_ind16 &bitmap, const rectangle } -void equites_state::splndrbt_copy_bg( bitmap_ind16 &dst_bitmap, const rectangle &cliprect ) +void equites_state::splndrbt_copy_bg(bitmap_ind16 &dst_bitmap, const rectangle &cliprect) { bitmap_ind16 &src_bitmap = m_bg_tilemap->pixmap(); bitmap_ind8 &flags_bitmap = m_bg_tilemap->flagsmap(); |