mirror of
https://github.com/holub/mame
synced 2025-04-19 15:11:37 +03:00
metro.c update [Luca Elia]
- I4220 supports 16x16 tiles too - merged in vmetal.c
This commit is contained in:
parent
69b9abc42c
commit
492567f0c9
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3636,7 +3636,6 @@ src/mame/drivers/vigilant.c svneol=native#text/plain
|
||||
src/mame/drivers/vindictr.c svneol=native#text/plain
|
||||
src/mame/drivers/viper.c svneol=native#text/plain
|
||||
src/mame/drivers/vlc.c svneol=native#text/plain
|
||||
src/mame/drivers/vmetal.c svneol=native#text/plain
|
||||
src/mame/drivers/volfied.c svneol=native#text/plain
|
||||
src/mame/drivers/voyager.c svneol=native#text/plain
|
||||
src/mame/drivers/vp101.c svneol=native#text/plain
|
||||
|
@ -18,9 +18,9 @@ Sound Chips : OKIM6295 + YM2413 or
|
||||
|
||||
Other : Memory Blitter
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
Year + Game PCB Video Chip Issues / Notes
|
||||
-----------------------------------------------------------------------------
|
||||
------------------------------------------------------------------------------------------------
|
||||
Year + Game PCB Video Issues / Notes
|
||||
------------------------------------------------------------------------------------------------
|
||||
92 Last Fortress - Toride VG420 I4100
|
||||
92 Last Fortress - Toride (Ger)VG460-(A) I4100
|
||||
92 Pang Pom's VG420 I4100
|
||||
@ -39,6 +39,7 @@ Year + Game PCB Video Chip Issues / Notes
|
||||
95 Mouse Shooter GoGo - I4220 No sound CPU
|
||||
95 Pururun MTR5260-A I4220
|
||||
95 Puzzli MTR5260-A I4220
|
||||
95 Varia Metal ES-9309B-B I4220 No sound CPU but ES-8712 + M6295 + M6585
|
||||
96 Bal Cube - I4220 No sound CPU
|
||||
96 Bang Bang Ball - I4220 No sound CPU
|
||||
96 Daitoride (YMF278B) - I4220 No sound CPU
|
||||
@ -52,13 +53,15 @@ Year + Game PCB Video Chip Issues / Notes
|
||||
97 Mahjong Gakuensai VG340-A I4300 No sound CPU
|
||||
98 Mahjong Gakuensai 2 VG340-A I4300 No sound CPU
|
||||
00 Puzzlet VG2200-(B) I4300 Z86E02 Zilog Z8 8-bit MCU
|
||||
-----------------------------------------------------------------------------
|
||||
------------------------------------------------------------------------------------------------
|
||||
|
||||
Mouse Shooter GoGo, Bal Cube, Bang Bang Ball & Daitoride (YMF278B) PCBs have
|
||||
no PCB number but all look identical to each other.
|
||||
|
||||
To Do:
|
||||
|
||||
- Tilemaps/sprites offsets may be emulated understanding what appear to be CRT registers
|
||||
at c78880 (sequence of 4 values), c78890 (sequence of 5 values) and c788a0 (start sequence).
|
||||
- Wrong color bars in service mode (e.g. balcube, toride2g).
|
||||
They use solid color tiles (80xx), but the right palette is not at 00-ff.
|
||||
Related to the unknown table in the RAM mapped just before the palette?
|
||||
@ -67,7 +70,6 @@ To Do:
|
||||
- Coin lockout
|
||||
- Some gfx problems in ladykill, 3kokushi, puzzli, gakusai,
|
||||
seem related to how we handle windows and wrapping
|
||||
- Are the 16x16 tiles used by Mouja a Imagetek I4300-only feature?
|
||||
- Interrupt timing needs figuring out properly, having it incorrect
|
||||
causes scrolling glitches in some games. Test cases Mouse Go Go
|
||||
title screen, GunMaster title screen. Changing it can cause
|
||||
@ -75,6 +77,8 @@ To Do:
|
||||
- Bang Bang Ball / Bubble Buster slow to a crawl when you press a
|
||||
button between levels, on a real PCB it speeds up instead (related
|
||||
to above?)
|
||||
- vmetal: ES8712 sound may not be quite right. Samples are currently looped, but
|
||||
whether they should and how, is unknown. Where does the M6585 hook up to?
|
||||
|
||||
Notes:
|
||||
|
||||
@ -82,6 +86,8 @@ Notes:
|
||||
keeping start 2 pressed.
|
||||
- Sprite zoom in Mouja at the end of a match looks wrong, but it's been verified
|
||||
to be the same on the original board
|
||||
- vmetal: has Sega and Taito logos in the roms ?!
|
||||
|
||||
|
||||
driver modified by Eisuke Watanabe
|
||||
***************************************************************************/
|
||||
@ -93,9 +99,10 @@ driver modified by Eisuke Watanabe
|
||||
#include "cpu/upd7810/upd7810.h"
|
||||
#include "includes/metro.h"
|
||||
#include "machine/eeprom.h"
|
||||
#include "sound/2610intf.h"
|
||||
#include "sound/2151intf.h"
|
||||
#include "sound/2413intf.h"
|
||||
#include "sound/2610intf.h"
|
||||
#include "sound/es8712.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "sound/ymf278b.h"
|
||||
#include "video/konicdev.h"
|
||||
@ -785,8 +792,8 @@ static ADDRESS_MAP_START( balcube_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x678840, 0x67884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x678860, 0x67886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x678870, 0x67887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x678880, 0x678881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x678890, 0x678891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x678880, 0x678881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x678890, 0x678891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x6788a2, 0x6788a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x6788a4, 0x6788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x6788aa, 0x6788ab) AM_WRITEONLY AM_SHARE("rombank") // Rom Bank
|
||||
@ -814,8 +821,8 @@ static ADDRESS_MAP_START( daitoa_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x178840, 0x17884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x178860, 0x17886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x178870, 0x17887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x178880, 0x178881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x178890, 0x178891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x178880, 0x178881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x178890, 0x178891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x1788a2, 0x1788a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x1788a4, 0x1788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x1788aa, 0x1788ab) AM_WRITEONLY AM_SHARE("rombank") // Rom Bank
|
||||
@ -856,8 +863,8 @@ static ADDRESS_MAP_START( bangball_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0xe78840, 0xe7884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0xe78860, 0xe7886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0xe78870, 0xe7887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0xe78880, 0xe78881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0xe78890, 0xe78891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0xe78880, 0xe78881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0xe78890, 0xe78891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0xe788a2, 0xe788a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0xe788a4, 0xe788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0xe788aa, 0xe788ab) AM_WRITEONLY AM_SHARE("rombank") // Rom Bank
|
||||
@ -884,8 +891,8 @@ static ADDRESS_MAP_START( batlbubl_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x178840, 0x17884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x178860, 0x17886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x178870, 0x17887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x178880, 0x178881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x178890, 0x178891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x178880, 0x178881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x178890, 0x178891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x1788a2, 0x1788a3) AM_READWRITE(metro_irq_cause_r,metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x1788a4, 0x1788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x1788aa, 0x1788ab) AM_WRITEONLY AM_SHARE("rombank") // Rom Bank
|
||||
@ -920,8 +927,8 @@ static ADDRESS_MAP_START( msgogo_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x178840, 0x17884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x178860, 0x17886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x178870, 0x17887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x178880, 0x178881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x178890, 0x178891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x178880, 0x178881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x178890, 0x178891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x1788a2, 0x1788a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x1788a4, 0x1788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x1788aa, 0x1788ab) AM_WRITEONLY AM_SHARE("rombank") // Rom Bank
|
||||
@ -954,8 +961,8 @@ static ADDRESS_MAP_START( daitorid_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x478840, 0x47884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x478860, 0x47886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x478870, 0x47887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x478880, 0x478881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x478890, 0x478891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x478880, 0x478881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x478890, 0x478891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x4788a2, 0x4788a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x4788a4, 0x4788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x4788a8, 0x4788a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
@ -989,8 +996,8 @@ static ADDRESS_MAP_START( dharma_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x878840, 0x87884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x878860, 0x87886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x878870, 0x87887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll Regs
|
||||
AM_RANGE(0x878880, 0x878881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x878890, 0x878891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x878880, 0x878881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x878890, 0x878891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x8788a4, 0x8788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x8788a8, 0x8788a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
AM_RANGE(0x8788aa, 0x8788ab) AM_WRITEONLY AM_SHARE("rombank") // Rom Bank
|
||||
@ -1044,8 +1051,8 @@ static ADDRESS_MAP_START( karatour_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x878840, 0x87884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x878860, 0x87886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x878870, 0x87887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x878880, 0x878881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x878890, 0x878891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x878880, 0x878881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x878890, 0x878891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x8788a2, 0x8788a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x8788a4, 0x8788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x8788a8, 0x8788a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
@ -1075,8 +1082,8 @@ static ADDRESS_MAP_START( kokushi_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x878840, 0x87884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x878860, 0x87886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x878870, 0x87887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll Regs - WRONG
|
||||
// AM_RANGE(0x878880, 0x878881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x878890, 0x878891) AM_WRITENOP // ? increasing
|
||||
// AM_RANGE(0x878880, 0x878881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x878890, 0x878891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x8788a2, 0x8788a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x8788a4, 0x8788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x8788a8, 0x8788a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
@ -1109,8 +1116,8 @@ static ADDRESS_MAP_START( lastfort_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x878840, 0x87884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x878860, 0x87886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x878870, 0x87887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x878880, 0x878881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x878890, 0x878891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x878880, 0x878881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x878890, 0x878891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x8788a2, 0x8788a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x8788a4, 0x8788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x8788a8, 0x8788a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
@ -1150,8 +1157,8 @@ static ADDRESS_MAP_START( lastforg_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x8f8840, 0x8f884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x8f8860, 0x8f886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x8f8870, 0x8f887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x8f8880, 0x8f8881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x8f8890, 0x8f8891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x8f8880, 0x8f8881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x8f8890, 0x8f8891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x8f88a2, 0x8f88a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x8f88a4, 0x8f88a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x8f88a8, 0x8f88a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
@ -1439,8 +1446,8 @@ static ADDRESS_MAP_START( pangpoms_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x478840, 0x47884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x478860, 0x47886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x478870, 0x47887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll Regs
|
||||
AM_RANGE(0x478880, 0x478881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x478890, 0x478891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x478880, 0x478881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x478890, 0x478891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x4788a2, 0x4788a3) AM_READWRITE(metro_irq_cause_r,metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x4788a4, 0x4788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x4788a8, 0x4788a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
@ -1482,8 +1489,8 @@ static ADDRESS_MAP_START( poitto_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0xc78840, 0xc7884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0xc78860, 0xc7886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0xc78870, 0xc7887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll Regs
|
||||
AM_RANGE(0xc78880, 0xc78881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0xc78890, 0xc78891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0xc78880, 0xc78881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0xc78890, 0xc78891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0xc788a2, 0xc788a3) AM_READWRITE(metro_irq_cause_r,metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0xc788a4, 0xc788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0xc788a8, 0xc788a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
@ -1518,8 +1525,8 @@ static ADDRESS_MAP_START( skyalert_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x878840, 0x87884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x878860, 0x87886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x878870, 0x87887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x878880, 0x878881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x878890, 0x878891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x878880, 0x878881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x878890, 0x878891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x8788a2, 0x8788a3) AM_READWRITE(metro_irq_cause_r,metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x8788a4, 0x8788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x8788a8, 0x8788a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
@ -1552,8 +1559,8 @@ static ADDRESS_MAP_START( pururun_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0xc78840, 0xc7884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0xc78860, 0xc7886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0xc78870, 0xc7887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll Regs
|
||||
AM_RANGE(0xc78880, 0xc78881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0xc78890, 0xc78891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0xc78880, 0xc78881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0xc78890, 0xc78891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0xc788a2, 0xc788a3) AM_READWRITE(metro_irq_cause_r,metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0xc788a4, 0xc788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0xc788a8, 0xc788a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
@ -1586,8 +1593,8 @@ static ADDRESS_MAP_START( toride2g_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0xc78840, 0xc7884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0xc78860, 0xc7886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0xc78870, 0xc7887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll Regs
|
||||
AM_RANGE(0xc78880, 0xc78881) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0xc78890, 0xc78891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0xc78880, 0xc78881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0xc78890, 0xc78891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0xc788a2, 0xc788a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0xc788a4, 0xc788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0xc788a8, 0xc788a9) AM_WRITE(metro_soundlatch_w) // To Sound CPU
|
||||
@ -1653,7 +1660,7 @@ static ADDRESS_MAP_START( blzntrnd_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x278000, 0x2787ff) AM_RAM AM_SHARE("tiletable") // Tiles Set
|
||||
AM_RANGE(0x278860, 0x27886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x278870, 0x27887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x278890, 0x278891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x278890, 0x278891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x2788a2, 0x2788a3) AM_READWRITE(metro_irq_cause_r,metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x2788a4, 0x2788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x2788aa, 0x2788ab) AM_WRITEONLY AM_SHARE("rombank") // Rom Bank
|
||||
@ -1789,7 +1796,7 @@ static ADDRESS_MAP_START( puzzlet_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x778840, 0x77884f) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x778860, 0x77886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x778870, 0x77887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x778890, 0x778891) AM_WRITENOP // ? increasing
|
||||
AM_RANGE(0x778890, 0x778891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x7788a2, 0x7788a3) AM_WRITE(metro_irq_cause_w) // IRQ Cause
|
||||
AM_RANGE(0x7788a4, 0x7788a5) AM_WRITE(puzzlet_irq_enable_w) AM_SHARE("irq_enable") // IRQ Enable
|
||||
|
||||
@ -1818,6 +1825,101 @@ static ADDRESS_MAP_START( puzzlet_io_map, AS_IO, 8, metro_state )
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
Varia Metal
|
||||
***************************************************************************/
|
||||
|
||||
WRITE8_MEMBER(metro_state::vmetal_control_w)
|
||||
{
|
||||
device_t *device = machine().device("essnd");
|
||||
/* Lower nibble is the coin control bits shown in
|
||||
service mode, but in game mode they're different */
|
||||
coin_counter_w(machine(), 0, data & 0x04);
|
||||
coin_counter_w(machine(), 1, data & 0x08); /* 2nd coin schute activates coin 0 counter in game mode?? */
|
||||
// coin_lockout_w(machine(), 0, data & 0x01); /* always on in game mode?? */
|
||||
coin_lockout_w(machine(), 1, data & 0x02); /* never activated in game mode?? */
|
||||
|
||||
if ((data & 0x40) == 0)
|
||||
device->reset();
|
||||
else
|
||||
es8712_play(device);
|
||||
|
||||
if (data & 0x10)
|
||||
es8712_set_bank_base(device, 0x100000);
|
||||
else
|
||||
es8712_set_bank_base(device, 0x000000);
|
||||
|
||||
if (data & 0xa0)
|
||||
logerror("%s: Writing unknown bits %04x to $200000\n",machine().describe_context(),data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(metro_state::vmetal_es8712_w)
|
||||
{
|
||||
/* Many samples in the ADPCM ROM are actually not used.
|
||||
|
||||
Snd Offset Writes Sample Range
|
||||
0000 0004 0002 0006 000a 0008 000c
|
||||
-- ---------------------------------- -------------
|
||||
00 006e 0001 00ab 003c 0002 003a 003a 01ab6e-023a3c
|
||||
01 003d 0002 003a 001d 0002 007e 007e 023a3d-027e1d
|
||||
02 00e2 0003 0005 002e 0003 00f3 00f3 0305e2-03f32e
|
||||
03 000a 0005 001e 00f6 0005 00ec 00ec 051e0a-05ecf6
|
||||
04 00f7 0005 00ec 008d 0006 0060 0060 05ecf7-06608d
|
||||
05 0016 0008 002e 0014 0009 0019 0019 082e16-091914
|
||||
06 0015 0009 0019 0094 000b 0015 0015 091915-0b1594
|
||||
07 0010 000d 0012 00bf 000d 0035 0035 0d1210-0d35bf
|
||||
08 00ce 000e 002f 0074 000f 0032 0032 0e2fce-0f3274
|
||||
09 0000 0000 0000 003a 0000 007d 007d 000000-007d3a
|
||||
0a 0077 0000 00fa 008d 0001 00b6 00b6 00fa77-01b68d
|
||||
0b 008e 0001 00b6 00b3 0002 0021 0021 01b68e-0221b3
|
||||
0c 0062 0002 00f7 0038 0003 00de 00de 02f762-03de38
|
||||
0d 00b9 0005 00ab 00ef 0006 0016 0016 05abb9-0616ef
|
||||
0e 00dd 0007 0058 00db 0008 001a 001a 0758dd-081adb
|
||||
0f 00dc 0008 001a 002e 0008 008a 008a 081adc-088a2e
|
||||
10 00db 0009 00d7 00ff 000a 0046 0046 09d7db-0a46ff
|
||||
11 0077 000c 0003 006d 000c 0080 0080 0c0377-0c806d
|
||||
12 006e 000c 0080 006c 000d 0002 0002 0c806e-0d026c
|
||||
13 006d 000d 0002 002b 000d 0041 0041 0d026d-0d412b
|
||||
14 002c 000d 0041 002a 000d 00be 00be 0d412c-0dbe2a
|
||||
15 002b 000d 00be 0029 000e 0083 0083 0dbe2b-0e8329
|
||||
16 002a 000e 0083 00ee 000f 0069 0069 0e832a-0f69ee
|
||||
*/
|
||||
|
||||
device_t *device = machine().device("essnd");
|
||||
es8712_w(device, space, offset, data);
|
||||
logerror("%s: Writing %04x to ES8712 offset %02x\n", machine().describe_context(), data, offset);
|
||||
}
|
||||
|
||||
static ADDRESS_MAP_START( vmetal_map, AS_PROGRAM, 16, metro_state )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM // ROM
|
||||
AM_RANGE(0x100000, 0x11ffff) AM_RAM_WRITE(metro_vram_0_w) AM_SHARE("vram_0") // Layer 0
|
||||
AM_RANGE(0x120000, 0x13ffff) AM_RAM_WRITE(metro_vram_1_w) AM_SHARE("vram_1") // Layer 1
|
||||
AM_RANGE(0x140000, 0x15ffff) AM_RAM_WRITE(metro_vram_2_w) AM_SHARE("vram_2") // Layer 2
|
||||
AM_RANGE(0x160000, 0x16ffff) AM_READ(metro_bankedrom_r) // Banked ROM
|
||||
AM_RANGE(0x170000, 0x171fff) AM_RAM // ???
|
||||
AM_RANGE(0x172000, 0x173fff) AM_RAM_WRITE(paletteram_GGGGGRRRRRBBBBBx_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0x174000, 0x174fff) AM_RAM AM_SHARE("spriteram") // Sprites
|
||||
AM_RANGE(0x178000, 0x1787ff) AM_RAM AM_SHARE("tiletable") // Tiles Set
|
||||
AM_RANGE(0x178840, 0x17884d) AM_WRITE(metro_blitter_w) AM_SHARE("blitter_regs") // Tiles Blitter
|
||||
AM_RANGE(0x178860, 0x17886b) AM_WRITE(metro_window_w) AM_SHARE("window") // Tilemap Window
|
||||
AM_RANGE(0x178870, 0x17887b) AM_WRITEONLY AM_SHARE("scroll") // Scroll
|
||||
AM_RANGE(0x178880, 0x178881) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x178890, 0x178891) AM_WRITENOP // ? CRT
|
||||
AM_RANGE(0x1788a2, 0x1788a3) AM_READWRITE(metro_irq_cause_r, metro_irq_cause_w) // IRQ Cause / IRQ Acknowledge
|
||||
AM_RANGE(0x1788a4, 0x1788a5) AM_WRITEONLY AM_SHARE("irq_enable") // IRQ Enable
|
||||
AM_RANGE(0x1788aa, 0x1788ab) AM_WRITEONLY AM_SHARE("rombank") // Rom Bank
|
||||
AM_RANGE(0x1788ac, 0x1788ad) AM_WRITEONLY AM_SHARE("screenctrl") // Screen Control
|
||||
AM_RANGE(0x179700, 0x179713) AM_WRITEONLY AM_SHARE("videoregs") // Video Registers
|
||||
AM_RANGE(0x200000, 0x200001) AM_READ_PORT("P1_P2") AM_WRITE8(vmetal_control_w, 0x00ff)
|
||||
AM_RANGE(0x200002, 0x200003) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0x300000, 0x31ffff) AM_READ(balcube_dsw_r) // DSW x 3
|
||||
AM_RANGE(0x400000, 0x400001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff )
|
||||
AM_RANGE(0x400002, 0x400003) AM_DEVWRITE8("oki", okim6295_device, write, 0x00ff)
|
||||
AM_RANGE(0x500000, 0x50000d) AM_WRITE8(vmetal_es8712_w, 0x00ff)
|
||||
AM_RANGE(0xf00000, 0xf0ffff) AM_RAM AM_MIRROR(0x0f0000) // RAM (mirrored)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
|
||||
@ -3278,6 +3380,79 @@ static INPUT_PORTS_START( toride2g )
|
||||
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN ) // BIT 6 !?
|
||||
INPUT_PORTS_END
|
||||
|
||||
/***************************************************************************
|
||||
Varia Metal
|
||||
***************************************************************************/
|
||||
|
||||
/* verified from M68000 code */
|
||||
static INPUT_PORTS_START( vmetal )
|
||||
PORT_START("P1_P2")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START1 )
|
||||
|
||||
PORT_START("SYSTEM")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_TILT ) /* 'Tilt' only in "test mode" - no effect ingame */
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* same coinage as COIN1 and COIN2 */
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* 'Test' only in "test mode" - no effect ingame */
|
||||
PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
PORT_START("DSW0")
|
||||
// DSW1, stored at 0xff0085.b (cpl'ed)
|
||||
PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) )
|
||||
PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0006, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPUNUSED( 0x0008, IP_ACTIVE_LOW ) /* 0x01 (OFF) or 0x02 (ON) written to 0xff0112.b but NEVER read back - old credits for 2 players game ? */
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Flip_Screen ) ) /* 0x07c1 written to 0x1788ac.w (screen control ?) at first (code at 0x0001b8) */
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) /* 0x07c1 written to 0xff0114.w (then 0x1788ac.w) during initialisation (code at 0x000436) */
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) /* 0x07c0 written to 0xff0114.w (then 0x1788ac.w) during initialisation (code at 0x000436) */
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( On ) )
|
||||
PORT_DIPUNUSED( 0x0040, IP_ACTIVE_LOW )
|
||||
PORT_DIPUNUSED( 0x0080, IP_ACTIVE_LOW )
|
||||
|
||||
PORT_START("IN2")
|
||||
// DSW2, stored at 0xff0084.b (cpl'ed)
|
||||
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x0008, "1" )
|
||||
PORT_DIPSETTING( 0x0004, "2" )
|
||||
PORT_DIPSETTING( 0x000c, "3" )
|
||||
PORT_DIPSETTING( 0x0000, "4" )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Bonus_Life ) ) /* code at 0x0004a4 */
|
||||
PORT_DIPSETTING( 0x0010, "Every 30000" )
|
||||
PORT_DIPSETTING( 0x0000, "Every 60000" )
|
||||
PORT_DIPUNUSED( 0x0020, IP_ACTIVE_LOW )
|
||||
PORT_DIPUNUSED( 0x0040, IP_ACTIVE_LOW )
|
||||
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -3302,10 +3477,10 @@ static const gfx_layout layout_8x8x4 =
|
||||
};
|
||||
|
||||
/* 8x8x8 tiles for later games */
|
||||
static GFXLAYOUT_RAW( layout_8x8x8h, 8, 8, 8*8, 32*8 )
|
||||
static GFXLAYOUT_RAW( layout_8x8x8, 8, 8, 8*8, 32*8 )
|
||||
|
||||
/* 16x16x4 tiles for later games */
|
||||
static const gfx_layout layout_16x16x4q =
|
||||
static const gfx_layout layout_16x16x4 =
|
||||
{
|
||||
16,16,
|
||||
RGN_FRAC(1,1),
|
||||
@ -3317,7 +3492,7 @@ static const gfx_layout layout_16x16x4q =
|
||||
};
|
||||
|
||||
/* 16x16x8 tiles for later games */
|
||||
static GFXLAYOUT_RAW( layout_16x16x8o, 16, 16, 16*8, 32*8 )
|
||||
static GFXLAYOUT_RAW( layout_16x16x8, 16, 16, 16*8, 32*8 )
|
||||
|
||||
static const gfx_layout layout_053936 =
|
||||
{
|
||||
@ -3352,26 +3527,33 @@ GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( i4220 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x4, 0x0, 0x100 ) // [0] 4 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x8h, 0x0, 0x10 ) // [1] 8 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x8, 0x0, 0x10 ) // [1] 8 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x4, 0x0, 0x100 ) // [2] 4 Bit Tiles 16x16
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x8, 0x0, 0x100 ) // [3] 8 Bit Tiles 16x16
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( blzntrnd )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x4, 0x0, 0x100 ) // [0] 4 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x8h, 0x0, 0x10 ) // [1] 8 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx3", 0, layout_053936, 0x0, 0x10 ) // [2] 053936 Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x8, 0x0, 0x10 ) // [1] 8 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x4, 0x0, 0x100 ) // [2] 4 Bit Tiles 16x16
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x8, 0x0, 0x100 ) // [3] 8 Bit Tiles 16x16
|
||||
GFXDECODE_ENTRY( "gfx2", 0, layout_053936, 0x0, 0x10 ) // [4] 053936 Tiles
|
||||
GFXDECODE_END
|
||||
|
||||
static GFXDECODE_START( gstrik2 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x4, 0x0, 0x100 ) // [0] 4 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x8h, 0x0, 0x10 ) // [1] 8 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx3", 0, layout_053936_16,0x0, 0x10 ) // [2] 053936 Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x8, 0x0, 0x10 ) // [1] 8 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x4, 0x0, 0x100 ) // [2] 4 Bit Tiles 16x16
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x8, 0x0, 0x100 ) // [3] 8 Bit Tiles 16x16
|
||||
GFXDECODE_ENTRY( "gfx2", 0, layout_053936_16,0x0, 0x10 ) // [4] 053936 Tiles
|
||||
GFXDECODE_END
|
||||
|
||||
// same as 14220:
|
||||
static GFXDECODE_START( i4300 )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x4, 0x0, 0x100 ) // [0] 4 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x8h, 0x0, 0x10 ) // [1] 8 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x4q, 0x0, 0x100 ) // [2] 4 Bit Tiles 16x16
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x8o, 0x0, 0x100 ) // [2] 8 Bit Tiles 16x16
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_8x8x8, 0x0, 0x10 ) // [1] 8 Bit Tiles
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x4, 0x0, 0x100 ) // [2] 4 Bit Tiles 16x16
|
||||
GFXDECODE_ENTRY( "gfx1", 0, layout_16x16x8, 0x0, 0x100 ) // [3] 8 Bit Tiles 16x16
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
@ -3396,8 +3578,6 @@ MACHINE_START_MEMBER(metro_state,metro)
|
||||
save_item(NAME(m_gakusai_oki_bank_hi));
|
||||
save_item(NAME(m_sprite_xoffs));
|
||||
save_item(NAME(m_sprite_yoffs));
|
||||
save_item(NAME(m_bg_tilemap_enable));
|
||||
save_item(NAME(m_bg_tilemap_enable16));
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(metro_state,metro)
|
||||
@ -3433,7 +3613,7 @@ static MACHINE_CONFIG_START( balcube, metro_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(metro_state, screen_update_metro)
|
||||
|
||||
MCFG_GFXDECODE(i4220)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_offset)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_dx_tmap)
|
||||
MCFG_PALETTE_LENGTH(0x1000)
|
||||
|
||||
/* sound hardware */
|
||||
@ -3466,7 +3646,7 @@ static MACHINE_CONFIG_START( daitoa, metro_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(metro_state, screen_update_metro)
|
||||
|
||||
MCFG_GFXDECODE(i4220)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_offset)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_dx_tmap)
|
||||
MCFG_PALETTE_LENGTH(0x1000)
|
||||
|
||||
/* sound hardware */
|
||||
@ -3499,7 +3679,7 @@ static MACHINE_CONFIG_START( msgogo, metro_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(metro_state, screen_update_metro)
|
||||
|
||||
MCFG_GFXDECODE(i4220)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_offset)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_dx_tmap)
|
||||
MCFG_PALETTE_LENGTH(0x1000)
|
||||
|
||||
/* sound hardware */
|
||||
@ -3532,7 +3712,7 @@ static MACHINE_CONFIG_START( bangball, metro_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(metro_state, screen_update_metro)
|
||||
|
||||
MCFG_GFXDECODE(i4220)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_offset)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_dx_tmap)
|
||||
MCFG_PALETTE_LENGTH(0x1000)
|
||||
|
||||
/* sound hardware */
|
||||
@ -3565,7 +3745,7 @@ static MACHINE_CONFIG_START( batlbubl, metro_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(metro_state, screen_update_metro)
|
||||
|
||||
MCFG_GFXDECODE(i4220)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_offset)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_dx_tmap)
|
||||
MCFG_PALETTE_LENGTH(0x1000)
|
||||
|
||||
/* sound hardware */
|
||||
@ -3602,7 +3782,7 @@ static MACHINE_CONFIG_START( daitorid, metro_state )
|
||||
MCFG_SCREEN_UPDATE_DRIVER(metro_state, screen_update_metro)
|
||||
|
||||
MCFG_GFXDECODE(i4220)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_offset)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_dx_tmap)
|
||||
MCFG_PALETTE_LENGTH(0x1000)
|
||||
|
||||
/* sound hardware */
|
||||
@ -4204,6 +4384,44 @@ static MACHINE_CONFIG_START( mouja, metro_state )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( vmetal, metro_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz)
|
||||
MCFG_CPU_PROGRAM_MAP(vmetal_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", metro_state, metro_vblank_interrupt)
|
||||
MCFG_CPU_PERIODIC_INT_DRIVER(metro_state, metro_periodic_interrupt, 8*60) // ?
|
||||
|
||||
MCFG_MACHINE_START_OVERRIDE(metro_state,metro)
|
||||
MCFG_MACHINE_RESET_OVERRIDE(metro_state,metro)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(58.2328) // VSync 58.2328Hz, HSync 15.32kHz
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(320, 224)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0, 320-1, 0, 224-1)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(metro_state, screen_update_metro)
|
||||
|
||||
MCFG_GFXDECODE(i4220)
|
||||
MCFG_VIDEO_START_OVERRIDE(metro_state,metro_i4220_dx_sprite)
|
||||
MCFG_PALETTE_LENGTH(0x1000)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
MCFG_OKIM6295_ADD("oki", XTAL_1MHz, OKIM6295_PIN7_HIGH)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
|
||||
|
||||
MCFG_SOUND_ADD("essnd", ES8712, 12000)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
|
||||
|
||||
// OKI M6585 not hooked up...
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
static const k053936_interface blzntrnd_k053936_intf =
|
||||
{
|
||||
0, -69, -21
|
||||
@ -4522,7 +4740,7 @@ ROM_START( blzntrnd )
|
||||
ROMX_LOAD( "rom331.bin", 0x1000004, 0x200000, CRC(4d909c28) SHA1(fb9bb824e518f67713799ed2c0159a7bd70f35c4) , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "rom375.bin", 0x1000006, 0x200000, CRC(6eb4f97c) SHA1(c7f006230cbf10e706b0362eeed34655a3aef1a5) , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
|
||||
ROM_REGION( 0x200000, "gfx3", 0 ) /* 053936 gfx data */
|
||||
ROM_REGION( 0x200000, "gfx2", 0 ) /* 053936 gfx data */
|
||||
ROM_LOAD( "rom9.bin", 0x000000, 0x200000, CRC(37ca3570) SHA1(3374c586bf84583fa33f2793c4e8f2f61a0cab1c) )
|
||||
|
||||
ROM_REGION( 0x080000, "ymsnd.deltat", 0 ) /* Samples */
|
||||
@ -4608,7 +4826,7 @@ ROM_START( gstrik2 )
|
||||
// ROMX_LOAD( "chr14.90", 0x1800004, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
// ROMX_LOAD( "chr15.89", 0x1800006, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
|
||||
ROM_REGION( 0x200000, "gfx3", 0 ) /* 053936 gfx data */
|
||||
ROM_REGION( 0x200000, "gfx2", 0 ) /* 053936 gfx data */
|
||||
ROM_LOAD( "psacrom.60", 0x000000, 0x200000, CRC(73f1f279) SHA1(1135b2b1eb4c52249bc12ee178340bbb202a94c8) )
|
||||
|
||||
ROM_REGION( 0x200000, "ymsnd.deltat", 0 ) /* Samples */
|
||||
@ -4648,7 +4866,7 @@ ROM_START( gstrik2j )
|
||||
// ROMX_LOAD( "chr14.90", 0x1800004, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
// ROMX_LOAD( "chr15.89", 0x1800006, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
|
||||
ROM_REGION( 0x200000, "gfx3", 0 ) /* 053936 gfx data */
|
||||
ROM_REGION( 0x200000, "gfx2", 0 ) /* 053936 gfx data */
|
||||
ROM_LOAD( "psacrom.60", 0x000000, 0x200000, CRC(73f1f279) SHA1(1135b2b1eb4c52249bc12ee178340bbb202a94c8) )
|
||||
|
||||
ROM_REGION( 0x200000, "ymsnd.deltat", 0 ) /* Samples */
|
||||
@ -5949,6 +6167,98 @@ ROM_START( toride2j )
|
||||
ROM_LOAD( "tr2_ja_7.3g", 0x000000, 0x020000, CRC(6ee32315) SHA1(ef4d59576929deab0aa459a67be21d97c2803dea) )
|
||||
ROM_END
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
Varia Metal
|
||||
Excellent System Ltd, 1995
|
||||
|
||||
PCB Layout
|
||||
----------
|
||||
This game runs on Metro hardware.
|
||||
|
||||
ES-9309B-B
|
||||
|--------------------------------------------|
|
||||
| TA7222 8.U9 DSW1(8) DSW2(8) |
|
||||
|VOL M6295 1.000MHz |
|
||||
| |------------| |
|
||||
| 7.U12 | 68000 | |
|
||||
| uPC3403 |------------| |
|
||||
|J 640kHz ES-8712 |
|
||||
|A M6585 EPM7032 6B.U18 5B.U19 |
|
||||
|M MM1035 |
|
||||
|M 26.666MHz 16MHz 62256 62256 |
|
||||
|A |
|
||||
| |--------| 1.U29 |
|
||||
| 62256 |Imagetek| |
|
||||
| 62256 |I4220 | 2.U31 |
|
||||
| | | |
|
||||
| |--------| 3.U28 |
|
||||
| |
|
||||
| 6264 4.U30 |
|
||||
|--------------------------------------------|
|
||||
Notes:
|
||||
68000 - clock 16.000MHz
|
||||
ES-8712 - ES-8712 Single Channel ADPCM Samples Player. Clock ?? seems to be 16kHz?
|
||||
This chip is branded 'EXCELLENT', may be (or not??) manufactured by Ensonic (SDIP48)
|
||||
M6295 - clock 1.000MHz. Sample rate = 1000000/132
|
||||
M6585 - Oki M6585 ADPCM Voice Synthesizer IC (DIP18). Clock 640kHz.
|
||||
Sample rate = 16kHz (selection - pin 1 LOW, pin 2 HIGH = 16kHz)
|
||||
This is a version-up to the previous M5205 with some additional
|
||||
capabilies and improvements.
|
||||
MM1035 - Mitsumi Monolithic IC MM1035 System Reset and Watchdog Timer (DIP8)
|
||||
uPC3403 - NEC uPC3403 High Performance Quad Operational Amplifier (DIP14)
|
||||
62256 - 32k x8 SRAM (DIP28)
|
||||
6264 - 8k x8 SRAM (DIP28)
|
||||
TA7222 - Toshiba TA7222 5.8 Watt Audio Power Amplifier (SIP10)
|
||||
EPM7032 - Altera EPM7032LC44-15T High Performance EEPROM-based Programmable Logic Device (PLCC44)
|
||||
Custom - Imagetek I4220 Graphics Controller (QFP208)
|
||||
VSync - 58.2328Hz
|
||||
HSync - 15.32kHz
|
||||
ROMs -
|
||||
6B & 5B are 27C040 EPROM (DIP32)
|
||||
8 is 4M MaskROM (DIP32)
|
||||
All other ROMs are 16M MaskROM (DIP42)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
ROM_START( vmetal )
|
||||
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
|
||||
ROM_LOAD16_BYTE( "6b.u18", 0x00000, 0x80000, CRC(4eb939d5) SHA1(741ab05043fc3bd886162d878630e45da9359718) )
|
||||
ROM_LOAD16_BYTE( "5b.u19", 0x00001, 0x80000, CRC(4933ac6c) SHA1(1a3303e32fcb08854d4d6e13f36ca99d92aed4cc) )
|
||||
|
||||
ROM_REGION( 0x800000, "gfx1", 0 )
|
||||
ROMX_LOAD( "2.u31", 0x000000, 0x200000, CRC(b36f8d60) SHA1(1676859d0fee4eb9897ce1601a2c9fd9a6dc4a43), ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "4.u30", 0x000002, 0x200000, CRC(5a25a49c) SHA1(c30781202ec882e1ec6adfb560b0a1075b3cce55), ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "1.u29", 0x000004, 0x200000, CRC(b470c168) SHA1(c30462dc134da1e71a94b36ef96ecd65c325b07e), ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "3.u28", 0x000006, 0x200000, CRC(00fca765) SHA1(ca9010bd7f59367e483868018db9a9abf871386e), ROM_GROUPWORD | ROM_SKIP(6))
|
||||
|
||||
ROM_REGION( 0x080000, "oki", 0 ) /* OKI6295 Samples */
|
||||
/* Second half is junk */
|
||||
ROM_LOAD( "8.u9", 0x00000, 0x80000, CRC(c14c001c) SHA1(bad96b5cd40d1c34ef8b702262168ecab8192fb6) )
|
||||
|
||||
ROM_REGION( 0x200000, "essnd", 0 ) /* Samples */
|
||||
ROM_LOAD( "7.u12", 0x00000, 0x200000, CRC(a88c52f1) SHA1(d74a5a11f84ba6b1042b33a2c156a1071b6fbfe1) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( vmetaln )
|
||||
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
|
||||
ROM_LOAD16_BYTE( "vm6.bin", 0x00000, 0x80000, CRC(cb292ab1) SHA1(41fdfe67e6cb848542fd5aa0dfde3b1936bb3a28) )
|
||||
ROM_LOAD16_BYTE( "vm5.bin", 0x00001, 0x80000, CRC(43ef844e) SHA1(c673f34fcc9e406282c9008795b52d01a240099a) )
|
||||
|
||||
ROM_REGION( 0x800000, "gfx1", 0 )
|
||||
ROMX_LOAD( "2.u31", 0x000000, 0x200000, CRC(b36f8d60) SHA1(1676859d0fee4eb9897ce1601a2c9fd9a6dc4a43), ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "4.u30", 0x000002, 0x200000, CRC(5a25a49c) SHA1(c30781202ec882e1ec6adfb560b0a1075b3cce55), ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "1.u29", 0x000004, 0x200000, CRC(b470c168) SHA1(c30462dc134da1e71a94b36ef96ecd65c325b07e), ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "3.u28", 0x000006, 0x200000, CRC(00fca765) SHA1(ca9010bd7f59367e483868018db9a9abf871386e), ROM_GROUPWORD | ROM_SKIP(6))
|
||||
|
||||
ROM_REGION( 0x080000, "oki", 0 ) /* OKI6295 Samples */
|
||||
/* Second half is junk */
|
||||
ROM_LOAD( "8.u9", 0x00000, 0x80000, CRC(c14c001c) SHA1(bad96b5cd40d1c34ef8b702262168ecab8192fb6) )
|
||||
|
||||
ROM_REGION( 0x200000, "essnd", 0 ) /* Samples */
|
||||
ROM_LOAD( "7.u12", 0x00000, 0x200000, CRC(a88c52f1) SHA1(d74a5a11f84ba6b1042b33a2c156a1071b6fbfe1) )
|
||||
ROM_END
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
@ -6091,40 +6401,42 @@ DRIVER_INIT_MEMBER(metro_state,puzzlet)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
GAME( 1992, karatour, 0, karatour, karatour, metro_state, karatour, ROT0, "Mitchell", "The Karate Tournament", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1992, pangpoms, 0, pangpoms, pangpoms, metro_state, metro, ROT0, "Metro", "Pang Pom's", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1992, pangpomsm, pangpoms, pangpoms, pangpoms, metro_state, metro, ROT0, "Metro (Mitchell license)", "Pang Pom's (Mitchell)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1992, skyalert, 0, skyalert, skyalert, metro_state, metro, ROT270, "Metro", "Sky Alert", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1993, ladykill, 0, karatour, ladykill, metro_state, karatour, ROT90, "Yanyaka (Mitchell license)", "Lady Killer", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1993, moegonta, ladykill, karatour, moegonta, metro_state, karatour, ROT90, "Yanyaka", "Moeyo Gonta!! (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1993, poitto, 0, poitto, poitto, metro_state, metro, ROT0, "Metro / Able Corp.", "Poitto!", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, blzntrnd, 0, blzntrnd, blzntrnd, metro_state, blzntrnd, ROT0, "Human Amusement", "Blazing Tornado", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, dharma, 0, dharma, dharma, metro_state, metro, ROT0, "Metro", "Dharma Doujou", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, dharmak, dharma, dharma, dharma, metro_state, dharmak, ROT0, "Metro", "Dharma Doujou (Korea)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, lastfort, 0, lastfort, lastfort, metro_state, metro, ROT0, "Metro", "Last Fortress - Toride", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, lastforte, lastfort, lastfort, lastfero, metro_state, metro, ROT0, "Metro", "Last Fortress - Toride (Erotic, Rev C)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, lastfortea,lastfort, lastfort, lastfero, metro_state, metro, ROT0, "Metro", "Last Fortress - Toride (Erotic, Rev A)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, lastfortk, lastfort, lastfort, lastfero, metro_state, metro, ROT0, "Metro", "Last Fortress - Toride (Korea)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, lastfortg, lastfort, lastforg, ladykill, metro_state, metro, ROT0, "Metro", "Last Fortress - Toride (German)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, toride2g, 0, toride2g, toride2g, metro_state, metro, ROT0, "Metro", "Toride II Adauchi Gaiden", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, toride2gg, toride2g, toride2g, toride2g, metro_state, metro, ROT0, "Metro", "Toride II Adauchi Gaiden (German)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, toride2gk, toride2g, toride2g, toride2g, metro_state, metro, ROT0, "Metro", "Toride II Bok Su Oi Jeon Adauchi Gaiden (Korea)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, toride2j, toride2g, toride2g, toride2g, metro_state, metro, ROT0, "Metro", "Toride II (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, gunmast, 0, pururun, gunmast, metro_state, daitorid, ROT0, "Metro", "Gun Master", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, daitorid, 0, daitorid, daitorid, metro_state, daitorid, ROT0, "Metro", "Daitoride", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, daitorida, daitorid, daitoa, daitorid, metro_state, balcube, ROT0, "Metro", "Daitoride (YMF278B version)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, dokyusei, 0, dokyusei, dokyusei, metro_state, gakusai, ROT0, "Make Software / Elf / Media Trading", "Mahjong Doukyuusei", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, dokyusp, 0, dokyusp, gakusai, metro_state, gakusai, ROT0, "Make Software / Elf / Media Trading", "Mahjong Doukyuusei Special", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, msgogo, 0, msgogo, msgogo, metro_state, balcube, ROT0, "Metro", "Mouse Shooter GoGo", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, pururun, 0, pururun, pururun, metro_state, daitorid, ROT0, "Metro / Banpresto", "Pururun", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, puzzli, 0, daitorid, puzzli, metro_state, daitorid, ROT0, "Metro / Banpresto", "Puzzli", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, 3kokushi, 0, 3kokushi, 3kokushi, metro_state, karatour, ROT0, "Mitchell", "Sankokushi (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, balcube, 0, balcube, balcube, metro_state, balcube, ROT0, "Metro", "Bal Cube", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, bangball, 0, bangball, bangball, metro_state, balcube, ROT0, "Banpresto / Kunihiko Tashiro+Goodhouse", "Bang Bang Ball (v1.05)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, gstrik2, 0, gstrik2, gstrik2, metro_state, blzntrnd, ROT0, "Human Amusement", "Grand Striker 2 (Europe and Oceania)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, gstrik2j, gstrik2, gstrik2, gstrik2, metro_state, blzntrnd, ROT0, "Human Amusement", "Grand Striker 2 (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // priority between rounds
|
||||
GAME( 1999, batlbubl, bangball, batlbubl, batlbubl, metro_state, balcube, ROT0, "Banpresto (Limenko license?)", "Battle Bubble (v2.00)", GAME_SUPPORTS_SAVE ) // or bootleg?
|
||||
GAME( 1996, mouja, 0, mouja, mouja, metro_state, mouja, ROT0, "Etona", "Mouja (Japan)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1997, gakusai, 0, gakusai, gakusai, metro_state, gakusai, ROT0, "MakeSoft", "Mahjong Gakuensai (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1998, gakusai2, 0, gakusai2, gakusai, metro_state, gakusai, ROT0, "MakeSoft", "Mahjong Gakuensai 2 (Japan)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 2000, puzzlet, 0, puzzlet, puzzlet, metro_state, puzzlet, ROT0, "Unies Corporation", "Puzzlet (Japan)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1992, karatour, 0, karatour, karatour, metro_state, karatour, ROT0, "Mitchell", "The Karate Tournament", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1992, pangpoms, 0, pangpoms, pangpoms, metro_state, metro, ROT0, "Metro", "Pang Pom's", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1992, pangpomsm, pangpoms, pangpoms, pangpoms, metro_state, metro, ROT0, "Metro (Mitchell license)", "Pang Pom's (Mitchell)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1992, skyalert, 0, skyalert, skyalert, metro_state, metro, ROT270, "Metro", "Sky Alert", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1993, ladykill, 0, karatour, ladykill, metro_state, karatour, ROT90, "Yanyaka (Mitchell license)", "Lady Killer", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1993, moegonta, ladykill, karatour, moegonta, metro_state, karatour, ROT90, "Yanyaka", "Moeyo Gonta!! (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1993, poitto, 0, poitto, poitto, metro_state, metro, ROT0, "Metro / Able Corp.", "Poitto!", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, blzntrnd, 0, blzntrnd, blzntrnd, metro_state, blzntrnd, ROT0, "Human Amusement", "Blazing Tornado", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, dharma, 0, dharma, dharma, metro_state, metro, ROT0, "Metro", "Dharma Doujou", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, dharmak, dharma, dharma, dharma, metro_state, dharmak, ROT0, "Metro", "Dharma Doujou (Korea)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, lastfort, 0, lastfort, lastfort, metro_state, metro, ROT0, "Metro", "Last Fortress - Toride", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, lastforte, lastfort, lastfort, lastfero, metro_state, metro, ROT0, "Metro", "Last Fortress - Toride (Erotic, Rev C)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, lastfortea,lastfort, lastfort, lastfero, metro_state, metro, ROT0, "Metro", "Last Fortress - Toride (Erotic, Rev A)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, lastfortk, lastfort, lastfort, lastfero, metro_state, metro, ROT0, "Metro", "Last Fortress - Toride (Korea)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, lastfortg, lastfort, lastforg, ladykill, metro_state, metro, ROT0, "Metro", "Last Fortress - Toride (German)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, toride2g, 0, toride2g, toride2g, metro_state, metro, ROT0, "Metro", "Toride II Adauchi Gaiden", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, toride2gg, toride2g, toride2g, toride2g, metro_state, metro, ROT0, "Metro", "Toride II Adauchi Gaiden (German)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, toride2gk, toride2g, toride2g, toride2g, metro_state, metro, ROT0, "Metro", "Toride II Bok Su Oi Jeon Adauchi Gaiden (Korea)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, toride2j, toride2g, toride2g, toride2g, metro_state, metro, ROT0, "Metro", "Toride II (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1994, gunmast, 0, pururun, gunmast, metro_state, daitorid, ROT0, "Metro", "Gun Master", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, daitorid, 0, daitorid, daitorid, metro_state, daitorid, ROT0, "Metro", "Daitoride", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, daitorida, daitorid, daitoa, daitorid, metro_state, balcube, ROT0, "Metro", "Daitoride (YMF278B version)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, dokyusei, 0, dokyusei, dokyusei, metro_state, gakusai, ROT0, "Make Software / Elf / Media Trading", "Mahjong Doukyuusei", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, dokyusp, 0, dokyusp, gakusai, metro_state, gakusai, ROT0, "Make Software / Elf / Media Trading", "Mahjong Doukyuusei Special", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, msgogo, 0, msgogo, msgogo, metro_state, balcube, ROT0, "Metro", "Mouse Shooter GoGo", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, pururun, 0, pururun, pururun, metro_state, daitorid, ROT0, "Metro / Banpresto", "Pururun", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, puzzli, 0, daitorid, puzzli, metro_state, daitorid, ROT0, "Metro / Banpresto", "Puzzli", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, 3kokushi, 0, 3kokushi, 3kokushi, metro_state, karatour, ROT0, "Mitchell", "Sankokushi (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, balcube, 0, balcube, balcube, metro_state, balcube, ROT0, "Metro", "Bal Cube", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, bangball, 0, bangball, bangball, metro_state, balcube, ROT0, "Banpresto / Kunihiko Tashiro+Goodhouse", "Bang Bang Ball (v1.05)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, gstrik2, 0, gstrik2, gstrik2, metro_state, blzntrnd, ROT0, "Human Amusement", "Grand Striker 2 (Europe and Oceania)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1996, gstrik2j, gstrik2, gstrik2, gstrik2, metro_state, blzntrnd, ROT0, "Human Amusement", "Grand Striker 2 (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // priority between rounds
|
||||
GAME( 1999, batlbubl, bangball, batlbubl, batlbubl, metro_state, balcube, ROT0, "Banpresto (Limenko license?)", "Battle Bubble (v2.00)", GAME_SUPPORTS_SAVE ) // or bootleg?
|
||||
GAME( 1996, mouja, 0, mouja, mouja, metro_state, mouja, ROT0, "Etona", "Mouja (Japan)", GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1997, gakusai, 0, gakusai, gakusai, metro_state, gakusai, ROT0, "MakeSoft", "Mahjong Gakuensai (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1998, gakusai2, 0, gakusai2, gakusai, metro_state, gakusai, ROT0, "MakeSoft", "Mahjong Gakuensai 2 (Japan)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 2000, puzzlet, 0, puzzlet, puzzlet, metro_state, puzzlet, ROT0, "Unies Corporation", "Puzzlet (Japan)", GAME_NOT_WORKING | GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, vmetal, 0, vmetal, vmetal, metro_state, blzntrnd, ROT90, "Excellent System", "Varia Metal", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, vmetaln, vmetal, vmetal, vmetal, metro_state, blzntrnd, ROT90, "Excellent System (New Ways Trading Co. license)", "Varia Metal (New Ways Trading Co.)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
|
||||
|
@ -1,555 +0,0 @@
|
||||
/*
|
||||
|
||||
Varia Metal
|
||||
Excellent System Ltd, 1995
|
||||
|
||||
PCB Layout
|
||||
----------
|
||||
This game runs on Metro hardware.
|
||||
|
||||
ES-9309B-B
|
||||
|--------------------------------------------|
|
||||
| TA7222 8.U9 DSW1(8) DSW2(8) |
|
||||
|VOL M6295 1.000MHz |
|
||||
| |------------| |
|
||||
| 7.U12 | 68000 | |
|
||||
| uPC3403 |------------| |
|
||||
|J 640kHz ES-8712 |
|
||||
|A M6585 EPM7032 6B.U18 5B.U19 |
|
||||
|M MM1035 |
|
||||
|M 26.666MHz 16MHz 62256 62256 |
|
||||
|A |
|
||||
| |--------| 1.U29 |
|
||||
| 62256 |Imagetek| |
|
||||
| 62256 |I4220 | 2.U31 |
|
||||
| | | |
|
||||
| |--------| 3.U28 |
|
||||
| |
|
||||
| 6264 4.U30 |
|
||||
|--------------------------------------------|
|
||||
Notes:
|
||||
68000 - clock 16.000MHz
|
||||
ES-8712 - ES-8712 Single Channel ADPCM Samples Player. Clock ?? seems to be 16kHz?
|
||||
This chip is branded 'EXCELLENT', may be (or not??) manufactured by Ensonic (SDIP48)
|
||||
M6295 - clock 1.000MHz. Sample rate = 1000000/132
|
||||
M6585 - Oki M6585 ADPCM Voice Synthesizer IC (DIP18). Clock 640kHz.
|
||||
Sample rate = 16kHz (selection - pin 1 LOW, pin 2 HIGH = 16kHz)
|
||||
This is a version-up to the previous M5205 with some additional
|
||||
capabilies and improvements.
|
||||
MM1035 - Mitsumi Monolithic IC MM1035 System Reset and Watchdog Timer (DIP8)
|
||||
uPC3403 - NEC uPC3403 High Performance Quad Operational Amplifier (DIP14)
|
||||
62256 - 32k x8 SRAM (DIP28)
|
||||
6264 - 8k x8 SRAM (DIP28)
|
||||
TA7222 - Toshiba TA7222 5.8 Watt Audio Power Amplifier (SIP10)
|
||||
EPM7032 - Altera EPM7032LC44-15T High Performance EEPROM-based Programmable Logic Device (PLCC44)
|
||||
Custom - Imagetek I4220 Graphics Controller (QFP208)
|
||||
VSync - 58.2328Hz
|
||||
HSync - 15.32kHz
|
||||
ROMs -
|
||||
6B & 5B are 27C040 EPROM (DIP32)
|
||||
8 is 4M MaskROM (DIP32)
|
||||
All other ROMs are 16M MaskROM (DIP42)
|
||||
|
||||
|
||||
|
||||
|
||||
Varia Metal
|
||||
|
||||
Notes:
|
||||
|
||||
*****
|
||||
i should fully merge video with metro.c, it uses the same imagetek chip (although with 16x16 tiles)
|
||||
this should fix most of the remaining gfx glitches - looks very similar to 'taidoa' (stephh)
|
||||
*****
|
||||
|
||||
|
||||
It has Sega and Taito logos in the roms ?!
|
||||
|
||||
ES8712 sound may not be quite right. Samples are currently looped, but
|
||||
whether they should and how, is unknown.
|
||||
|
||||
where does the M6585 hook up to?
|
||||
|
||||
cleanup
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#include "emu.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "sound/okim6295.h"
|
||||
#include "sound/es8712.h"
|
||||
#include "includes/metro.h"
|
||||
|
||||
class vmetal_state : public metro_state
|
||||
{
|
||||
public:
|
||||
vmetal_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: metro_state(mconfig, type, tag),
|
||||
m_texttileram(*this, "texttileram"),
|
||||
m_mid1tileram(*this, "mid1tileram"),
|
||||
m_mid2tileram(*this, "mid2tileram"),
|
||||
m_tlookup(*this, "tlookup"),
|
||||
m_vmetal_videoregs(*this, "vmetal_regs")
|
||||
{ }
|
||||
|
||||
required_shared_ptr<UINT16> m_texttileram;
|
||||
required_shared_ptr<UINT16> m_mid1tileram;
|
||||
required_shared_ptr<UINT16> m_mid2tileram;
|
||||
required_shared_ptr<UINT16> m_tlookup;
|
||||
required_shared_ptr<UINT16> m_vmetal_videoregs;
|
||||
|
||||
tilemap_t *m_texttilemap;
|
||||
tilemap_t *m_mid1tilemap;
|
||||
tilemap_t *m_mid2tilemap;
|
||||
DECLARE_READ16_MEMBER(varia_crom_read);
|
||||
DECLARE_WRITE16_MEMBER(vmetal_texttileram_w);
|
||||
DECLARE_WRITE16_MEMBER(vmetal_mid1tileram_w);
|
||||
DECLARE_WRITE16_MEMBER(vmetal_mid2tileram_w);
|
||||
DECLARE_READ16_MEMBER(varia_dips_bit8_r);
|
||||
DECLARE_READ16_MEMBER(varia_dips_bit7_r);
|
||||
DECLARE_READ16_MEMBER(varia_dips_bit6_r);
|
||||
DECLARE_READ16_MEMBER(varia_dips_bit5_r);
|
||||
DECLARE_READ16_MEMBER(varia_dips_bit4_r);
|
||||
DECLARE_READ16_MEMBER(varia_dips_bit3_r);
|
||||
DECLARE_READ16_MEMBER(varia_dips_bit2_r);
|
||||
DECLARE_READ16_MEMBER(varia_dips_bit1_r);
|
||||
DECLARE_WRITE8_MEMBER(vmetal_control_w);
|
||||
DECLARE_WRITE8_MEMBER(vmetal_es8712_w);
|
||||
TILE_GET_INFO_MEMBER(get_vmetal_texttilemap_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_vmetal_mid1tilemap_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_vmetal_mid2tilemap_tile_info);
|
||||
DECLARE_VIDEO_START(varia);
|
||||
UINT32 screen_update_varia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
};
|
||||
|
||||
|
||||
READ16_MEMBER(vmetal_state::varia_crom_read)
|
||||
{
|
||||
/* game reads the cgrom, result is 7772, verified to be correct on the real board */
|
||||
|
||||
|
||||
UINT8 *cgrom = memregion("gfx1")->base();
|
||||
UINT16 retdat;
|
||||
|
||||
offset = offset << 1;
|
||||
offset |= (m_vmetal_videoregs[0x0ab / 2] & 0x7f) << 16;
|
||||
retdat = ((cgrom[offset] << 8) | (cgrom[offset + 1]));
|
||||
// popmessage("varia romread offset %06x data %04x", offset, retdat);
|
||||
|
||||
return retdat;
|
||||
}
|
||||
|
||||
|
||||
static void get_vmetal_tlookup(running_machine &machine, UINT16 data, UINT16 *tileno, UINT16 *color)
|
||||
{
|
||||
vmetal_state *state = machine.driver_data<vmetal_state>();
|
||||
int idx = ((data & 0x7fff) >> 4) * 2;
|
||||
UINT32 lookup = (state->m_tlookup[idx] << 16) | state->m_tlookup[idx + 1];
|
||||
|
||||
*tileno = (data & 0xf) | ((lookup >> 2) & 0xfff0);
|
||||
*color = (lookup >> 20) & 0xff;
|
||||
}
|
||||
|
||||
|
||||
WRITE16_MEMBER(vmetal_state::vmetal_texttileram_w)
|
||||
{
|
||||
|
||||
COMBINE_DATA(&m_texttileram[offset]);
|
||||
m_texttilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(vmetal_state::vmetal_mid1tileram_w)
|
||||
{
|
||||
|
||||
COMBINE_DATA(&m_mid1tileram[offset]);
|
||||
m_mid1tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
WRITE16_MEMBER(vmetal_state::vmetal_mid2tileram_w)
|
||||
{
|
||||
|
||||
COMBINE_DATA(&m_mid2tileram[offset]);
|
||||
m_mid2tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
|
||||
READ16_MEMBER(vmetal_state::varia_dips_bit8_r){ return ((ioport("DSW2")->read() & 0x80) << 0) | ((ioport("DSW1")->read() & 0x80) >> 1); }
|
||||
READ16_MEMBER(vmetal_state::varia_dips_bit7_r){ return ((ioport("DSW2")->read() & 0x40) << 1) | ((ioport("DSW1")->read() & 0x40) >> 0); }
|
||||
READ16_MEMBER(vmetal_state::varia_dips_bit6_r){ return ((ioport("DSW2")->read() & 0x20) << 2) | ((ioport("DSW1")->read() & 0x20) << 1); }
|
||||
READ16_MEMBER(vmetal_state::varia_dips_bit5_r){ return ((ioport("DSW2")->read() & 0x10) << 3) | ((ioport("DSW1")->read() & 0x10) << 2); }
|
||||
READ16_MEMBER(vmetal_state::varia_dips_bit4_r){ return ((ioport("DSW2")->read() & 0x08) << 4) | ((ioport("DSW1")->read() & 0x08) << 3); }
|
||||
READ16_MEMBER(vmetal_state::varia_dips_bit3_r){ return ((ioport("DSW2")->read() & 0x04) << 5) | ((ioport("DSW1")->read() & 0x04) << 4); }
|
||||
READ16_MEMBER(vmetal_state::varia_dips_bit2_r){ return ((ioport("DSW2")->read() & 0x02) << 6) | ((ioport("DSW1")->read() & 0x02) << 5); }
|
||||
READ16_MEMBER(vmetal_state::varia_dips_bit1_r){ return ((ioport("DSW2")->read() & 0x01) << 7) | ((ioport("DSW1")->read() & 0x01) << 6); }
|
||||
|
||||
WRITE8_MEMBER(vmetal_state::vmetal_control_w)
|
||||
{
|
||||
device_t *device = machine().device("essnd");
|
||||
/* Lower nibble is the coin control bits shown in
|
||||
service mode, but in game mode they're different */
|
||||
coin_counter_w(machine(), 0, data & 0x04);
|
||||
coin_counter_w(machine(), 1, data & 0x08); /* 2nd coin schute activates coin 0 counter in game mode?? */
|
||||
// coin_lockout_w(machine(), 0, data & 0x01); /* always on in game mode?? */
|
||||
coin_lockout_w(machine(), 1, data & 0x02); /* never activated in game mode?? */
|
||||
|
||||
if ((data & 0x40) == 0)
|
||||
device->reset();
|
||||
else
|
||||
es8712_play(device);
|
||||
|
||||
if (data & 0x10)
|
||||
es8712_set_bank_base(device, 0x100000);
|
||||
else
|
||||
es8712_set_bank_base(device, 0x000000);
|
||||
|
||||
if (data & 0xa0)
|
||||
logerror("%s:Writing unknown bits %04x to $200000\n",machine().describe_context(),data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(vmetal_state::vmetal_es8712_w)
|
||||
{
|
||||
device_t *device = machine().device("essnd");
|
||||
/* Many samples in the ADPCM ROM are actually not used.
|
||||
|
||||
Snd Offset Writes Sample Range
|
||||
0000 0004 0002 0006 000a 0008 000c
|
||||
-- ---------------------------------- -------------
|
||||
00 006e 0001 00ab 003c 0002 003a 003a 01ab6e-023a3c
|
||||
01 003d 0002 003a 001d 0002 007e 007e 023a3d-027e1d
|
||||
02 00e2 0003 0005 002e 0003 00f3 00f3 0305e2-03f32e
|
||||
03 000a 0005 001e 00f6 0005 00ec 00ec 051e0a-05ecf6
|
||||
04 00f7 0005 00ec 008d 0006 0060 0060 05ecf7-06608d
|
||||
05 0016 0008 002e 0014 0009 0019 0019 082e16-091914
|
||||
06 0015 0009 0019 0094 000b 0015 0015 091915-0b1594
|
||||
07 0010 000d 0012 00bf 000d 0035 0035 0d1210-0d35bf
|
||||
08 00ce 000e 002f 0074 000f 0032 0032 0e2fce-0f3274
|
||||
09 0000 0000 0000 003a 0000 007d 007d 000000-007d3a
|
||||
0a 0077 0000 00fa 008d 0001 00b6 00b6 00fa77-01b68d
|
||||
0b 008e 0001 00b6 00b3 0002 0021 0021 01b68e-0221b3
|
||||
0c 0062 0002 00f7 0038 0003 00de 00de 02f762-03de38
|
||||
0d 00b9 0005 00ab 00ef 0006 0016 0016 05abb9-0616ef
|
||||
0e 00dd 0007 0058 00db 0008 001a 001a 0758dd-081adb
|
||||
0f 00dc 0008 001a 002e 0008 008a 008a 081adc-088a2e
|
||||
10 00db 0009 00d7 00ff 000a 0046 0046 09d7db-0a46ff
|
||||
11 0077 000c 0003 006d 000c 0080 0080 0c0377-0c806d
|
||||
12 006e 000c 0080 006c 000d 0002 0002 0c806e-0d026c
|
||||
13 006d 000d 0002 002b 000d 0041 0041 0d026d-0d412b
|
||||
14 002c 000d 0041 002a 000d 00be 00be 0d412c-0dbe2a
|
||||
15 002b 000d 00be 0029 000e 0083 0083 0dbe2b-0e8329
|
||||
16 002a 000e 0083 00ee 000f 0069 0069 0e832a-0f69ee
|
||||
*/
|
||||
|
||||
es8712_w(device, space, offset, data);
|
||||
logerror("%s:Writing %04x to ES8712 offset %02x\n", machine().describe_context(), data, offset);
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( varia_program_map, AS_PROGRAM, 16, vmetal_state )
|
||||
AM_RANGE(0x000000, 0x0fffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x11ffff) AM_RAM_WRITE(vmetal_texttileram_w) AM_SHARE("texttileram")
|
||||
AM_RANGE(0x120000, 0x13ffff) AM_RAM_WRITE(vmetal_mid1tileram_w) AM_SHARE("mid1tileram")
|
||||
AM_RANGE(0x140000, 0x15ffff) AM_RAM_WRITE(vmetal_mid2tileram_w) AM_SHARE("mid2tileram")
|
||||
|
||||
AM_RANGE(0x160000, 0x16ffff) AM_READ(varia_crom_read) // cgrom read window ..
|
||||
|
||||
AM_RANGE(0x170000, 0x173fff) AM_RAM_WRITE(paletteram_GGGGGRRRRRBBBBBx_word_w) AM_SHARE("paletteram") // Palette
|
||||
AM_RANGE(0x174000, 0x174fff) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0x175000, 0x177fff) AM_RAM
|
||||
AM_RANGE(0x178000, 0x1787ff) AM_RAM AM_SHARE("tlookup")
|
||||
AM_RANGE(0x178800, 0x1796ff) AM_RAM AM_SHARE("vmetal_regs")
|
||||
AM_RANGE(0x179700, 0x179713) AM_WRITEONLY AM_SHARE("videoregs") // Metro sprite chip Video Registers
|
||||
|
||||
AM_RANGE(0x200000, 0x200001) AM_READ_PORT("P1_P2") AM_WRITE8(vmetal_control_w, 0x00ff)
|
||||
AM_RANGE(0x200002, 0x200003) AM_READ_PORT("SYSTEM")
|
||||
|
||||
/* same weird way to read Dip Switches as in many games in metro.c driver - use balcube_dsw_r read handler once the driver is merged */
|
||||
AM_RANGE(0x30fffe, 0x30ffff) AM_READNOP // 0x40 = dip1-16 -> 0xff0086 (doesn't exist in this game : address is NEVER read back)
|
||||
AM_RANGE(0x317ffe, 0x317fff) AM_READNOP // 0x40 = dip1-15 -> 0xff0086 (doesn't exist in this game : address is NEVER read back)
|
||||
AM_RANGE(0x31bffe, 0x31bfff) AM_READNOP // 0x40 = dip1-14 -> 0xff0086 (doesn't exist in this game : address is NEVER read back)
|
||||
AM_RANGE(0x31dffe, 0x31dfff) AM_READNOP // 0x40 = dip1-13 -> 0xff0086 (doesn't exist in this game : address is NEVER read back)
|
||||
AM_RANGE(0x31effe, 0x31efff) AM_READNOP // 0x40 = dip1-12 -> 0xff0086 (doesn't exist in this game : address is NEVER read back)
|
||||
AM_RANGE(0x31f7fe, 0x31f7ff) AM_READNOP // 0x40 = dip1-11 -> 0xff0086 (doesn't exist in this game : address is NEVER read back)
|
||||
AM_RANGE(0x31fbfe, 0x31fbff) AM_READNOP // 0x40 = dip1-10 -> 0xff0086 (doesn't exist in this game : address is NEVER read back)
|
||||
AM_RANGE(0x31fdfe, 0x31fdff) AM_READNOP // 0x40 = dip1-9 -> 0xff0086 (doesn't exist in this game : address is NEVER read back)
|
||||
AM_RANGE(0x31fefe, 0x31feff) AM_READ(varia_dips_bit8_r) // 0x40 = dip1-8 -> 0xff0085 , 0x80 = dip2-8 -> 0xff0084
|
||||
AM_RANGE(0x31ff7e, 0x31ff7f) AM_READ(varia_dips_bit7_r) // 0x40 = dip1-7 -> 0xff0085 , 0x80 = dip2-7 -> 0xff0084
|
||||
AM_RANGE(0x31ffbe, 0x31ffbf) AM_READ(varia_dips_bit6_r) // 0x40 = dip1-6 -> 0xff0085 , 0x80 = dip2-6 -> 0xff0084
|
||||
AM_RANGE(0x31ffde, 0x31ffdf) AM_READ(varia_dips_bit5_r) // 0x40 = dip1-5 -> 0xff0085 , 0x80 = dip2-5 -> 0xff0084
|
||||
AM_RANGE(0x31ffee, 0x31ffef) AM_READ(varia_dips_bit4_r) // 0x40 = dip1-4 -> 0xff0085 , 0x80 = dip2-4 -> 0xff0084
|
||||
AM_RANGE(0x31fff6, 0x31fff7) AM_READ(varia_dips_bit3_r) // 0x40 = dip1-3 -> 0xff0085 , 0x80 = dip2-3 -> 0xff0084
|
||||
AM_RANGE(0x31fffa, 0x31fffb) AM_READ(varia_dips_bit2_r) // 0x40 = dip1-2 -> 0xff0085 , 0x80 = dip2-2 -> 0xff0084
|
||||
AM_RANGE(0x31fffc, 0x31fffd) AM_READ(varia_dips_bit1_r) // 0x40 = dip1-1 -> 0xff0085 , 0x80 = dip2-1 -> 0xff0084
|
||||
|
||||
AM_RANGE(0x400000, 0x400001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff )
|
||||
AM_RANGE(0x400002, 0x400003) AM_DEVWRITE8("oki", okim6295_device, write, 0x00ff) // Volume/channel info
|
||||
AM_RANGE(0x500000, 0x50000d) AM_WRITE8(vmetal_es8712_w, 0x00ff)
|
||||
|
||||
AM_RANGE(0xff0000, 0xffffff) AM_RAM
|
||||
ADDRESS_MAP_END
|
||||
|
||||
|
||||
/* verified from M68000 code */
|
||||
static INPUT_PORTS_START( varia )
|
||||
PORT_START("P1_P2")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
|
||||
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
|
||||
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
|
||||
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
|
||||
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START1 )
|
||||
|
||||
PORT_START("SYSTEM")
|
||||
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
|
||||
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
|
||||
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_TILT ) /* 'Tilt' only in "test mode" - no effect ingame */
|
||||
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* same coinage as COIN1 and COIN2 */
|
||||
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* 'Test' only in "test mode" - no effect ingame */
|
||||
PORT_BIT( 0xffe0, IP_ACTIVE_LOW, IPT_UNUSED )
|
||||
|
||||
/* stored to 0xff0085.b (cpl'ed) */
|
||||
PORT_START("DSW1")
|
||||
PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coinage ) )
|
||||
PORT_DIPSETTING( 0x0005, DEF_STR( 3C_1C ) )
|
||||
PORT_DIPSETTING( 0x0006, DEF_STR( 2C_1C ) )
|
||||
PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) )
|
||||
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_2C ) )
|
||||
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_3C ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( 1C_4C ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( 1C_5C ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( 1C_6C ) )
|
||||
PORT_DIPUNUSED( 0x0008, IP_ACTIVE_LOW ) /* 0x01 (OFF) or 0x02 (ON) written to 0xff0112.b but NEVER read back - old credits for 2 players game ? */
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Flip_Screen ) ) /* 0x07c1 written to 0x1788ac.w (screen control ?) at first (code at 0x0001b8) */
|
||||
PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) /* 0x07c1 written to 0xff0114.w (then 0x1788ac.w) during initialisation (code at 0x000436) */
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) /* 0x07c0 written to 0xff0114.w (then 0x1788ac.w) during initialisation (code at 0x000436) */
|
||||
PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Demo_Sounds ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Off ) )
|
||||
PORT_DIPSETTING( 0x0020, DEF_STR( On ) )
|
||||
PORT_DIPUNUSED( 0x0040, IP_ACTIVE_LOW )
|
||||
PORT_DIPUNUSED( 0x0080, IP_ACTIVE_LOW )
|
||||
|
||||
/* stored to 0xff0084.b (cpl'ed) */
|
||||
PORT_START("DSW2")
|
||||
PORT_DIPNAME( 0x0003, 0x0003, DEF_STR( Difficulty ) )
|
||||
PORT_DIPSETTING( 0x0002, DEF_STR( Easy ) )
|
||||
PORT_DIPSETTING( 0x0003, DEF_STR( Normal ) )
|
||||
PORT_DIPSETTING( 0x0001, DEF_STR( Hard ) )
|
||||
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
|
||||
PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Lives ) )
|
||||
PORT_DIPSETTING( 0x0008, "1" )
|
||||
PORT_DIPSETTING( 0x0004, "2" )
|
||||
PORT_DIPSETTING( 0x000c, "3" )
|
||||
PORT_DIPSETTING( 0x0000, "4" )
|
||||
PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Bonus_Life ) ) /* code at 0x0004a4 */
|
||||
PORT_DIPSETTING( 0x0010, "Every 30000" )
|
||||
PORT_DIPSETTING( 0x0000, "Every 60000" )
|
||||
PORT_DIPUNUSED( 0x0020, IP_ACTIVE_LOW )
|
||||
PORT_DIPUNUSED( 0x0040, IP_ACTIVE_LOW )
|
||||
PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
|
||||
static const gfx_layout char16x16layout =
|
||||
{
|
||||
16,16,
|
||||
RGN_FRAC(1,1),
|
||||
4,
|
||||
{ 0,1,2,3 },
|
||||
{ 4, 0, 12, 8, 20, 16, 28, 24, 36, 32, 44, 40, 52, 48, 60, 56 },
|
||||
{ 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, 8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
|
||||
16*64
|
||||
};
|
||||
|
||||
static const gfx_layout char8x8layout =
|
||||
{
|
||||
8,8,
|
||||
RGN_FRAC(1,1),
|
||||
4,
|
||||
{ 0,1,2,3 },
|
||||
{ 4, 0, 12, 8, 20, 16, 28, 24 },
|
||||
{ 0*32,1*32,2*32,3*32,4*32,5*32,6*32,7*32 },
|
||||
8*32
|
||||
};
|
||||
|
||||
static GFXDECODE_START( vmetal )
|
||||
GFXDECODE_ENTRY( "gfx1", 0, char16x16layout, 0x1000, 512 ) /* bg tiles */
|
||||
GFXDECODE_ENTRY( "gfx1", 0, char8x8layout, 0x1000, 512 ) /* bg tiles */
|
||||
GFXDECODE_END
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(vmetal_state::get_vmetal_texttilemap_tile_info)
|
||||
{
|
||||
UINT32 tile;
|
||||
UINT16 color, data = m_texttileram[tile_index];
|
||||
int idx = ((data & 0x7fff) >> 4) * 2;
|
||||
UINT32 lookup = (m_tlookup[idx] << 16) | m_tlookup[idx + 1];
|
||||
|
||||
tile = (data & 0xf) | (lookup & 0x7fff0);
|
||||
color = ((lookup >> 20) & 0x1f) + 0xe0;
|
||||
|
||||
if (data & 0x8000)
|
||||
tile = 0;
|
||||
|
||||
SET_TILE_INFO_MEMBER(1, tile, color, TILE_FLIPYX(0x0));
|
||||
}
|
||||
|
||||
|
||||
TILE_GET_INFO_MEMBER(vmetal_state::get_vmetal_mid1tilemap_tile_info)
|
||||
{
|
||||
UINT16 tile, color, data = m_mid1tileram[tile_index];
|
||||
|
||||
get_vmetal_tlookup(machine(), data, &tile, &color);
|
||||
|
||||
if (data & 0x8000)
|
||||
tile = 0;
|
||||
|
||||
SET_TILE_INFO_MEMBER(0, tile, color, TILE_FLIPYX(0x0));
|
||||
}
|
||||
|
||||
TILE_GET_INFO_MEMBER(vmetal_state::get_vmetal_mid2tilemap_tile_info)
|
||||
{
|
||||
UINT16 tile, color, data = m_mid2tileram[tile_index];
|
||||
|
||||
get_vmetal_tlookup(machine(), data, &tile, &color);
|
||||
|
||||
if (data & 0x8000)
|
||||
tile = 0;
|
||||
|
||||
SET_TILE_INFO_MEMBER(0, tile, color, TILE_FLIPYX(0x0));
|
||||
}
|
||||
|
||||
static void expand_gfx1(running_machine &machine)
|
||||
{
|
||||
metro_state *state = machine.driver_data<metro_state>();
|
||||
UINT8 *base_gfx = state->memregion("gfx1")->base();
|
||||
UINT32 length = 2 * state->memregion("gfx1")->bytes();
|
||||
state->m_expanded_gfx1 = auto_alloc_array(machine, UINT8, length);
|
||||
for (int i = 0; i < length; i += 2)
|
||||
{
|
||||
UINT8 src = base_gfx[i / 2];
|
||||
state->m_expanded_gfx1[i+0] = src & 15;
|
||||
state->m_expanded_gfx1[i+1] = src >> 4;
|
||||
}
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(vmetal_state,varia)
|
||||
{
|
||||
|
||||
m_texttilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(vmetal_state::get_vmetal_texttilemap_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 256);
|
||||
m_mid1tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(vmetal_state::get_vmetal_mid1tilemap_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 256, 256);
|
||||
m_mid2tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(vmetal_state::get_vmetal_mid2tilemap_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 256, 256);
|
||||
|
||||
m_texttilemap->set_transparent_pen(15);
|
||||
m_mid1tilemap->set_transparent_pen(15);
|
||||
m_mid2tilemap->set_transparent_pen(15);
|
||||
|
||||
expand_gfx1(machine());
|
||||
}
|
||||
|
||||
UINT32 vmetal_state::screen_update_varia(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
|
||||
bitmap.fill(get_black_pen(machine()), cliprect);
|
||||
machine().priority_bitmap.fill(0, cliprect);
|
||||
|
||||
m_mid2tilemap->set_scrollx(0, m_vmetal_videoregs[0x06a/2]-64 /*+ m_vmetal_videoregs[0x066/2]*/);
|
||||
m_mid1tilemap->set_scrollx(0, m_vmetal_videoregs[0x07a/2]-64 /*+ m_vmetal_videoregs[0x076/2]*/);
|
||||
m_texttilemap->set_scrollx(0, -64 /*+ m_vmetal_videoregs[0x076/2]*/);
|
||||
|
||||
m_mid2tilemap->set_scrolly(0, -64);
|
||||
m_mid1tilemap->set_scrolly(0, -64);
|
||||
m_texttilemap->set_scrolly(0, -64);
|
||||
|
||||
m_mid1tilemap->draw(bitmap, cliprect, 0, 0);
|
||||
m_mid2tilemap->draw(bitmap, cliprect, 0, 0);
|
||||
metro_draw_sprites(machine(), bitmap, cliprect);
|
||||
m_texttilemap->draw(bitmap, cliprect, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static MACHINE_CONFIG_START( varia, vmetal_state )
|
||||
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", M68000, 16000000)
|
||||
MCFG_CPU_PROGRAM_MAP(varia_program_map)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", vmetal_state, irq1_line_hold) // also level 3
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_REFRESH_RATE(60)
|
||||
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
|
||||
MCFG_SCREEN_SIZE(2048, 2048)
|
||||
MCFG_SCREEN_VISIBLE_AREA(0+64, 319+64, 0+64, 223+64)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(vmetal_state, screen_update_varia)
|
||||
|
||||
MCFG_GFXDECODE(vmetal)
|
||||
MCFG_PALETTE_LENGTH(0x4000)
|
||||
|
||||
MCFG_VIDEO_START_OVERRIDE(vmetal_state,varia)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
MCFG_OKIM6295_ADD("oki", 1320000, OKIM6295_PIN7_HIGH) // clock frequency & pin 7 not verified
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.75)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.75)
|
||||
|
||||
MCFG_SOUND_ADD("essnd", ES8712, 12000)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
ROM_START( vmetal )
|
||||
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
|
||||
ROM_LOAD16_BYTE( "5b.u19", 0x00001, 0x80000, CRC(4933ac6c) SHA1(1a3303e32fcb08854d4d6e13f36ca99d92aed4cc) )
|
||||
ROM_LOAD16_BYTE( "6b.u18", 0x00000, 0x80000, CRC(4eb939d5) SHA1(741ab05043fc3bd886162d878630e45da9359718) )
|
||||
|
||||
ROM_REGION( 0x800000, "gfx1", 0 )
|
||||
ROMX_LOAD( "1.u29", 0x000004, 0x200000, CRC(b470c168) SHA1(c30462dc134da1e71a94b36ef96ecd65c325b07e) , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "2.u31", 0x000000, 0x200000, CRC(b36f8d60) SHA1(1676859d0fee4eb9897ce1601a2c9fd9a6dc4a43) , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "3.u28", 0x000006, 0x200000, CRC(00fca765) SHA1(ca9010bd7f59367e483868018db9a9abf871386e) , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "4.u30", 0x000002, 0x200000, CRC(5a25a49c) SHA1(c30781202ec882e1ec6adfb560b0a1075b3cce55) , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
|
||||
ROM_REGION( 0x080000, "oki", 0 ) /* OKI6295 Samples */
|
||||
/* Second half is junk */
|
||||
ROM_LOAD( "8.u9", 0x00000, 0x80000, CRC(c14c001c) SHA1(bad96b5cd40d1c34ef8b702262168ecab8192fb6) )
|
||||
|
||||
ROM_REGION( 0x200000, "essnd", 0 ) /* Samples */
|
||||
ROM_LOAD( "7.u12", 0x00000, 0x200000, CRC(a88c52f1) SHA1(d74a5a11f84ba6b1042b33a2c156a1071b6fbfe1) )
|
||||
ROM_END
|
||||
|
||||
ROM_START( vmetaln )
|
||||
ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */
|
||||
ROM_LOAD16_BYTE( "vm5.bin", 0x00001, 0x80000, CRC(43ef844e) SHA1(c673f34fcc9e406282c9008795b52d01a240099a) )
|
||||
ROM_LOAD16_BYTE( "vm6.bin", 0x00000, 0x80000, CRC(cb292ab1) SHA1(41fdfe67e6cb848542fd5aa0dfde3b1936bb3a28) )
|
||||
|
||||
ROM_REGION( 0x800000, "gfx1", 0 )
|
||||
ROMX_LOAD( "1.u29", 0x000004, 0x200000, CRC(b470c168) SHA1(c30462dc134da1e71a94b36ef96ecd65c325b07e) , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "2.u31", 0x000000, 0x200000, CRC(b36f8d60) SHA1(1676859d0fee4eb9897ce1601a2c9fd9a6dc4a43) , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "3.u28", 0x000006, 0x200000, CRC(00fca765) SHA1(ca9010bd7f59367e483868018db9a9abf871386e) , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
ROMX_LOAD( "4.u30", 0x000002, 0x200000, CRC(5a25a49c) SHA1(c30781202ec882e1ec6adfb560b0a1075b3cce55) , ROM_GROUPWORD | ROM_SKIP(6))
|
||||
|
||||
ROM_REGION( 0x080000, "oki", 0 ) /* OKI6295 Samples */
|
||||
/* Second half is junk */
|
||||
ROM_LOAD( "8.u9", 0x00000, 0x80000, CRC(c14c001c) SHA1(bad96b5cd40d1c34ef8b702262168ecab8192fb6) )
|
||||
|
||||
ROM_REGION( 0x200000, "essnd", 0 ) /* Samples */
|
||||
ROM_LOAD( "7.u12", 0x00000, 0x200000, CRC(a88c52f1) SHA1(d74a5a11f84ba6b1042b33a2c156a1071b6fbfe1) )
|
||||
ROM_END
|
||||
|
||||
|
||||
GAME( 1995, vmetal, 0, varia, varia, driver_device, 0, ROT270, "Excellent System", "Varia Metal", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
||||
GAME( 1995, vmetaln, vmetal, varia, varia, driver_device, 0, ROT270, "Excellent System (New Ways Trading Co. license)", "Varia Metal (New Ways Trading Co.)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL | GAME_SUPPORTS_SAVE )
|
@ -66,17 +66,16 @@ public:
|
||||
|
||||
/* video-related */
|
||||
tilemap_t *m_k053936_tilemap;
|
||||
int m_bg_tilemap_enable[3];
|
||||
int m_bg_tilemap_enable16[3];
|
||||
int m_bg_tilemap_scrolldx[3];
|
||||
int m_tilemap_scrolldx[3];
|
||||
|
||||
int m_support_8bpp;
|
||||
int m_support_16x16;
|
||||
int m_has_zoom;
|
||||
int m_sprite_xoffs;
|
||||
int m_sprite_yoffs;
|
||||
int m_sprite_xoffs_dx;
|
||||
|
||||
UINT8 * m_expanded_gfx1;
|
||||
UINT8 *m_expanded_gfx1;
|
||||
|
||||
/* irq_related */
|
||||
int m_vblank_bit;
|
||||
@ -142,6 +141,11 @@ public:
|
||||
DECLARE_WRITE16_MEMBER(dokyusp_eeprom_bit_w);
|
||||
DECLARE_WRITE16_MEMBER(dokyusp_eeprom_reset_w);
|
||||
DECLARE_WRITE16_MEMBER(mouja_sound_rombank_w);
|
||||
|
||||
// vmetal
|
||||
DECLARE_WRITE8_MEMBER(vmetal_control_w);
|
||||
DECLARE_WRITE8_MEMBER(vmetal_es8712_w);
|
||||
|
||||
DECLARE_DRIVER_INIT(karatour);
|
||||
DECLARE_DRIVER_INIT(daitorid);
|
||||
DECLARE_DRIVER_INIT(blzntrnd);
|
||||
@ -156,9 +160,11 @@ public:
|
||||
TILEMAP_MAPPER_MEMBER(tilemap_scan_gstrik2);
|
||||
DECLARE_MACHINE_START(metro);
|
||||
DECLARE_MACHINE_RESET(metro);
|
||||
void expand_gfx1();
|
||||
DECLARE_VIDEO_START(metro_i4100);
|
||||
DECLARE_VIDEO_START(metro_i4220);
|
||||
DECLARE_VIDEO_START(metro_i4220_offset);
|
||||
DECLARE_VIDEO_START(metro_i4220_dx_tmap);
|
||||
DECLARE_VIDEO_START(metro_i4220_dx_sprite);
|
||||
DECLARE_VIDEO_START(metro_i4300);
|
||||
DECLARE_VIDEO_START(blzntrnd);
|
||||
DECLARE_VIDEO_START(gstrik2);
|
||||
|
@ -713,7 +713,6 @@ $(MAMEOBJ)/excelent.a: \
|
||||
$(DRIVERS)/dblcrown.o \
|
||||
$(DRIVERS)/gcpinbal.o $(VIDEO)/gcpinbal.o \
|
||||
$(DRIVERS)/lastbank.o \
|
||||
$(DRIVERS)/vmetal.o \
|
||||
|
||||
$(MAMEOBJ)/exidy.a: \
|
||||
$(DRIVERS)/carpolo.o $(MACHINE)/carpolo.o $(VIDEO)/carpolo.o \
|
||||
|
@ -60,7 +60,7 @@ TILE_GET_INFO_MEMBER(metro_state::metro_k053936_get_tile_info)
|
||||
int code = m_k053936_ram[tile_index];
|
||||
|
||||
SET_TILE_INFO_MEMBER(
|
||||
2,
|
||||
4,
|
||||
code & 0x7fff,
|
||||
0xe,
|
||||
0);
|
||||
@ -71,7 +71,7 @@ TILE_GET_INFO_MEMBER(metro_state::metro_k053936_gstrik2_get_tile_info)
|
||||
int code = m_k053936_ram[tile_index];
|
||||
|
||||
SET_TILE_INFO_MEMBER(
|
||||
2,
|
||||
4,
|
||||
(code & 0x7fff)>>2,
|
||||
0xe,
|
||||
0);
|
||||
@ -100,7 +100,6 @@ TILEMAP_MAPPER_MEMBER(metro_state::tilemap_scan_gstrik2)
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
|
||||
Tilemaps: Tiles Set & Window
|
||||
|
||||
Each entry in the Tiles Set RAM uses 2 words to specify a starting
|
||||
@ -116,6 +115,7 @@ TILEMAP_MAPPER_MEMBER(metro_state::tilemap_scan_gstrik2)
|
||||
2.w Code Low Bits
|
||||
|
||||
* 00-ff, but on later chips supporting it, xf means 256 color tile and palette x
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
@ -127,29 +127,29 @@ TILEMAP_MAPPER_MEMBER(metro_state::tilemap_scan_gstrik2)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/* A 2048 x 2048 virtual tilemap */
|
||||
// A 2048 x 2048 virtual tilemap
|
||||
#define BIG_NX (0x100)
|
||||
#define BIG_NY (0x100)
|
||||
|
||||
/* A smaller 512 x 256 window defines the actual tilemap */
|
||||
// A smaller 512 x 256 window defines the actual tilemap
|
||||
|
||||
#define WIN_NX (0x40)
|
||||
#define WIN_NY (0x20)
|
||||
|
||||
// this looks up a single pixel in a tile, given the code
|
||||
// the metro hardware has an indirection table, which is used here
|
||||
// returns if to draw the pixel or not, pixel colour is placed in pix
|
||||
INLINE UINT8 get_tile_pix( running_machine &machine, UINT16 code, UINT8 x, UINT8 y, int big, UINT16* pix )
|
||||
/* This looks up a single pixel in a tile, given the tile code.
|
||||
The Metro hardware has an indirection table, which is used here.
|
||||
Returns if to draw the pixel or not, pixel colour is placed in pix */
|
||||
INLINE UINT8 get_tile_pix( running_machine &machine, UINT16 code, UINT8 x, UINT8 y, int big, UINT16 *pix )
|
||||
{
|
||||
metro_state *state = machine.driver_data<metro_state>();
|
||||
int table_index;
|
||||
UINT32 tile;
|
||||
|
||||
/* Use code as an index into the tiles set table */
|
||||
// Use code as an index into the tiles set table
|
||||
table_index = ((code & 0x1ff0) >> 4) * 2;
|
||||
tile = (state->m_tiletable[table_index + 0] << 16) + state->m_tiletable[table_index + 1];
|
||||
|
||||
if (code & 0x8000) /* Special: draw a tile of a single color (i.e. not from the gfx ROMs) */
|
||||
if (code & 0x8000) // Special: draw a tile of a single color (i.e. not from the gfx ROMs)
|
||||
{
|
||||
*pix = code & 0x0fff;
|
||||
|
||||
@ -157,7 +157,6 @@ INLINE UINT8 get_tile_pix( running_machine &machine, UINT16 code, UINT8 x, UINT8
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
}
|
||||
else if (((tile & 0x00f00000) == 0x00f00000) && (state->m_support_8bpp)) /* draw tile as 8bpp (e.g. balcube bg) */
|
||||
{
|
||||
@ -171,7 +170,7 @@ INLINE UINT8 get_tile_pix( running_machine &machine, UINT16 code, UINT8 x, UINT8
|
||||
data = gfx1->get_data(tile2);
|
||||
else
|
||||
{
|
||||
*pix |= 0;
|
||||
*pix = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -190,7 +189,6 @@ INLINE UINT8 get_tile_pix( running_machine &machine, UINT16 code, UINT8 x, UINT8
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -204,7 +202,7 @@ INLINE UINT8 get_tile_pix( running_machine &machine, UINT16 code, UINT8 x, UINT8
|
||||
data = gfx1->get_data(tile2);
|
||||
else
|
||||
{
|
||||
*pix |= 0;
|
||||
*pix = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -241,7 +239,6 @@ WRITE16_MEMBER(metro_state::metro_vram_2_w){ metro_vram_w(machine(), offset, dat
|
||||
|
||||
|
||||
|
||||
/* Dirty the relevant tilemap when its window changes */
|
||||
WRITE16_MEMBER(metro_state::metro_window_w)
|
||||
{
|
||||
COMBINE_DATA(&m_window[offset]);
|
||||
@ -265,62 +262,64 @@ WRITE16_MEMBER(metro_state::metro_window_w)
|
||||
the tile's sizes to be known at startup - which we don't!
|
||||
*/
|
||||
|
||||
/* Dirty tilemaps when the tiles set changes */
|
||||
|
||||
static void expand_gfx1(metro_state &state)
|
||||
void metro_state::expand_gfx1()
|
||||
{
|
||||
UINT8 *base_gfx = state.machine().root_device().memregion("gfx1")->base();
|
||||
UINT32 length = 2 * state.machine().root_device().memregion("gfx1")->bytes();
|
||||
state.m_expanded_gfx1 = auto_alloc_array(state.machine(), UINT8, length);
|
||||
UINT8 *base_gfx = machine().root_device().memregion("gfx1")->base();
|
||||
UINT32 length = machine().root_device().memregion("gfx1")->bytes() * 2;
|
||||
|
||||
m_expanded_gfx1 = auto_alloc_array(machine(), UINT8, length);
|
||||
|
||||
for (int i = 0; i < length; i += 2)
|
||||
{
|
||||
UINT8 src = base_gfx[i / 2];
|
||||
state.m_expanded_gfx1[i+0] = src & 15;
|
||||
state.m_expanded_gfx1[i+1] = src >> 4;
|
||||
|
||||
m_expanded_gfx1[i + 0] = src & 0xf;
|
||||
m_expanded_gfx1[i + 1] = src >> 4;
|
||||
}
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(metro_state,metro_i4100)
|
||||
{
|
||||
expand_gfx1(*this);
|
||||
expand_gfx1();
|
||||
|
||||
m_support_8bpp = 0;
|
||||
m_support_16x16 = 0;
|
||||
m_has_zoom = 0;
|
||||
|
||||
m_bg_tilemap_enable[0] = 1;
|
||||
m_bg_tilemap_enable[1] = 1;
|
||||
m_bg_tilemap_enable[2] = 1;
|
||||
m_tilemap_scrolldx[0] = 0;
|
||||
m_tilemap_scrolldx[1] = 0;
|
||||
m_tilemap_scrolldx[2] = 0;
|
||||
|
||||
m_bg_tilemap_enable16[0] = 0;
|
||||
m_bg_tilemap_enable16[1] = 0;
|
||||
m_bg_tilemap_enable16[2] = 0;
|
||||
|
||||
m_bg_tilemap_scrolldx[0] = 0;
|
||||
m_bg_tilemap_scrolldx[1] = 0;
|
||||
m_bg_tilemap_scrolldx[2] = 0;
|
||||
m_sprite_xoffs_dx = 0;
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(metro_state,metro_i4220)
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(metro_i4100);
|
||||
|
||||
m_support_8bpp = 1;
|
||||
m_support_8bpp = 1; // balcube
|
||||
m_support_16x16 = 1; // vmetal
|
||||
}
|
||||
VIDEO_START_MEMBER(metro_state,metro_i4220_offset)
|
||||
VIDEO_START_MEMBER(metro_state,metro_i4220_dx_tmap)
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(metro_i4220);
|
||||
|
||||
m_bg_tilemap_scrolldx[0] = -2;
|
||||
m_bg_tilemap_scrolldx[1] = -2;
|
||||
m_bg_tilemap_scrolldx[2] = -2;
|
||||
m_tilemap_scrolldx[0] = -2;
|
||||
m_tilemap_scrolldx[1] = -2;
|
||||
m_tilemap_scrolldx[2] = -2;
|
||||
}
|
||||
VIDEO_START_MEMBER(metro_state,metro_i4220_dx_sprite)
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(metro_i4220);
|
||||
|
||||
m_sprite_xoffs_dx = 8;
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(metro_state,metro_i4300)
|
||||
{
|
||||
VIDEO_START_CALL_MEMBER(metro_i4220);
|
||||
|
||||
m_support_16x16 = 1;
|
||||
// any additional feature?
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(metro_state,blzntrnd)
|
||||
@ -331,9 +330,9 @@ VIDEO_START_MEMBER(metro_state,blzntrnd)
|
||||
|
||||
m_k053936_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(metro_state::metro_k053936_get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 512);
|
||||
|
||||
m_bg_tilemap_scrolldx[0] = 8;
|
||||
m_bg_tilemap_scrolldx[1] = 8;
|
||||
m_bg_tilemap_scrolldx[2] = 8;
|
||||
m_tilemap_scrolldx[0] = 8;
|
||||
m_tilemap_scrolldx[1] = 8;
|
||||
m_tilemap_scrolldx[2] = 8;
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(metro_state,gstrik2)
|
||||
@ -344,9 +343,9 @@ VIDEO_START_MEMBER(metro_state,gstrik2)
|
||||
|
||||
m_k053936_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(metro_state::metro_k053936_gstrik2_get_tile_info),this), tilemap_mapper_delegate(FUNC(metro_state::tilemap_scan_gstrik2),this), 16, 16, 128, 256);
|
||||
|
||||
m_bg_tilemap_scrolldx[0] = 8;
|
||||
m_bg_tilemap_scrolldx[1] = 0;
|
||||
m_bg_tilemap_scrolldx[2] = 8;
|
||||
m_tilemap_scrolldx[0] = 8;
|
||||
m_tilemap_scrolldx[1] = 0;
|
||||
m_tilemap_scrolldx[2] = 8;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
@ -409,8 +408,6 @@ VIDEO_START_MEMBER(metro_state,gstrik2)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/* Draw sprites */
|
||||
|
||||
void metro_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
|
||||
{
|
||||
metro_state *state = machine.driver_data<metro_state>();
|
||||
@ -450,7 +447,7 @@ void metro_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const r
|
||||
{
|
||||
int x, y, attr, code, color, flipx, flipy, zoom, curr_pri, width, height;
|
||||
|
||||
/* Exponential zoom table extracted from daitoride */
|
||||
// Exponential zoom table extracted from daitoride
|
||||
static const int zoomtable[0x40] =
|
||||
{ 0xAAC,0x800,0x668,0x554,0x494,0x400,0x390,0x334,
|
||||
0x2E8,0x2AC,0x278,0x248,0x224,0x200,0x1E0,0x1C8,
|
||||
@ -556,50 +553,32 @@ void metro_draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const r
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
/* copy a 'window' from the large 2048x2048 (or 4096x4096 for 16x16 tiles) tilemap */
|
||||
|
||||
// Copy a 'window' from the large 2048x2048 (or 4096x4096 for 16x16 tiles) tilemap
|
||||
|
||||
static void draw_tilemap( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32 flags, UINT32 pcode,
|
||||
int sx, int sy, int wx, int wy, int big, UINT16* tilemapram, int layer )
|
||||
int sx, int sy, int wx, int wy, int big, UINT16 *tilemapram, int layer )
|
||||
{
|
||||
metro_state *state = machine.driver_data<metro_state>();
|
||||
int y;
|
||||
|
||||
bitmap_ind8 &priority_bitmap = machine.priority_bitmap;
|
||||
|
||||
int width = big ? 4096 : 2048;//pixdata->width;
|
||||
int height = big ? 4096 : 2048;//pixdata->height;
|
||||
int width = big ? 4096 : 2048;
|
||||
int height = big ? 4096 : 2048;
|
||||
|
||||
int scrwidth = bitmap.width();
|
||||
int scrwidth = bitmap.width();
|
||||
int scrheight = bitmap.height();
|
||||
|
||||
int windowwidth = width >> 2;
|
||||
int windowwidth = width >> 2;
|
||||
int windowheight = height >> 3;
|
||||
|
||||
if (!big)
|
||||
{
|
||||
if (!state->m_bg_tilemap_enable[layer]) return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!state->m_bg_tilemap_enable16[layer]) return;
|
||||
}
|
||||
sx += state->m_tilemap_scrolldx[layer] * (state->m_flip_screen ? 1 : -1);
|
||||
|
||||
|
||||
if (!state->m_flip_screen)
|
||||
{
|
||||
sx -= state->m_bg_tilemap_scrolldx[layer];
|
||||
}
|
||||
else
|
||||
{
|
||||
sx += state->m_bg_tilemap_scrolldx[layer];
|
||||
}
|
||||
|
||||
for (y=0;y<scrheight;y++)
|
||||
for (y = 0; y < scrheight; y++)
|
||||
{
|
||||
int scrolly = (sy+y-wy)&(windowheight-1);
|
||||
int x;
|
||||
UINT16* dst;
|
||||
UINT16 *dst;
|
||||
UINT8 *priority_baseaddr;
|
||||
int srcline = (wy+scrolly)&(height-1);
|
||||
int srctilerow = srcline >> (big ? 4 : 3);
|
||||
@ -609,7 +588,7 @@ static void draw_tilemap( running_machine &machine, bitmap_ind16 &bitmap, const
|
||||
dst = &bitmap.pix16(y);
|
||||
priority_baseaddr = &priority_bitmap.pix8(y);
|
||||
|
||||
for (x=0;x<scrwidth;x++)
|
||||
for (x = 0; x < scrwidth; x++)
|
||||
{
|
||||
int scrollx = (sx+x-wx)&(windowwidth-1);
|
||||
int srccol = (wx+scrollx)&(width-1);
|
||||
@ -633,7 +612,7 @@ static void draw_tilemap( running_machine &machine, bitmap_ind16 &bitmap, const
|
||||
dst = &bitmap.pix16(scrheight-y-1);
|
||||
priority_baseaddr = &priority_bitmap.pix8(scrheight-y-1);
|
||||
|
||||
for (x=0;x<scrwidth;x++)
|
||||
for (x = 0; x < scrwidth; x++)
|
||||
{
|
||||
int scrollx = (sx+x-wx)&(windowwidth-1);
|
||||
int srccol = (wx+scrollx)&(width-1);
|
||||
@ -655,87 +634,70 @@ static void draw_tilemap( running_machine &machine, bitmap_ind16 &bitmap, const
|
||||
}
|
||||
}
|
||||
|
||||
/* Draw all the layers that match the given priority */
|
||||
// Draw all the layers that match the given priority
|
||||
|
||||
static void draw_layers( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, int pri, int layers_ctrl )
|
||||
{
|
||||
metro_state *state = machine.driver_data<metro_state>();
|
||||
UINT16 layers_pri = state->m_videoregs[0x10 / 2];
|
||||
int layer;
|
||||
|
||||
/* Draw all the layers with priority == pri */
|
||||
for (layer = 2; layer >= 0; layer--) // tilemap[2] below?
|
||||
// Draw all the layers with priority == pri
|
||||
for (layer = 2; layer >= 0; layer--)
|
||||
{
|
||||
if (pri == ((layers_pri >> (layer * 2)) & 3))
|
||||
{
|
||||
/* Scroll and Window values */
|
||||
// Scroll and Window values
|
||||
UINT16 sy = state->m_scroll[layer * 2 + 0]; UINT16 sx = state->m_scroll[layer * 2 + 1];
|
||||
UINT16 wy = state->m_window[layer * 2 + 0]; UINT16 wx = state->m_window[layer * 2 + 1];
|
||||
|
||||
if (BIT(layers_ctrl, layer)) // for debug
|
||||
{
|
||||
UINT16* tilemapram = 0;
|
||||
UINT16 *tilemapram = 0;
|
||||
|
||||
if (layer==0) tilemapram = state->m_vram_0;
|
||||
else if (layer==1) tilemapram = state->m_vram_1;
|
||||
else if (layer==2) tilemapram = state->m_vram_2;
|
||||
switch (layer)
|
||||
{
|
||||
case 0: tilemapram = state->m_vram_0; break;
|
||||
case 1: tilemapram = state->m_vram_1; break;
|
||||
case 2: tilemapram = state->m_vram_2; break;
|
||||
}
|
||||
|
||||
draw_tilemap(machine, bitmap, cliprect, 0, 1 << (3 - pri), sx, sy, wx, wy, 0, tilemapram, layer);
|
||||
int big = state->m_support_16x16 && (*state->m_screenctrl & (0x0020 << layer));
|
||||
|
||||
if (state->m_support_16x16)
|
||||
draw_tilemap(machine, bitmap, cliprect, 0, 1 << (3 - pri), sx, sy, wx, wy, 1, tilemapram, layer);
|
||||
draw_tilemap(machine, bitmap, cliprect, 0, 1 << (3 - pri), sx, sy, wx, wy, big, tilemapram, layer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
UINT32 metro_state::screen_update_metro(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
int pri, layers_ctrl = -1;
|
||||
UINT16 screenctrl = *m_screenctrl;
|
||||
|
||||
m_sprite_xoffs = m_videoregs[0x06 / 2] - screen.width() / 2;
|
||||
m_sprite_xoffs = m_videoregs[0x06 / 2] - screen.width() / 2 + m_sprite_xoffs_dx;
|
||||
m_sprite_yoffs = m_videoregs[0x04 / 2] - screen.height() / 2;
|
||||
|
||||
/* The background color is selected by a register */
|
||||
machine().priority_bitmap.fill(0, cliprect);
|
||||
|
||||
// The background color is selected by a register
|
||||
bitmap.fill(m_videoregs[0x12/2] & 0x0fff, cliprect);
|
||||
|
||||
/* Screen Control Register:
|
||||
|
||||
f--- ---- ---- ---- ?
|
||||
-edc b--- ---- ----
|
||||
---- -a98 ---- ---- ? Leds
|
||||
---- ---- 7--- ---- 16x16 Tiles (Layer 2)
|
||||
---- ---- -6-- ---- 16x16 Tiles (Layer 1)
|
||||
---- ---- --5- ---- 16x16 Tiles (Layer 0)
|
||||
---- -a98 ---- ---- ? Leds (see gakusai attract)
|
||||
---- ---- 765- ---- 16x16 Tiles (Layer 2-1-0)
|
||||
---- ---- ---4 32--
|
||||
---- ---- ---- --1- ? Blank Screen
|
||||
---- ---- ---- --1- Blank Screen
|
||||
---- ---- ---- ---0 Flip Screen */
|
||||
if (screenctrl & 2)
|
||||
return 0;
|
||||
|
||||
//flip_screen_set(screenctrl & 1);
|
||||
m_flip_screen = screenctrl & 1;
|
||||
|
||||
/* If the game supports 16x16 tiles, make sure that the
|
||||
16x16 and 8x8 tilemaps of a given layer are not simultaneously
|
||||
enabled! */
|
||||
if (m_support_16x16)
|
||||
{
|
||||
int layer;
|
||||
|
||||
for (layer = 0; layer < 3; layer++)
|
||||
{
|
||||
int big = screenctrl & (0x0020 << layer);
|
||||
|
||||
m_bg_tilemap_enable[layer] = !big;
|
||||
m_bg_tilemap_enable16[layer] = big;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if (machine().input().code_pressed(KEYCODE_Z))
|
||||
{
|
||||
@ -746,11 +708,11 @@ if (machine().input().code_pressed(KEYCODE_Z))
|
||||
if (machine().input().code_pressed(KEYCODE_A)) msk |= 8;
|
||||
if (msk != 0)
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
bitmap.fill(get_black_pen(machine()), cliprect);
|
||||
layers_ctrl &= msk;
|
||||
}
|
||||
|
||||
popmessage("l %x-%x-%x r %04x %04x %04x",
|
||||
popmessage( "lyr: %x-%x-%x spr: %04x clr: %04x scr: %04x",
|
||||
(m_videoregs[0x10/2] & 0x30) >> 4, (m_videoregs[0x10/2] & 0xc) >> 2, m_videoregs[0x10/2] & 3,
|
||||
m_videoregs[0x02/2], m_videoregs[0x12/2],
|
||||
*m_screenctrl);
|
||||
@ -765,5 +727,6 @@ if (machine().input().code_pressed(KEYCODE_Z))
|
||||
|
||||
if (layers_ctrl & 0x08)
|
||||
metro_draw_sprites(machine(), bitmap, cliprect);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user