mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
bagman.c, toobin.c: added / enabled save state support (nw)
This commit is contained in:
parent
1078486922
commit
75ece50e98
@ -63,14 +63,34 @@ DIP locations verified for:
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "sound/tms5110.h"
|
||||
#include "includes/bagman.h"
|
||||
|
||||
|
||||
WRITE8_MEMBER(bagman_state::bagman_ls259_w)
|
||||
void bagman_state::machine_start()
|
||||
{
|
||||
tmsprom_device *tmsprom = machine().device<tmsprom_device>("tmsprom");
|
||||
bagman_pal16r6_w(space, offset,data); /*this is just a simulation*/
|
||||
save_item(NAME(m_irq_mask));
|
||||
save_item(NAME(m_columnvalue));
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(bagman_state, bagman)
|
||||
{
|
||||
bagman_state::machine_start();
|
||||
save_item(NAME(m_ls259_buf));
|
||||
}
|
||||
|
||||
MACHINE_START_MEMBER(bagman_state, squaitsa)
|
||||
{
|
||||
bagman_state::machine_start();
|
||||
save_item(NAME(m_p1_res));
|
||||
save_item(NAME(m_p1_old_val));
|
||||
save_item(NAME(m_p2_res));
|
||||
save_item(NAME(m_p2_old_val));
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(bagman_state::ls259_w)
|
||||
{
|
||||
pal16r6_w(space, offset,data); /*this is just a simulation*/
|
||||
|
||||
if (m_ls259_buf[offset] != (data&1) )
|
||||
{
|
||||
@ -81,22 +101,22 @@ WRITE8_MEMBER(bagman_state::bagman_ls259_w)
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
tmsprom->bit_w(space, 0, 7 - ((m_ls259_buf[0]<<2) | (m_ls259_buf[1]<<1) | (m_ls259_buf[2]<<0)));
|
||||
m_tmsprom->bit_w(space, 0, 7 - ((m_ls259_buf[0]<<2) | (m_ls259_buf[1]<<1) | (m_ls259_buf[2]<<0)));
|
||||
break;
|
||||
case 3:
|
||||
tmsprom->enable_w(m_ls259_buf[offset]);
|
||||
m_tmsprom->enable_w(m_ls259_buf[offset]);
|
||||
break;
|
||||
case 4:
|
||||
tmsprom->rom_csq_w(space, 0, m_ls259_buf[offset]);
|
||||
m_tmsprom->rom_csq_w(space, 0, m_ls259_buf[offset]);
|
||||
break;
|
||||
case 5:
|
||||
tmsprom->rom_csq_w(space, 1, m_ls259_buf[offset]);
|
||||
m_tmsprom->rom_csq_w(space, 1, m_ls259_buf[offset]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bagman_state::bagman_coin_counter_w)
|
||||
WRITE8_MEMBER(bagman_state::coincounter_w)
|
||||
{
|
||||
coin_counter_w(machine(), offset,data);
|
||||
}
|
||||
@ -109,20 +129,20 @@ WRITE8_MEMBER(bagman_state::irq_mask_w)
|
||||
static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, bagman_state )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x6000, 0x67ff) AM_RAM
|
||||
AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(bagman_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x9800, 0x9bff) AM_RAM_WRITE(bagman_colorram_w) AM_SHARE("colorram")
|
||||
AM_RANGE(0x9000, 0x93ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x9800, 0x9bff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
|
||||
AM_RANGE(0x9c00, 0x9fff) AM_WRITENOP /* written to, but unused */
|
||||
AM_RANGE(0xa000, 0xa000) AM_READ(bagman_pal16r6_r)
|
||||
AM_RANGE(0xa000, 0xa000) AM_READ(pal16r6_r)
|
||||
//AM_RANGE(0xa800, 0xa805) AM_READ(bagman_ls259_r) /*just for debugging purposes*/
|
||||
AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_mask_w)
|
||||
AM_RANGE(0xa001, 0xa002) AM_WRITE(bagman_flipscreen_w)
|
||||
AM_RANGE(0xa001, 0xa002) AM_WRITE(flipscreen_w)
|
||||
AM_RANGE(0xa003, 0xa003) AM_WRITEONLY AM_SHARE("video_enable")
|
||||
AM_RANGE(0xc000, 0xffff) AM_ROM /* Super Bagman only */
|
||||
AM_RANGE(0x9800, 0x981f) AM_WRITEONLY AM_SHARE("spriteram") /* hidden portion of color RAM */
|
||||
/* here only to initialize the pointer, */
|
||||
/* writes are handled by bagman_colorram_w */
|
||||
AM_RANGE(0xa800, 0xa805) AM_WRITE(bagman_ls259_w) /* TMS5110 driving state machine */
|
||||
AM_RANGE(0xa004, 0xa004) AM_WRITE(bagman_coin_counter_w)
|
||||
/* writes are handled by colorram_w */
|
||||
AM_RANGE(0xa800, 0xa805) AM_WRITE(ls259_w) /* TMS5110 driving state machine */
|
||||
AM_RANGE(0xa004, 0xa004) AM_WRITE(coincounter_w)
|
||||
AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW")
|
||||
AM_RANGE(0xb800, 0xb800) AM_READNOP /* looks like watchdog from schematics */
|
||||
|
||||
@ -138,16 +158,16 @@ ADDRESS_MAP_END
|
||||
static ADDRESS_MAP_START( pickin_map, AS_PROGRAM, 8, bagman_state )
|
||||
AM_RANGE(0x0000, 0x5fff) AM_ROM
|
||||
AM_RANGE(0x7000, 0x77ff) AM_RAM
|
||||
AM_RANGE(0x8800, 0x8bff) AM_RAM_WRITE(bagman_videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x9800, 0x9bff) AM_RAM_WRITE(bagman_colorram_w) AM_SHARE("colorram")
|
||||
AM_RANGE(0x8800, 0x8bff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x9800, 0x9bff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
|
||||
AM_RANGE(0x9800, 0x981f) AM_WRITEONLY AM_SHARE("spriteram") /* hidden portion of color RAM */
|
||||
/* here only to initialize the pointer, */
|
||||
/* writes are handled by bagman_colorram_w */
|
||||
/* writes are handled by colorram_w */
|
||||
AM_RANGE(0x9c00, 0x9fff) AM_WRITENOP /* written to, but unused */
|
||||
AM_RANGE(0xa000, 0xa000) AM_WRITE(irq_mask_w)
|
||||
AM_RANGE(0xa001, 0xa002) AM_WRITE(bagman_flipscreen_w)
|
||||
AM_RANGE(0xa001, 0xa002) AM_WRITE(flipscreen_w)
|
||||
AM_RANGE(0xa003, 0xa003) AM_WRITEONLY AM_SHARE("video_enable")
|
||||
AM_RANGE(0xa004, 0xa004) AM_WRITE(bagman_coin_counter_w)
|
||||
AM_RANGE(0xa004, 0xa004) AM_WRITE(coincounter_w)
|
||||
AM_RANGE(0xa800, 0xa800) AM_READ_PORT("DSW")
|
||||
|
||||
|
||||
@ -389,7 +409,7 @@ GFXDECODE_END
|
||||
|
||||
|
||||
/* squaitsa doesn't map the dial directly, instead it polls the results of the dial through an external circuitry.
|
||||
I don't know if the following is correct, there can possbily be multiple solutions for the same problem. */
|
||||
I don't know if the following is correct, there can possibly be multiple solutions for the same problem. */
|
||||
READ8_MEMBER(bagman_state::dial_input_p1_r)
|
||||
{
|
||||
UINT8 dial_val;
|
||||
@ -445,19 +465,18 @@ static MACHINE_CONFIG_START( bagman, bagman_state )
|
||||
MCFG_CPU_IO_MAP(main_portmap)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", bagman_state, vblank_irq)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman)
|
||||
MCFG_MACHINE_START_OVERRIDE(bagman_state, bagman)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS(BAGMAN_HCLK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update_bagman)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", bagman)
|
||||
MCFG_PALETTE_ADD("palette", 64)
|
||||
|
||||
MCFG_PALETTE_INIT_OWNER(bagman_state,bagman)
|
||||
MCFG_VIDEO_START_OVERRIDE(bagman_state,bagman)
|
||||
|
||||
MCFG_DEVICE_ADD("tmsprom", TMSPROM, 640000 / 2) /* rom clock */
|
||||
MCFG_TMSPROM_REGION("5110ctrl") /* prom memory region - sound region is automatically assigned */
|
||||
@ -495,19 +514,16 @@ static MACHINE_CONFIG_START( pickin, bagman_state )
|
||||
MCFG_CPU_IO_MAP(main_portmap)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", bagman_state, vblank_irq)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS(BAGMAN_HCLK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update_bagman)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", pickin)
|
||||
MCFG_PALETTE_ADD("palette", 64)
|
||||
|
||||
MCFG_PALETTE_INIT_OWNER(bagman_state,bagman)
|
||||
MCFG_VIDEO_START_OVERRIDE(bagman_state,bagman)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
@ -548,20 +564,17 @@ static MACHINE_CONFIG_START( botanic, bagman_state )
|
||||
MCFG_CPU_IO_MAP(main_portmap)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", bagman_state, vblank_irq)
|
||||
|
||||
MCFG_MACHINE_RESET_OVERRIDE(bagman_state,bagman)
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_RAW_PARAMS(BAGMAN_HCLK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update_bagman)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(bagman_state, screen_update)
|
||||
MCFG_SCREEN_PALETTE("palette")
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", bagman)
|
||||
MCFG_PALETTE_ADD("palette", 64)
|
||||
|
||||
MCFG_PALETTE_INIT_OWNER(bagman_state,bagman)
|
||||
MCFG_VIDEO_START_OVERRIDE(bagman_state,bagman)
|
||||
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||
|
||||
@ -575,6 +588,8 @@ static MACHINE_CONFIG_START( botanic, bagman_state )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( squaitsa, botanic )
|
||||
MCFG_MACHINE_START_OVERRIDE(bagman_state, squaitsa)
|
||||
|
||||
MCFG_SOUND_MODIFY("aysnd")
|
||||
MCFG_AY8910_PORT_A_READ_CB(READ8(bagman_state, dial_input_p1_r))
|
||||
MCFG_AY8910_PORT_B_READ_CB(READ8(bagman_state, dial_input_p2_r))
|
||||
@ -976,19 +991,19 @@ DRIVER_INIT_MEMBER(bagman_state,bagman)
|
||||
}
|
||||
|
||||
|
||||
GAME( 1982, bagman, 0, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Bagman", 0 )
|
||||
GAME( 1982, bagnard, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Le Bagnard (set 1)", 0 )
|
||||
GAME( 1982, bagnarda, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Le Bagnard (set 2)", 0 )
|
||||
GAME( 1982, bagnardi, bagman, bagman, bagman, bagman_state, bagman, ROT90, "Valadon Automation (Itisa license)", "Le Bagnard (Itisa, Spain)", 0 )
|
||||
GAME( 1982, bagmans, bagman, bagman, bagmans, bagman_state, bagman, ROT270, "Valadon Automation (Stern Electronics license)", "Bagman (Stern Electronics, set 1)", 0 )
|
||||
GAME( 1982, bagmans2, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation (Stern Electronics license)", "Bagman (Stern Electronics, set 2)", 0 )
|
||||
GAME( 1982, bagman, 0, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Bagman", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, bagnard, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Le Bagnard (set 1)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, bagnarda, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation", "Le Bagnard (set 2)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, bagnardi, bagman, bagman, bagman, bagman_state, bagman, ROT90, "Valadon Automation (Itisa license)", "Le Bagnard (Itisa, Spain)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, bagmans, bagman, bagman, bagmans, bagman_state, bagman, ROT270, "Valadon Automation (Stern Electronics license)", "Bagman (Stern Electronics, set 1)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1982, bagmans2, bagman, bagman, bagman, bagman_state, bagman, ROT270, "Valadon Automation (Stern Electronics license)", "Bagman (Stern Electronics, set 2)", GAME_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1984, sbagman, 0, bagman, sbagman, driver_device, 0, ROT270, "Valadon Automation", "Super Bagman", 0 )
|
||||
GAME( 1984, sbagmans, sbagman, bagman, sbagman, driver_device, 0, ROT270, "Valadon Automation (Stern Electronics license)", "Super Bagman (Stern Electronics)", 0 )
|
||||
GAME( 1984, sbagman, 0, bagman, sbagman, driver_device, 0, ROT270, "Valadon Automation", "Super Bagman", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1984, sbagmans, sbagman, bagman, sbagman, driver_device, 0, ROT270, "Valadon Automation (Stern Electronics license)", "Super Bagman (Stern Electronics)", GAME_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1983, pickin, 0, pickin, pickin, driver_device, 0, ROT270, "Valadon Automation", "Pickin'", 0 )
|
||||
GAME( 1983, pickin, 0, pickin, pickin, driver_device, 0, ROT270, "Valadon Automation", "Pickin'", GAME_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1983, botanic, 0, botanic, botanici,driver_device, 0, ROT90, "Itisa", "Botanic (English / Spanish)", 0 )
|
||||
GAME( 1984, botanicf, botanic, botanic, botanicf,driver_device, 0, ROT270, "Itisa (Valadon Automation license)", "Botanic (French)", 0 )
|
||||
GAME( 1983, botanic, 0, botanic, botanici,driver_device, 0, ROT90, "Itisa", "Botanic (English / Spanish)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1984, botanicf, botanic, botanic, botanicf,driver_device, 0, ROT270, "Itisa (Valadon Automation license)", "Botanic (French)", GAME_SUPPORTS_SAVE )
|
||||
|
||||
GAME( 1984, squaitsa, 0, squaitsa,squaitsa, driver_device,0, ROT0, "Itisa", "Squash (Itisa)", 0 )
|
||||
GAME( 1984, squaitsa, 0, squaitsa,squaitsa, driver_device,0, ROT0, "Itisa", "Squash (Itisa)", GAME_SUPPORTS_SAVE )
|
||||
|
@ -84,18 +84,18 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, toobin_state )
|
||||
AM_RANGE(0xc00000, 0xc07fff) AM_RAM_DEVWRITE("playfield", tilemap_device, write) AM_SHARE("playfield")
|
||||
AM_RANGE(0xc08000, 0xc097ff) AM_MIRROR(0x046000) AM_RAM_DEVWRITE("alpha", tilemap_device, write) AM_SHARE("alpha")
|
||||
AM_RANGE(0xc09800, 0xc09fff) AM_MIRROR(0x046000) AM_RAM AM_SHARE("mob")
|
||||
AM_RANGE(0xc10000, 0xc107ff) AM_MIRROR(0x047800) AM_RAM_WRITE(toobin_paletteram_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0xc10000, 0xc107ff) AM_MIRROR(0x047800) AM_RAM_WRITE(paletteram_w) AM_SHARE("paletteram")
|
||||
AM_RANGE(0xff6000, 0xff6001) AM_READNOP /* who knows? read at controls time */
|
||||
AM_RANGE(0xff8000, 0xff8001) AM_MIRROR(0x4500fe) AM_WRITE(watchdog_reset16_w)
|
||||
AM_RANGE(0xff8100, 0xff8101) AM_MIRROR(0x4500fe) AM_DEVWRITE8("jsa", atari_jsa_i_device, main_command_w, 0x00ff)
|
||||
AM_RANGE(0xff8300, 0xff8301) AM_MIRROR(0x45003e) AM_WRITE(toobin_intensity_w)
|
||||
AM_RANGE(0xff8300, 0xff8301) AM_MIRROR(0x45003e) AM_WRITE(intensity_w)
|
||||
AM_RANGE(0xff8340, 0xff8341) AM_MIRROR(0x45003e) AM_WRITE(interrupt_scan_w) AM_SHARE("interrupt_scan")
|
||||
AM_RANGE(0xff8380, 0xff8381) AM_MIRROR(0x45003e) AM_RAM_WRITE(toobin_slip_w) AM_SHARE("mob:slip")
|
||||
AM_RANGE(0xff8380, 0xff8381) AM_MIRROR(0x45003e) AM_RAM_WRITE(slip_w) AM_SHARE("mob:slip")
|
||||
AM_RANGE(0xff83c0, 0xff83c1) AM_MIRROR(0x45003e) AM_WRITE(scanline_int_ack_w)
|
||||
AM_RANGE(0xff8400, 0xff8401) AM_MIRROR(0x4500fe) AM_DEVWRITE("jsa", atari_jsa_i_device, sound_reset_w)
|
||||
AM_RANGE(0xff8500, 0xff8501) AM_MIRROR(0x4500fe) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write)
|
||||
AM_RANGE(0xff8600, 0xff8601) AM_MIRROR(0x4500fe) AM_WRITE(toobin_xscroll_w) AM_SHARE("xscroll")
|
||||
AM_RANGE(0xff8700, 0xff8701) AM_MIRROR(0x4500fe) AM_WRITE(toobin_yscroll_w) AM_SHARE("yscroll")
|
||||
AM_RANGE(0xff8600, 0xff8601) AM_MIRROR(0x4500fe) AM_WRITE(xscroll_w) AM_SHARE("xscroll")
|
||||
AM_RANGE(0xff8700, 0xff8701) AM_MIRROR(0x4500fe) AM_WRITE(yscroll_w) AM_SHARE("yscroll")
|
||||
AM_RANGE(0xff8800, 0xff8801) AM_MIRROR(0x4507fe) AM_READ_PORT("FF8800")
|
||||
AM_RANGE(0xff9000, 0xff9001) AM_MIRROR(0x4507fe) AM_READ_PORT("FF9000")
|
||||
AM_RANGE(0xff9800, 0xff9801) AM_MIRROR(0x4507fe) AM_DEVREAD8("jsa", atari_jsa_i_device, main_response_r, 0x00ff)
|
||||
@ -214,7 +214,7 @@ static MACHINE_CONFIG_START( toobin, toobin_state )
|
||||
MCFG_SCREEN_ADD("screen", RASTER)
|
||||
MCFG_SCREEN_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK)
|
||||
MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 640, 0, 512, 416, 0, 384)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(toobin_state, screen_update_toobin)
|
||||
MCFG_SCREEN_UPDATE_DRIVER(toobin_state, screen_update)
|
||||
|
||||
MCFG_GFXDECODE_ADD("gfxdecode", "palette", toobin)
|
||||
MCFG_PALETTE_ADD("palette", 1024)
|
||||
@ -575,28 +575,15 @@ ROM_START( toobin1 )
|
||||
ROM_END
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Driver initialization
|
||||
*
|
||||
*************************************/
|
||||
|
||||
DRIVER_INIT_MEMBER(toobin_state,toobin)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
*
|
||||
* Game driver(s)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
GAME( 1988, toobin, 0, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (rev 3)", 0 )
|
||||
GAME( 1988, toobine, toobin, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (Europe, rev 3)", 0 )
|
||||
GAME( 1988, toobing, toobin, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (German, rev 3)", 0 )
|
||||
GAME( 1988, toobin2, toobin, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (rev 2)", 0 )
|
||||
GAME( 1988, toobin2e, toobin, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (Europe, rev 2)", 0 )
|
||||
GAME( 1988, toobin1, toobin, toobin, toobin, toobin_state, toobin, ROT270, "Atari Games", "Toobin' (rev 1)", 0 )
|
||||
GAME( 1988, toobin, 0, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (rev 3)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1988, toobine, toobin, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (Europe, rev 3)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1988, toobing, toobin, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (German, rev 3)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1988, toobin2, toobin, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (rev 2)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1988, toobin2e, toobin, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (Europe, rev 2)", GAME_SUPPORTS_SAVE )
|
||||
GAME( 1988, toobin1, toobin, toobin, toobin, driver_device, 0, ROT270, "Atari Games", "Toobin' (rev 1)", GAME_SUPPORTS_SAVE )
|
||||
|
@ -1,25 +1,35 @@
|
||||
#include "sound/tms5110.h"
|
||||
|
||||
class bagman_state : public driver_device
|
||||
{
|
||||
public:
|
||||
bagman_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette"),
|
||||
m_tmsprom(*this, "tmsprom"),
|
||||
m_videoram(*this, "videoram"),
|
||||
m_colorram(*this, "colorram"),
|
||||
m_video_enable(*this, "video_enable"),
|
||||
m_spriteram(*this, "spriteram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
m_palette(*this, "palette") { }
|
||||
m_spriteram(*this, "spriteram") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
optional_device<tmsprom_device> m_tmsprom;
|
||||
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
required_shared_ptr<UINT8> m_colorram;
|
||||
required_shared_ptr<UINT8> m_video_enable;
|
||||
required_shared_ptr<UINT8> m_spriteram;
|
||||
|
||||
UINT8 m_irq_mask;
|
||||
UINT8 m_ls259_buf[8];
|
||||
UINT8 m_p1_res;
|
||||
UINT8 m_p1_old_val;
|
||||
UINT8 m_p2_res;
|
||||
UINT8 m_p2_old_val;
|
||||
required_shared_ptr<UINT8> m_videoram;
|
||||
required_shared_ptr<UINT8> m_colorram;
|
||||
required_shared_ptr<UINT8> m_video_enable;
|
||||
|
||||
/*table holds outputs of all ANDs (after AND map)*/
|
||||
UINT8 m_andmap[64];
|
||||
@ -31,31 +41,38 @@ public:
|
||||
UINT8 m_outvalue[8];
|
||||
|
||||
tilemap_t *m_bg_tilemap;
|
||||
required_shared_ptr<UINT8> m_spriteram;
|
||||
|
||||
UINT8 m_irq_mask;
|
||||
DECLARE_WRITE8_MEMBER(bagman_coin_counter_w);
|
||||
// common
|
||||
DECLARE_WRITE8_MEMBER(coincounter_w);
|
||||
DECLARE_WRITE8_MEMBER(irq_mask_w);
|
||||
DECLARE_WRITE8_MEMBER(bagman_pal16r6_w);
|
||||
DECLARE_READ8_MEMBER(bagman_pal16r6_r);
|
||||
void update_pal();
|
||||
DECLARE_WRITE8_MEMBER(bagman_videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(bagman_colorram_w);
|
||||
DECLARE_WRITE8_MEMBER(bagman_flipscreen_w);
|
||||
DECLARE_WRITE8_MEMBER(bagman_ls259_w);
|
||||
DECLARE_WRITE8_MEMBER(videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(colorram_w);
|
||||
DECLARE_WRITE8_MEMBER(flipscreen_w);
|
||||
|
||||
// bagman
|
||||
DECLARE_WRITE8_MEMBER(ls259_w);
|
||||
DECLARE_WRITE8_MEMBER(pal16r6_w);
|
||||
DECLARE_READ8_MEMBER(pal16r6_r);
|
||||
|
||||
// squaitsa
|
||||
DECLARE_READ8_MEMBER(dial_input_p1_r);
|
||||
DECLARE_READ8_MEMBER(dial_input_p2_r);
|
||||
DECLARE_DRIVER_INIT(bagman);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
DECLARE_MACHINE_RESET(bagman);
|
||||
DECLARE_VIDEO_START(bagman);
|
||||
|
||||
virtual void machine_start();
|
||||
DECLARE_MACHINE_START(bagman);
|
||||
DECLARE_MACHINE_START(squaitsa);
|
||||
virtual void machine_reset();
|
||||
virtual void video_start();
|
||||
DECLARE_PALETTE_INIT(bagman);
|
||||
UINT32 screen_update_bagman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_DRIVER_INIT(bagman);
|
||||
|
||||
INTERRUPT_GEN_MEMBER(vblank_irq);
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
required_device<palette_device> m_palette;
|
||||
void update_pal();
|
||||
};
|
||||
|
||||
/*----------- timings -----------*/
|
||||
|
@ -22,7 +22,6 @@ public:
|
||||
m_interrupt_scan(*this, "interrupt_scan") { }
|
||||
|
||||
required_device<atari_jsa_i_device> m_jsa;
|
||||
|
||||
required_device<tilemap_device> m_playfield_tilemap;
|
||||
required_device<tilemap_device> m_alpha_tilemap;
|
||||
required_device<atari_motion_objects_device> m_mob;
|
||||
@ -31,20 +30,24 @@ public:
|
||||
|
||||
double m_brightness;
|
||||
bitmap_ind16 m_pfbitmap;
|
||||
|
||||
virtual void update_interrupts();
|
||||
|
||||
DECLARE_WRITE16_MEMBER(interrupt_scan_w);
|
||||
DECLARE_DRIVER_INIT(toobin);
|
||||
DECLARE_WRITE16_MEMBER(paletteram_w);
|
||||
DECLARE_WRITE16_MEMBER(intensity_w);
|
||||
DECLARE_WRITE16_MEMBER(xscroll_w);
|
||||
DECLARE_WRITE16_MEMBER(yscroll_w);
|
||||
DECLARE_WRITE16_MEMBER(slip_w);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_alpha_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_playfield_tile_info);
|
||||
|
||||
DECLARE_MACHINE_START(toobin);
|
||||
DECLARE_MACHINE_RESET(toobin);
|
||||
DECLARE_VIDEO_START(toobin);
|
||||
UINT32 screen_update_toobin(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_WRITE16_MEMBER( toobin_paletteram_w );
|
||||
DECLARE_WRITE16_MEMBER( toobin_intensity_w );
|
||||
DECLARE_WRITE16_MEMBER( toobin_xscroll_w );
|
||||
DECLARE_WRITE16_MEMBER( toobin_yscroll_w );
|
||||
DECLARE_WRITE16_MEMBER( toobin_slip_w );
|
||||
|
||||
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
|
||||
|
||||
static const atari_motion_objects_config s_mob_config;
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
|
||||
machine.c
|
||||
bagman.c
|
||||
|
||||
Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
|
||||
I/O ports)
|
||||
@ -199,7 +199,7 @@ UINT8 row, column, val;
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(bagman_state::bagman_pal16r6_w)
|
||||
WRITE8_MEMBER(bagman_state::pal16r6_w)
|
||||
{
|
||||
UINT8 line;
|
||||
|
||||
@ -208,21 +208,21 @@ UINT8 line;
|
||||
m_columnvalue[line + 1] = 1 - (data & 1);
|
||||
}
|
||||
|
||||
MACHINE_RESET_MEMBER(bagman_state,bagman)
|
||||
void bagman_state::machine_reset()
|
||||
{
|
||||
address_space &space = m_maincpu->space(AS_PROGRAM);
|
||||
bagman_pal16r6_w(space, 0, 1); /*pin 2*/
|
||||
bagman_pal16r6_w(space, 1, 1); /*pin 3*/
|
||||
bagman_pal16r6_w(space, 2, 1); /*pin 4*/
|
||||
bagman_pal16r6_w(space, 3, 1); /*pin 5*/
|
||||
bagman_pal16r6_w(space, 4, 1); /*pin 6*/
|
||||
bagman_pal16r6_w(space, 5, 1); /*pin 7*/
|
||||
bagman_pal16r6_w(space, 6, 1); /*pin 8*/
|
||||
bagman_pal16r6_w(space, 7, 1); /*pin 9*/
|
||||
pal16r6_w(space, 0, 1); /*pin 2*/
|
||||
pal16r6_w(space, 1, 1); /*pin 3*/
|
||||
pal16r6_w(space, 2, 1); /*pin 4*/
|
||||
pal16r6_w(space, 3, 1); /*pin 5*/
|
||||
pal16r6_w(space, 4, 1); /*pin 6*/
|
||||
pal16r6_w(space, 5, 1); /*pin 7*/
|
||||
pal16r6_w(space, 6, 1); /*pin 8*/
|
||||
pal16r6_w(space, 7, 1); /*pin 9*/
|
||||
update_pal();
|
||||
}
|
||||
|
||||
READ8_MEMBER(bagman_state::bagman_pal16r6_r)
|
||||
READ8_MEMBER(bagman_state::pal16r6_r)
|
||||
{
|
||||
update_pal();
|
||||
return (m_outvalue[6]) + (m_outvalue[5] << 1) + (m_outvalue[4] << 2) +
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
|
||||
video.c
|
||||
bagman.c
|
||||
|
||||
Functions to emulate the video hardware of the machine.
|
||||
|
||||
@ -11,13 +11,13 @@
|
||||
#include "includes/bagman.h"
|
||||
|
||||
|
||||
WRITE8_MEMBER(bagman_state::bagman_videoram_w)
|
||||
WRITE8_MEMBER(bagman_state::videoram_w)
|
||||
{
|
||||
m_videoram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bagman_state::bagman_colorram_w)
|
||||
WRITE8_MEMBER(bagman_state::colorram_w)
|
||||
{
|
||||
m_colorram[offset] = data;
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
@ -80,7 +80,7 @@ PALETTE_INIT_MEMBER(bagman_state,bagman)
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bagman_state::bagman_flipscreen_w)
|
||||
WRITE8_MEMBER(bagman_state::flipscreen_w)
|
||||
{
|
||||
flip_screen_set(data & 0x01);
|
||||
}
|
||||
@ -94,7 +94,7 @@ TILE_GET_INFO_MEMBER(bagman_state::get_bg_tile_info)
|
||||
SET_TILE_INFO_MEMBER(gfxbank, code, color, 0);
|
||||
}
|
||||
|
||||
VIDEO_START_MEMBER(bagman_state,bagman)
|
||||
void bagman_state::video_start()
|
||||
{
|
||||
m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(bagman_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS,
|
||||
8, 8, 32, 32);
|
||||
@ -103,17 +103,14 @@ VIDEO_START_MEMBER(bagman_state,bagman)
|
||||
|
||||
void bagman_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
UINT8 *spriteram = m_spriteram;
|
||||
int offs;
|
||||
|
||||
for (offs = m_spriteram.bytes() - 4;offs >= 0;offs -= 4)
|
||||
for (int offs = m_spriteram.bytes() - 4;offs >= 0;offs -= 4)
|
||||
{
|
||||
int sx,sy,flipx,flipy;
|
||||
|
||||
sx = spriteram[offs + 3];
|
||||
sy = 256 - spriteram[offs + 2] - 16;
|
||||
flipx = spriteram[offs] & 0x40;
|
||||
flipy = spriteram[offs] & 0x80;
|
||||
sx = m_spriteram[offs + 3];
|
||||
sy = 256 - m_spriteram[offs + 2] - 16;
|
||||
flipx = m_spriteram[offs] & 0x40;
|
||||
flipy = m_spriteram[offs] & 0x80;
|
||||
if (flip_screen())
|
||||
{
|
||||
sx = 256 - sx - 15;
|
||||
@ -122,17 +119,17 @@ void bagman_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
flipy = !flipy;
|
||||
}
|
||||
|
||||
if (spriteram[offs + 2] && spriteram[offs + 3])
|
||||
if (m_spriteram[offs + 2] && m_spriteram[offs + 3])
|
||||
m_gfxdecode->gfx(1)->transpen(bitmap,
|
||||
cliprect,
|
||||
(spriteram[offs] & 0x3f) + 2 * (spriteram[offs + 1] & 0x20),
|
||||
spriteram[offs + 1] & 0x1f,
|
||||
(m_spriteram[offs] & 0x3f) + 2 * (m_spriteram[offs + 1] & 0x20),
|
||||
m_spriteram[offs + 1] & 0x1f,
|
||||
flipx,flipy,
|
||||
sx,sy,0);
|
||||
}
|
||||
}
|
||||
|
||||
UINT32 bagman_state::screen_update_bagman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
UINT32 bagman_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
bitmap.fill(0, cliprect);
|
||||
if (*m_video_enable == 0)
|
||||
|
@ -94,7 +94,7 @@ VIDEO_START_MEMBER(toobin_state,toobin)
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE16_MEMBER( toobin_state::toobin_paletteram_w )
|
||||
WRITE16_MEMBER( toobin_state::paletteram_w )
|
||||
{
|
||||
int newword;
|
||||
|
||||
@ -119,7 +119,7 @@ WRITE16_MEMBER( toobin_state::toobin_paletteram_w )
|
||||
}
|
||||
|
||||
|
||||
WRITE16_MEMBER( toobin_state::toobin_intensity_w )
|
||||
WRITE16_MEMBER( toobin_state::intensity_w )
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -141,7 +141,7 @@ WRITE16_MEMBER( toobin_state::toobin_intensity_w )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE16_MEMBER( toobin_state::toobin_xscroll_w )
|
||||
WRITE16_MEMBER( toobin_state::xscroll_w )
|
||||
{
|
||||
UINT16 oldscroll = *m_xscroll;
|
||||
UINT16 newscroll = oldscroll;
|
||||
@ -160,7 +160,7 @@ WRITE16_MEMBER( toobin_state::toobin_xscroll_w )
|
||||
}
|
||||
|
||||
|
||||
WRITE16_MEMBER( toobin_state::toobin_yscroll_w )
|
||||
WRITE16_MEMBER( toobin_state::yscroll_w )
|
||||
{
|
||||
UINT16 oldscroll = *m_yscroll;
|
||||
UINT16 newscroll = oldscroll;
|
||||
@ -186,7 +186,7 @@ WRITE16_MEMBER( toobin_state::toobin_yscroll_w )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
WRITE16_MEMBER( toobin_state::toobin_slip_w )
|
||||
WRITE16_MEMBER( toobin_state::slip_w )
|
||||
{
|
||||
UINT16 oldslip = m_mob->slipram(offset);
|
||||
UINT16 newslip = oldslip;
|
||||
@ -208,7 +208,7 @@ WRITE16_MEMBER( toobin_state::toobin_slip_w )
|
||||
*
|
||||
*************************************/
|
||||
|
||||
UINT32 toobin_state::screen_update_toobin(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
UINT32 toobin_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
// start drawing
|
||||
m_mob->draw_async(cliprect);
|
||||
|
Loading…
Reference in New Issue
Block a user