Renamed decodev->deco16ic [Fabio Priuli]

Added driver data class to funkyjet.c [Fabio Priuli]

Added driver data class and save states to vaportra.c and tumbleb.c [Fabio Priuli]
This commit is contained in:
Fabio Priuli 2010-02-25 16:21:27 +00:00
parent fe97b6f9b2
commit ef97820c1b
42 changed files with 1540 additions and 1196 deletions

6
.gitattributes vendored
View File

@ -2520,6 +2520,7 @@ src/mame/includes/freekick.h svneol=native#text/plain
src/mame/includes/fromanc2.h svneol=native#text/plain
src/mame/includes/fromance.h svneol=native#text/plain
src/mame/includes/funkybee.h svneol=native#text/plain
src/mame/includes/funkyjet.h svneol=native#text/plain
src/mame/includes/funybubl.h svneol=native#text/plain
src/mame/includes/fuukifg2.h svneol=native#text/plain
src/mame/includes/fuukifg3.h svneol=native#text/plain
@ -2835,6 +2836,7 @@ src/mame/includes/tx1.h svneol=native#text/plain
src/mame/includes/ultraman.h svneol=native#text/plain
src/mame/includes/ultratnk.h svneol=native#text/plain
src/mame/includes/unico.h svneol=native#text/plain
src/mame/includes/vaportra.h svneol=native#text/plain
src/mame/includes/vastar.h svneol=native#text/plain
src/mame/includes/vball.h svneol=native#text/plain
src/mame/includes/vendetta.h svneol=native#text/plain
@ -3352,11 +3354,11 @@ src/mame/video/ddribble.c svneol=native#text/plain
src/mame/video/deadang.c svneol=native#text/plain
src/mame/video/dec0.c svneol=native#text/plain
src/mame/video/dec8.c svneol=native#text/plain
src/mame/video/deco16ic.c svneol=native#text/plain
src/mame/video/deco16ic.h svneol=native#text/plain
src/mame/video/deco32.c svneol=native#text/plain
src/mame/video/deco_mlc.c svneol=native#text/plain
src/mame/video/decocass.c svneol=native#text/plain
src/mame/video/decodev.c svneol=native#text/plain
src/mame/video/decodev.h svneol=native#text/plain
src/mame/video/deniam.c svneol=native#text/plain
src/mame/video/dietgo.c svneol=native#text/plain
src/mame/video/digdug.c svneol=native#text/plain

View File

@ -17,7 +17,7 @@
#include "sound/okim6295.h"
#include "sound/ymz280b.h"
#include "cpu/arm/arm.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "rendlay.h"
static UINT16 *backfire_pf1_rowscroll,*backfire_pf2_rowscroll;
@ -142,8 +142,8 @@ static VIDEO_UPDATE( backfire )
/* screen 1 uses pf1 as the forground and pf3 as the background */
/* screen 2 uses pf2 as the foreground and pf4 as the background */
decodev_pf12_update(deco16ic, backfire_pf1_rowscroll, backfire_pf2_rowscroll);
decodev_pf34_update(deco16ic, backfire_pf3_rowscroll, backfire_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, backfire_pf1_rowscroll, backfire_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, backfire_pf3_rowscroll, backfire_pf4_rowscroll);
if (screen == left_screen)
{
@ -153,14 +153,14 @@ static VIDEO_UPDATE( backfire )
if (backfire_left_priority[0] == 0)
{
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 1);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 1);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 2);
draw_sprites(screen->machine, bitmap, cliprect, backfire_spriteram32_1, 3);
}
else if (backfire_left_priority[0] == 2)
{
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 4);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 4);
draw_sprites(screen->machine, bitmap, cliprect, backfire_spriteram32_1, 3);
}
else
@ -173,14 +173,14 @@ static VIDEO_UPDATE( backfire )
if (backfire_right_priority[0] == 0)
{
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, 0, 1);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, 0, 1);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
draw_sprites(screen->machine, bitmap, cliprect, backfire_spriteram32_2, 4);
}
else if (backfire_right_priority[0] == 2)
{
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, 0, 4);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, 0, 4);
draw_sprites(screen->machine, bitmap, cliprect, backfire_spriteram32_2, 4);
}
else
@ -264,14 +264,14 @@ READ32_HANDLER( backfire_wheel2_r )
static ADDRESS_MAP_START( backfire_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x100000, 0x10001f) AM_DEVREADWRITE("deco_custom", decodev_pf12_control_dword_r, decodev_pf12_control_dword_w)
AM_RANGE(0x110000, 0x111fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x114000, 0x115fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_dword_r, decodev_pf2_data_dword_w)
AM_RANGE(0x100000, 0x10001f) AM_DEVREADWRITE("deco_custom", deco16ic_pf12_control_dword_r, deco16ic_pf12_control_dword_w)
AM_RANGE(0x110000, 0x111fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x114000, 0x115fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_dword_r, deco16ic_pf2_data_dword_w)
AM_RANGE(0x120000, 0x120fff) AM_READWRITE(backfire_pf1_rowscroll_r, backfire_pf1_rowscroll_w)
AM_RANGE(0x124000, 0x124fff) AM_READWRITE(backfire_pf2_rowscroll_r, backfire_pf2_rowscroll_w)
AM_RANGE(0x130000, 0x13001f) AM_DEVREADWRITE("deco_custom", decodev_pf34_control_dword_r, decodev_pf34_control_dword_w)
AM_RANGE(0x140000, 0x141fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_dword_r, decodev_pf3_data_dword_w)
AM_RANGE(0x144000, 0x145fff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_dword_r, decodev_pf4_data_dword_w)
AM_RANGE(0x130000, 0x13001f) AM_DEVREADWRITE("deco_custom", deco16ic_pf34_control_dword_r, deco16ic_pf34_control_dword_w)
AM_RANGE(0x140000, 0x141fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_dword_r, deco16ic_pf3_data_dword_w)
AM_RANGE(0x144000, 0x145fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_dword_r, deco16ic_pf4_data_dword_w)
AM_RANGE(0x150000, 0x150fff) AM_READWRITE(backfire_pf3_rowscroll_r, backfire_pf3_rowscroll_w)
AM_RANGE(0x154000, 0x154fff) AM_READWRITE(backfire_pf4_rowscroll_r, backfire_pf4_rowscroll_w)
AM_RANGE(0x160000, 0x161fff) AM_WRITE(backfire_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)

View File

@ -82,7 +82,7 @@
#include "cpu/m68000/m68000.h"
#include "cpu/h6280/h6280.h"
#include "includes/decocrpt.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "includes/decoprot.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
@ -98,7 +98,7 @@ static ADDRESS_MAP_START( boogwing_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x200000, 0x20ffff) AM_RAM
AM_RANGE(0x220000, 0x220001) AM_DEVWRITE("deco_custom", decodev_priority_w)
AM_RANGE(0x220000, 0x220001) AM_DEVWRITE("deco_custom", deco16ic_priority_w)
AM_RANGE(0x220002, 0x22000f) AM_NOP
AM_RANGE(0x240000, 0x240001) AM_WRITE(buffer_spriteram16_w)
@ -111,22 +111,22 @@ static ADDRESS_MAP_START( boogwing_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x24e344, 0x24e345) AM_READ_PORT("INPUTS")
AM_RANGE(0x24e000, 0x24e7ff) AM_WRITE(deco16_104_prot_w) AM_BASE(&deco16_prot_ram)
AM_RANGE(0x260000, 0x26000f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x264000, 0x265fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x266000, 0x267fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x260000, 0x26000f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x264000, 0x265fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x266000, 0x267fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x268000, 0x268fff) AM_RAM AM_BASE(&boogwing_pf1_rowscroll)
AM_RANGE(0x26a000, 0x26afff) AM_RAM AM_BASE(&boogwing_pf2_rowscroll)
AM_RANGE(0x270000, 0x27000f) AM_DEVWRITE("deco_custom", decodev_pf34_control_w)
AM_RANGE(0x274000, 0x275fff) AM_RAM_DEVWRITE("deco_custom", decodev_pf3_data_w)
AM_RANGE(0x276000, 0x277fff) AM_RAM_DEVWRITE("deco_custom", decodev_pf4_data_w)
AM_RANGE(0x270000, 0x27000f) AM_DEVWRITE("deco_custom", deco16ic_pf34_control_w)
AM_RANGE(0x274000, 0x275fff) AM_RAM_DEVWRITE("deco_custom", deco16ic_pf3_data_w)
AM_RANGE(0x276000, 0x277fff) AM_RAM_DEVWRITE("deco_custom", deco16ic_pf4_data_w)
AM_RANGE(0x278000, 0x278fff) AM_RAM AM_BASE(&boogwing_pf3_rowscroll)
AM_RANGE(0x27a000, 0x27afff) AM_RAM AM_BASE(&boogwing_pf4_rowscroll)
AM_RANGE(0x280000, 0x28000f) AM_NOP // ?
AM_RANGE(0x282000, 0x282001) AM_NOP // Palette setup?
AM_RANGE(0x282008, 0x282009) AM_DEVWRITE("deco_custom", decodev_palette_dma_w)
AM_RANGE(0x284000, 0x285fff) AM_DEVWRITE("deco_custom", decodev_buffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x282008, 0x282009) AM_DEVWRITE("deco_custom", deco16ic_palette_dma_w)
AM_RANGE(0x284000, 0x285fff) AM_DEVWRITE("deco_custom", deco16ic_buffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x3c0000, 0x3c004f) AM_RAM // ?
ADDRESS_MAP_END

View File

@ -22,7 +22,7 @@
#include "sound/2203intf.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
VIDEO_UPDATE( twocrude );
@ -116,20 +116,20 @@ static ADDRESS_MAP_START( twocrude_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x080000, 0x083fff) AM_RAM AM_BASE(&twocrude_ram)
AM_RANGE(0x0a0000, 0x0a1fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x0a2000, 0x0a2fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x0a0000, 0x0a1fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x0a2000, 0x0a2fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x0a4000, 0x0a47ff) AM_RAM AM_BASE(&twocrude_pf1_rowscroll)
AM_RANGE(0x0a6000, 0x0a67ff) AM_RAM AM_BASE(&twocrude_pf2_rowscroll)
AM_RANGE(0x0a8000, 0x0a8fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x0aa000, 0x0aafff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x0a8000, 0x0a8fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x0aa000, 0x0aafff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x0ac000, 0x0ac7ff) AM_RAM AM_BASE(&twocrude_pf3_rowscroll)
AM_RANGE(0x0ae000, 0x0ae7ff) AM_RAM AM_BASE(&twocrude_pf4_rowscroll)
AM_RANGE(0x0b0000, 0x0b07ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x0b4000, 0x0b4001) AM_WRITENOP
AM_RANGE(0x0b5000, 0x0b500f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x0b6000, 0x0b600f) AM_DEVWRITE("deco_custom", decodev_pf34_control_w)
AM_RANGE(0x0b5000, 0x0b500f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x0b6000, 0x0b600f) AM_DEVWRITE("deco_custom", deco16ic_pf34_control_w)
AM_RANGE(0x0b8000, 0x0b8fff) AM_RAM_WRITE(twocrude_palette_24bit_rg_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x0b9000, 0x0b9fff) AM_RAM_WRITE(twocrude_palette_24bit_b_w) AM_BASE_GENERIC(paletteram2)
AM_RANGE(0x0bc000, 0x0bc00f) AM_READWRITE(twocrude_control_r, twocrude_control_w)

View File

@ -50,7 +50,7 @@ Note about version levels using Mutant Fighter as the example:
#include "sound/2203intf.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
static int cninja_scanline, cninja_irq_mask;
static running_device *raster_irq_timer;
@ -145,7 +145,7 @@ static READ16_HANDLER( robocop2_prot_r )
static WRITE16_HANDLER( deco16_pf12_control_w )
{
running_device *deco16ic = devtag_get_device(space->machine, "deco_custom");
decodev_pf12_control_w(deco16ic, offset, data, mem_mask);
deco16ic_pf12_control_w(deco16ic, offset, data, mem_mask);
video_screen_update_partial(space->machine->primary_screen, video_screen_get_vpos(space->machine->primary_screen));
}
@ -153,7 +153,7 @@ static WRITE16_HANDLER( deco16_pf12_control_w )
static WRITE16_HANDLER( deco16_pf34_control_w )
{
running_device *deco16ic = devtag_get_device(space->machine, "deco_custom");
decodev_pf34_control_w(deco16ic, offset, data, mem_mask);
deco16ic_pf34_control_w(deco16ic, offset, data, mem_mask);
video_screen_update_partial(space->machine->primary_screen, video_screen_get_vpos(space->machine->primary_screen));
}
@ -162,20 +162,20 @@ static ADDRESS_MAP_START( cninja_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0bffff) AM_ROM
AM_RANGE(0x140000, 0x14000f) AM_WRITE(deco16_pf12_control_w)
AM_RANGE(0x144000, 0x144fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x146000, 0x146fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x144000, 0x144fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x146000, 0x146fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x14c000, 0x14c7ff) AM_WRITEONLY AM_BASE(&cninja_pf1_rowscroll)
AM_RANGE(0x14e000, 0x14e7ff) AM_RAM AM_BASE(&cninja_pf2_rowscroll)
AM_RANGE(0x150000, 0x15000f) AM_WRITE(deco16_pf34_control_w)
AM_RANGE(0x154000, 0x154fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x156000, 0x156fff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x154000, 0x154fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x156000, 0x156fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x15c000, 0x15c7ff) AM_RAM AM_BASE(&cninja_pf3_rowscroll)
AM_RANGE(0x15e000, 0x15e7ff) AM_RAM AM_BASE(&cninja_pf4_rowscroll)
AM_RANGE(0x184000, 0x187fff) AM_RAM AM_BASE(&cninja_ram)
AM_RANGE(0x190000, 0x190007) AM_READWRITE(cninja_irq_r, cninja_irq_w)
AM_RANGE(0x19c000, 0x19dfff) AM_RAM_DEVWRITE("deco_custom", decodev_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x19c000, 0x19dfff) AM_RAM_DEVWRITE("deco_custom", deco16ic_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x1a4000, 0x1a47ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* Sprites */
AM_RANGE(0x1b4000, 0x1b4001) AM_WRITE(buffer_spriteram16_w) /* DMA flag */
@ -196,14 +196,14 @@ static ADDRESS_MAP_START( cninjabl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x138000, 0x1387ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* bootleg sprite-ram (sprites rewritten here in new format) */
AM_RANGE(0x140000, 0x14000f) AM_WRITE(deco16_pf12_control_w)
AM_RANGE(0x144000, 0x144fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x146000, 0x146fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x144000, 0x144fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x146000, 0x146fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x14c000, 0x14c7ff) AM_WRITEONLY AM_BASE(&cninja_pf1_rowscroll)
AM_RANGE(0x14e000, 0x14e7ff) AM_RAM AM_BASE(&cninja_pf2_rowscroll)
AM_RANGE(0x150000, 0x15000f) AM_WRITE(deco16_pf34_control_w) // not used / incorrect on this
AM_RANGE(0x154000, 0x154fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x156000, 0x156fff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x154000, 0x154fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x156000, 0x156fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x15c000, 0x15c7ff) AM_RAM AM_BASE(&cninja_pf3_rowscroll)
AM_RANGE(0x15e000, 0x15e7ff) AM_RAM AM_BASE(&cninja_pf4_rowscroll)
@ -215,7 +215,7 @@ static ADDRESS_MAP_START( cninjabl_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x180000, 0x187fff) AM_RAM // more ram on bootleg?
AM_RANGE(0x190000, 0x190007) AM_READWRITE(cninja_irq_r, cninja_irq_w)
AM_RANGE(0x19c000, 0x19dfff) AM_RAM_DEVWRITE("deco_custom", decodev_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x19c000, 0x19dfff) AM_RAM_DEVWRITE("deco_custom", deco16ic_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x1b4000, 0x1b4001) AM_WRITE(buffer_spriteram16_w) /* DMA flag */
ADDRESS_MAP_END
@ -224,18 +224,18 @@ static ADDRESS_MAP_START( edrandy_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x140000, 0x14000f) AM_WRITE(deco16_pf12_control_w)
AM_RANGE(0x144000, 0x144fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x146000, 0x146fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x144000, 0x144fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x146000, 0x146fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x14c000, 0x14c7ff) AM_RAM AM_BASE(&cninja_pf1_rowscroll)
AM_RANGE(0x14e000, 0x14e7ff) AM_RAM AM_BASE(&cninja_pf2_rowscroll)
AM_RANGE(0x150000, 0x15000f) AM_WRITE(deco16_pf34_control_w)
AM_RANGE(0x154000, 0x154fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x156000, 0x156fff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x154000, 0x154fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x156000, 0x156fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x15c000, 0x15c7ff) AM_RAM AM_BASE(&cninja_pf3_rowscroll)
AM_RANGE(0x15e000, 0x15e7ff) AM_RAM AM_BASE(&cninja_pf4_rowscroll)
AM_RANGE(0x188000, 0x189fff) AM_RAM_DEVWRITE("deco_custom", decodev_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x188000, 0x189fff) AM_RAM_DEVWRITE("deco_custom", deco16ic_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x194000, 0x197fff) AM_RAM AM_BASE(&cninja_ram) /* Main ram */
AM_RANGE(0x198000, 0x1987ff) AM_READWRITE(deco16_60_prot_r, deco16_60_prot_w) AM_BASE(&deco16_prot_ram) /* Protection device */
AM_RANGE(0x199550, 0x199551) AM_WRITENOP /* Looks like a bug in game code, a protection write is referenced off a5 instead of a6 and ends up here */
@ -252,14 +252,14 @@ static ADDRESS_MAP_START( robocop2_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x140000, 0x14000f) AM_WRITE(deco16_pf12_control_w)
AM_RANGE(0x144000, 0x144fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x146000, 0x146fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x144000, 0x144fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x146000, 0x146fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x14c000, 0x14c7ff) AM_RAM AM_BASE(&cninja_pf1_rowscroll)
AM_RANGE(0x14e000, 0x14e7ff) AM_RAM AM_BASE(&cninja_pf2_rowscroll)
AM_RANGE(0x150000, 0x15000f) AM_WRITE(deco16_pf34_control_w)
AM_RANGE(0x154000, 0x154fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x156000, 0x156fff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x154000, 0x154fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x156000, 0x156fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x15c000, 0x15c7ff) AM_RAM AM_BASE(&cninja_pf3_rowscroll)
AM_RANGE(0x15e000, 0x15e7ff) AM_RAM AM_BASE(&cninja_pf4_rowscroll)
@ -268,10 +268,10 @@ static ADDRESS_MAP_START( robocop2_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x18c000, 0x18c7ff) AM_READ(robocop2_prot_r) /* Protection device */
AM_RANGE(0x18c064, 0x18c065) AM_WRITE(cninja_sound_w)
AM_RANGE(0x198000, 0x198001) AM_WRITE(buffer_spriteram16_w) /* DMA flag */
AM_RANGE(0x1a8000, 0x1a9fff) AM_RAM_DEVWRITE("deco_custom", decodev_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x1a8000, 0x1a9fff) AM_RAM_DEVWRITE("deco_custom", deco16ic_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x1b0000, 0x1b0007) AM_READWRITE(cninja_irq_r, cninja_irq_w)
AM_RANGE(0x1b8000, 0x1bbfff) AM_RAM AM_BASE(&cninja_ram) /* Main ram */
AM_RANGE(0x1f0000, 0x1f0001) AM_DEVWRITE("deco_custom", decodev_priority_w)
AM_RANGE(0x1f0000, 0x1f0001) AM_DEVWRITE("deco_custom", deco16ic_priority_w)
AM_RANGE(0x1f8000, 0x1f8001) AM_READ_PORT("DSW3") /* Dipswitch #3 */
ADDRESS_MAP_END
@ -280,22 +280,22 @@ static ADDRESS_MAP_START( mutantf_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x100000, 0x103fff) AM_RAM
AM_RANGE(0x120000, 0x1207ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x140000, 0x1407ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram2)
AM_RANGE(0x160000, 0x161fff) AM_RAM_DEVWRITE("deco_custom", decodev_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x180000, 0x180001) AM_DEVWRITE("deco_custom", decodev_priority_w)
AM_RANGE(0x160000, 0x161fff) AM_RAM_DEVWRITE("deco_custom", deco16ic_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x180000, 0x180001) AM_DEVWRITE("deco_custom", deco16ic_priority_w)
AM_RANGE(0x180002, 0x180003) AM_WRITENOP /* VBL irq ack */
AM_RANGE(0x1a0000, 0x1a07ff) AM_READWRITE(deco16_66_prot_r, deco16_66_prot_w) AM_BASE(&deco16_prot_ram) /* Protection device */
AM_RANGE(0x1c0000, 0x1c0001) AM_WRITE(buffer_spriteram16_w) AM_DEVREAD("deco_custom", decodev_71_r)
AM_RANGE(0x1c0000, 0x1c0001) AM_WRITE(buffer_spriteram16_w) AM_DEVREAD("deco_custom", deco16ic_71_r)
AM_RANGE(0x1e0000, 0x1e0001) AM_WRITE(buffer_spriteram16_2_w)
AM_RANGE(0x300000, 0x30000f) AM_WRITE(deco16_pf12_control_w)
AM_RANGE(0x304000, 0x305fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x306000, 0x307fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x304000, 0x305fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x306000, 0x307fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x308000, 0x3087ff) AM_RAM AM_BASE(&cninja_pf1_rowscroll)
AM_RANGE(0x30a000, 0x30a7ff) AM_RAM AM_BASE(&cninja_pf2_rowscroll)
AM_RANGE(0x310000, 0x31000f) AM_WRITE(deco16_pf34_control_w)
AM_RANGE(0x314000, 0x315fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x316000, 0x317fff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x314000, 0x315fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x316000, 0x317fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x318000, 0x3187ff) AM_RAM AM_BASE(&cninja_pf3_rowscroll)
AM_RANGE(0x31a000, 0x31a7ff) AM_RAM AM_BASE(&cninja_pf4_rowscroll)

View File

@ -127,7 +127,7 @@ Dip locations verified with US conversion kit manual.
#include "sound/2203intf.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
extern UINT16 *dassault_pf2_rowscroll,*dassault_pf4_rowscroll;
@ -214,25 +214,25 @@ static READ16_HANDLER( shared_ram_r )
static ADDRESS_MAP_START( dassault_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x100000, 0x103fff) AM_RAM_DEVWRITE("deco_custom", decodev_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x100000, 0x103fff) AM_RAM_DEVWRITE("deco_custom", deco16ic_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x140004, 0x140007) AM_WRITENOP /* ? */
AM_RANGE(0x180000, 0x180001) AM_WRITE(dassault_sound_w)
AM_RANGE(0x1c0000, 0x1c000f) AM_READ(dassault_control_r)
AM_RANGE(0x1c000a, 0x1c000b) AM_DEVWRITE("deco_custom", decodev_priority_w)
AM_RANGE(0x1c000a, 0x1c000b) AM_DEVWRITE("deco_custom", deco16ic_priority_w)
AM_RANGE(0x1c000c, 0x1c000d) AM_WRITE(buffer_spriteram16_2_w)
AM_RANGE(0x1c000e, 0x1c000f) AM_WRITE(dassault_control_w)
AM_RANGE(0x200000, 0x201fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x202000, 0x203fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x200000, 0x201fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x202000, 0x203fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x212000, 0x212fff) AM_WRITEONLY AM_BASE(&dassault_pf2_rowscroll)
AM_RANGE(0x220000, 0x22000f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x220000, 0x22000f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x240000, 0x240fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x242000, 0x242fff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x240000, 0x240fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x242000, 0x242fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x252000, 0x252fff) AM_WRITEONLY AM_BASE(&dassault_pf4_rowscroll)
AM_RANGE(0x260000, 0x26000f) AM_DEVWRITE("deco_custom", decodev_pf34_control_w)
AM_RANGE(0x260000, 0x26000f) AM_DEVWRITE("deco_custom", deco16ic_pf34_control_w)
AM_RANGE(0x3f8000, 0x3fbfff) AM_RAM AM_BASE(&dassault_ram) /* Main ram */
AM_RANGE(0x3fc000, 0x3fcfff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram2) /* Spriteram (2nd) */

View File

@ -23,7 +23,7 @@ Protection TODO:
#include "includes/decocrpt.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
/*
@ -145,16 +145,16 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
static VIDEO_UPDATE(dblewing)
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, dblewing_pf1_rowscroll, dblewing_pf2_rowscroll);
deco16ic_pf12_update(deco16ic, dblewing_pf1_rowscroll, dblewing_pf2_rowscroll);
bitmap_fill(bitmap, cliprect, 0); /* not Confirmed */
bitmap_fill(screen->machine->priority_bitmap, NULL, 0);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 4);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 4);
draw_sprites(screen->machine, bitmap, cliprect);
return 0;
}
@ -377,8 +377,8 @@ static WRITE16_HANDLER( dblewing_prot_w )
static ADDRESS_MAP_START( dblewing_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x102000, 0x102fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x102000, 0x102fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x104000, 0x104fff) AM_RAM AM_BASE(&dblewing_pf1_rowscroll)
AM_RANGE(0x106000, 0x106fff) AM_RAM AM_BASE(&dblewing_pf2_rowscroll)
@ -396,7 +396,7 @@ static ADDRESS_MAP_START( dblewing_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x284000, 0x284001) AM_RAM
AM_RANGE(0x288000, 0x288001) AM_RAM
AM_RANGE(0x28c000, 0x28c00f) AM_RAM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x28c000, 0x28c00f) AM_RAM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x300000, 0x3007ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x320000, 0x3207ff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0xff0000, 0xff3fff) AM_MIRROR(0xc000) AM_RAM

View File

@ -20,7 +20,7 @@
#include "machine/eeprom.h"
#include "sound/okim6295.h"
#include "sound/ymz280b.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
static UINT16 *deco156_pf1_rowscroll,*deco156_pf2_rowscroll;
@ -124,11 +124,11 @@ static VIDEO_UPDATE( wcvol95 )
bitmap_fill(screen->machine->priority_bitmap, NULL, 0);
bitmap_fill(bitmap, NULL, 0);
decodev_pf12_update(deco16ic, deco156_pf1_rowscroll, deco156_pf2_rowscroll);
deco16ic_pf12_update(deco16ic, deco156_pf1_rowscroll, deco156_pf2_rowscroll);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
draw_sprites(screen->machine, bitmap, cliprect);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}
@ -185,9 +185,9 @@ static ADDRESS_MAP_START( hvysmsh_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x12000c, 0x12000f) AM_DEVWRITE("oki1", hvysmsh_oki_0_bank_w)
AM_RANGE(0x140000, 0x140003) AM_DEVREADWRITE8("oki1", okim6295_r, okim6295_w, 0x000000ff)
AM_RANGE(0x160000, 0x160003) AM_DEVREADWRITE8("oki2", okim6295_r, okim6295_w, 0x000000ff)
AM_RANGE(0x180000, 0x18001f) AM_DEVREADWRITE("deco_custom", decodev_pf12_control_dword_r, decodev_pf12_control_dword_w)
AM_RANGE(0x190000, 0x191fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x194000, 0x195fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_dword_r, decodev_pf2_data_dword_w)
AM_RANGE(0x180000, 0x18001f) AM_DEVREADWRITE("deco_custom", deco16ic_pf12_control_dword_r, deco16ic_pf12_control_dword_w)
AM_RANGE(0x190000, 0x191fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x194000, 0x195fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_dword_r, deco16ic_pf2_data_dword_w)
AM_RANGE(0x1a0000, 0x1a0fff) AM_READWRITE(wcvol95_pf1_rowscroll_r, wcvol95_pf1_rowscroll_w)
AM_RANGE(0x1a4000, 0x1a4fff) AM_READWRITE(wcvol95_pf2_rowscroll_r, wcvol95_pf2_rowscroll_w)
AM_RANGE(0x1c0000, 0x1c0fff) AM_RAM_WRITE(deco156_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
@ -197,9 +197,9 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( wcvol95_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x100000, 0x10001f) AM_DEVREADWRITE("deco_custom", decodev_pf12_control_dword_r, decodev_pf12_control_dword_w)
AM_RANGE(0x110000, 0x111fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x114000, 0x115fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_dword_r, decodev_pf2_data_dword_w)
AM_RANGE(0x100000, 0x10001f) AM_DEVREADWRITE("deco_custom", deco16ic_pf12_control_dword_r, deco16ic_pf12_control_dword_w)
AM_RANGE(0x110000, 0x111fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x114000, 0x115fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_dword_r, deco16ic_pf2_data_dword_w)
AM_RANGE(0x120000, 0x120fff) AM_READWRITE(wcvol95_pf1_rowscroll_r, wcvol95_pf1_rowscroll_w)
AM_RANGE(0x124000, 0x124fff) AM_READWRITE(wcvol95_pf2_rowscroll_r, wcvol95_pf2_rowscroll_w)
AM_RANGE(0x130000, 0x137fff) AM_RAM

View File

@ -12,18 +12,18 @@
#include "includes/decocrpt.h"
#include "includes/decoprot.h"
#include "includes/dietgo.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
static ADDRESS_MAP_START( dietgo_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x200000, 0x20000f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x210000, 0x211fff) AM_DEVWRITE("deco_custom", decodev_pf1_data_w)
AM_RANGE(0x212000, 0x213fff) AM_DEVWRITE("deco_custom", decodev_pf2_data_w)
AM_RANGE(0x200000, 0x20000f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x210000, 0x211fff) AM_DEVWRITE("deco_custom", deco16ic_pf1_data_w)
AM_RANGE(0x212000, 0x213fff) AM_DEVWRITE("deco_custom", deco16ic_pf2_data_w)
AM_RANGE(0x220000, 0x2207ff) AM_WRITEONLY AM_BASE_MEMBER(dietgo_state, pf1_rowscroll)
AM_RANGE(0x222000, 0x2227ff) AM_WRITEONLY AM_BASE_MEMBER(dietgo_state, pf2_rowscroll)
AM_RANGE(0x280000, 0x2807ff) AM_RAM AM_BASE_SIZE_MEMBER(dietgo_state, spriteram, spriteram_size)
AM_RANGE(0x300000, 0x300bff) AM_RAM_DEVWRITE("deco_custom", decodev_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x300000, 0x300bff) AM_RAM_DEVWRITE("deco_custom", deco16ic_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x340000, 0x3407ff) AM_READWRITE(dietgo_104_prot_r, dietgo_104_prot_w)
AM_RANGE(0x380000, 0x38ffff) AM_RAM // mainram
ADDRESS_MAP_END

View File

@ -90,16 +90,13 @@ Notes:
#include "emu.h"
#include "cpu/m68000/m68000.h"
#include "cpu/h6280/h6280.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "includes/decocrpt.h"
#include "includes/decoprot.h"
#include "video/decodev.h"
#include "includes/funkyjet.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "video/deco16ic.h"
VIDEO_UPDATE( funkyjet );
extern UINT16 *funkyjet_pf1_rowscroll,*funkyjet_pf2_rowscroll;
/******************************************************************************/
@ -107,15 +104,15 @@ static ADDRESS_MAP_START( funkyjet_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x120000, 0x1207ff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x140000, 0x143fff) AM_RAM
AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_BASE_GENERIC(spriteram)
AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_BASE_SIZE_MEMBER(funkyjet_state, spriteram, spriteram_size)
AM_RANGE(0x180000, 0x1807ff) AM_READWRITE(deco16_146_funkyjet_prot_r, deco16_146_funkyjet_prot_w) AM_BASE(&deco16_prot_ram)
AM_RANGE(0x184000, 0x184001) AM_WRITENOP
AM_RANGE(0x188000, 0x188001) AM_WRITENOP
AM_RANGE(0x300000, 0x30000f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x320000, 0x321fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x322000, 0x323fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x340000, 0x340bff) AM_RAM AM_BASE(&funkyjet_pf1_rowscroll)
AM_RANGE(0x342000, 0x342bff) AM_RAM AM_BASE(&funkyjet_pf2_rowscroll)
AM_RANGE(0x300000, 0x30000f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x320000, 0x321fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x322000, 0x323fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x340000, 0x340bff) AM_RAM AM_BASE_MEMBER(funkyjet_state, pf1_rowscroll)
AM_RANGE(0x342000, 0x342bff) AM_RAM AM_BASE_MEMBER(funkyjet_state, pf2_rowscroll)
ADDRESS_MAP_END
/******************************************************************************/
@ -278,9 +275,10 @@ GFXDECODE_END
/******************************************************************************/
static void sound_irq(running_device *device, int state)
static void sound_irq( running_device *device, int state )
{
cputag_set_input_line(device->machine, "audiocpu", 1, state); /* IRQ 2 */
funkyjet_state *driver_state = (funkyjet_state *)device->machine->driver_data;
cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */
}
static const ym2151_interface ym2151_config =
@ -298,8 +296,20 @@ static const deco16ic_interface funkyjet_deco16ic_intf =
NULL, NULL, NULL, NULL
};
static MACHINE_START( funkyjet )
{
funkyjet_state *state = (funkyjet_state *)machine->driver_data;
state->maincpu = devtag_get_device(machine, "maincpu");
state->audiocpu = devtag_get_device(machine, "audiocpu");
state->deco16ic = devtag_get_device(machine, "deco_custom");
}
static MACHINE_DRIVER_START( funkyjet )
/* driver data */
MDRV_DRIVER_DATA(funkyjet_state)
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M68000, 14000000) /* 28 MHz crystal */
MDRV_CPU_PROGRAM_MAP(funkyjet_map)
@ -308,6 +318,8 @@ static MACHINE_DRIVER_START( funkyjet )
MDRV_CPU_ADD("audiocpu", H6280,32220000/4) /* Custom chip 45, Audio section crystal is 32.220 MHz */
MDRV_CPU_PROGRAM_MAP(sound_map)
MDRV_MACHINE_START(funkyjet)
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(58)

View File

@ -36,7 +36,7 @@ MR_01-.3A [a0b758aa]
#include "cpu/m68000/m68000.h"
#include "includes/decocrpt.h"
#include "includes/decoprot.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "sound/okim6295.h"
class mirage_state
@ -50,7 +50,7 @@ public:
UINT16 * pf1_rowscroll;
UINT16 * pf2_rowscroll;
UINT16 * spriteram;
// UINT16 * paletteram; // currently this uses generic palette handling (in decodev.c)
// UINT16 * paletteram; // currently this uses generic palette handling (in deco16ic.c)
size_t spriteram_size;
/* misc */
@ -141,16 +141,16 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
static VIDEO_UPDATE( mirage )
{
mirage_state *state = (mirage_state *)screen->machine->driver_data;
UINT16 flip = decodev_pf12_control_r(state->deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(state->deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
deco16ic_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
bitmap_fill(bitmap, cliprect, 256); /* not verified */
decodev_tilemap_2_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_2_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
draw_sprites(screen->machine, bitmap, cliprect, 1);
decodev_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
draw_sprites(screen->machine, bitmap, cliprect, 0);
return 0;
@ -195,8 +195,8 @@ static WRITE16_HANDLER( okim0_rombank_w )
static ADDRESS_MAP_START( mirage_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
/* tilemaps */
AM_RANGE(0x100000, 0x101fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w) // 0x100000 - 0x101fff tested
AM_RANGE(0x102000, 0x103fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w) // 0x102000 - 0x102fff tested
AM_RANGE(0x100000, 0x101fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w) // 0x100000 - 0x101fff tested
AM_RANGE(0x102000, 0x103fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w) // 0x102000 - 0x102fff tested
/* linescroll */
AM_RANGE(0x110000, 0x110bff) AM_RAM AM_BASE_MEMBER(mirage_state, pf1_rowscroll)
AM_RANGE(0x112000, 0x112bff) AM_RAM AM_BASE_MEMBER(mirage_state, pf2_rowscroll)
@ -207,7 +207,7 @@ static ADDRESS_MAP_START( mirage_map, ADDRESS_SPACE_PROGRAM, 16 )
// AM_RANGE(0x140006, 0x140007) AM_READ(random_readers)
// AM_RANGE(0x150006, 0x150007) AM_READNOP
AM_RANGE(0x160000, 0x160001) AM_WRITENOP
AM_RANGE(0x168000, 0x16800f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x168000, 0x16800f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x16a000, 0x16a001) AM_WRITENOP
AM_RANGE(0x16c000, 0x16c001) AM_WRITE(okim1_rombank_w)
AM_RANGE(0x16c002, 0x16c003) AM_WRITE(okim0_rombank_w)

View File

@ -56,7 +56,7 @@ bootleg todo:
#include "cpu/m68000/m68000.h"
#include "includes/decocrpt.h"
#include "includes/decoprot.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "sound/okim6295.h"
#include "includes/pktgaldx.h"
@ -73,20 +73,20 @@ static WRITE16_DEVICE_HANDLER(pktgaldx_oki_bank_w)
static ADDRESS_MAP_START( pktgaldx_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x102000, 0x102fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x102000, 0x102fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x110000, 0x1107ff) AM_RAM AM_BASE_MEMBER(pktgaldx_state, pf1_rowscroll)
AM_RANGE(0x112000, 0x1127ff) AM_RAM AM_BASE_MEMBER(pktgaldx_state, pf2_rowscroll)
AM_RANGE(0x120000, 0x1207ff) AM_RAM AM_BASE_SIZE_MEMBER(pktgaldx_state, spriteram, spriteram_size)
AM_RANGE(0x130000, 0x130fff) AM_RAM_DEVWRITE("deco_custom", decodev_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x130000, 0x130fff) AM_RAM_DEVWRITE("deco_custom", deco16ic_nonbuffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x140000, 0x14000f) AM_DEVWRITE8("oki1", okim6295_w, 0x00ff)
AM_RANGE(0x140006, 0x140007) AM_DEVREAD8("oki1", okim6295_r, 0x00ff)
AM_RANGE(0x150000, 0x15000f) AM_DEVWRITE8("oki2", okim6295_w, 0x00ff)
AM_RANGE(0x150006, 0x150007) AM_DEVREAD8("oki2", okim6295_r, 0x00ff)
AM_RANGE(0x161800, 0x16180f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x161800, 0x16180f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x164800, 0x164801) AM_DEVWRITE("oki2", pktgaldx_oki_bank_w)
AM_RANGE(0x167800, 0x167fff) AM_READWRITE(deco16_104_pktgaldx_prot_r,deco16_104_pktgaldx_prot_w) AM_BASE(&deco16_prot_ram)
AM_RANGE(0x170000, 0x17ffff) AM_RAM

View File

@ -111,7 +111,7 @@
#include "includes/decoprot.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
VIDEO_START( rohga );
VIDEO_UPDATE( rohga );
@ -142,8 +142,8 @@ static WRITE16_HANDLER( wizdfire_irq_ack_w )
static ADDRESS_MAP_START( rohga_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x1fffff) AM_ROM
AM_RANGE(0x200000, 0x20000f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x240000, 0x24000f) AM_DEVWRITE("deco_custom", decodev_pf34_control_w)
AM_RANGE(0x200000, 0x20000f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x240000, 0x24000f) AM_DEVWRITE("deco_custom", deco16ic_pf34_control_w)
AM_RANGE(0x280000, 0x2807ff) AM_MIRROR(0x800) AM_READWRITE(deco16_104_rohga_prot_r,deco16_104_rohga_prot_w) AM_BASE(&deco16_prot_ram) /* Protection device */
@ -151,15 +151,15 @@ static ADDRESS_MAP_START( rohga_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x300000, 0x300001) AM_WRITE(rohga_buffer_spriteram16_w) /* write 1 for sprite dma */
AM_RANGE(0x310000, 0x310009) AM_WRITENOP /* Palette control? */
AM_RANGE(0x31000a, 0x31000b) AM_DEVWRITE("deco_custom", decodev_palette_dma_w) /* Write 1111 for dma? (Or any value?) */
AM_RANGE(0x31000a, 0x31000b) AM_DEVWRITE("deco_custom", deco16ic_palette_dma_w) /* Write 1111 for dma? (Or any value?) */
AM_RANGE(0x320000, 0x320001) AM_WRITENOP /* ? */
AM_RANGE(0x322000, 0x322001) AM_DEVWRITE("deco_custom", decodev_priority_w)
AM_RANGE(0x322000, 0x322001) AM_DEVWRITE("deco_custom", deco16ic_priority_w)
AM_RANGE(0x321100, 0x321101) AM_READ(rohga_irq_ack_r) /* Irq ack? Value not used */
AM_RANGE(0x3c0000, 0x3c1fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x3c2000, 0x3c2fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x3c4000, 0x3c4fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x3c6000, 0x3c6fff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x3c0000, 0x3c1fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x3c2000, 0x3c2fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x3c4000, 0x3c4fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x3c6000, 0x3c6fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x3c8000, 0x3c8fff) AM_MIRROR(0x1000) AM_RAM AM_BASE(&rohga_pf1_rowscroll)
AM_RANGE(0x3ca000, 0x3cafff) AM_MIRROR(0x1000) AM_RAM AM_BASE(&rohga_pf2_rowscroll)
@ -167,26 +167,26 @@ static ADDRESS_MAP_START( rohga_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x3ce000, 0x3cefff) AM_MIRROR(0x1000) AM_RAM AM_BASE(&rohga_pf4_rowscroll)
AM_RANGE(0x3d0000, 0x3d07ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x3e0000, 0x3e1fff) AM_RAM_DEVWRITE("deco_custom", decodev_buffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x3e0000, 0x3e1fff) AM_RAM_DEVWRITE("deco_custom", deco16ic_buffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x3f0000, 0x3f3fff) AM_RAM /* Main ram */
ADDRESS_MAP_END
static ADDRESS_MAP_START( wizdfire_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x1fffff) AM_ROM
AM_RANGE(0x200000, 0x200fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x202000, 0x202fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x208000, 0x208fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x20a000, 0x20afff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x200000, 0x200fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x202000, 0x202fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x208000, 0x208fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x20a000, 0x20afff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x20b000, 0x20b3ff) AM_WRITEONLY /* ? Always 0 written */
AM_RANGE(0x20c000, 0x20c7ff) AM_RAM AM_BASE(&rohga_pf3_rowscroll)
AM_RANGE(0x20e000, 0x20e7ff) AM_RAM AM_BASE(&rohga_pf4_rowscroll)
AM_RANGE(0x300000, 0x30000f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x310000, 0x31000f) AM_DEVWRITE("deco_custom", decodev_pf34_control_w)
AM_RANGE(0x300000, 0x30000f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x310000, 0x31000f) AM_DEVWRITE("deco_custom", deco16ic_pf34_control_w)
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE("deco_custom", decodev_priority_w) /* Priority */
AM_RANGE(0x320000, 0x320001) AM_DEVWRITE("deco_custom", deco16ic_priority_w) /* Priority */
AM_RANGE(0x320002, 0x320003) AM_WRITENOP /* ? */
AM_RANGE(0x320004, 0x320005) AM_WRITE(wizdfire_irq_ack_w) /* VBL IRQ ack */
@ -195,8 +195,8 @@ static ADDRESS_MAP_START( wizdfire_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x360000, 0x3607ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram2)
AM_RANGE(0x370000, 0x370001) AM_WRITE(buffer_spriteram16_2_w) /* Triggers DMA for spriteram */
AM_RANGE(0x380000, 0x381fff) AM_RAM_DEVWRITE("deco_custom", decodev_buffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x390008, 0x390009) AM_DEVWRITE("deco_custom", decodev_palette_dma_w)
AM_RANGE(0x380000, 0x381fff) AM_RAM_DEVWRITE("deco_custom", deco16ic_buffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x390008, 0x390009) AM_DEVWRITE("deco_custom", deco16ic_palette_dma_w)
AM_RANGE(0xfe4000, 0xfe47ff) AM_READWRITE(deco16_104_prot_r,deco16_104_prot_w) AM_BASE(&deco16_prot_ram) /* Protection device */
AM_RANGE(0xfdc000, 0xffffff) AM_RAM
@ -205,20 +205,20 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( nitrobal_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x1fffff) AM_ROM
AM_RANGE(0x200000, 0x200fff) AM_MIRROR(0x1000) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x202000, 0x2027ff) AM_MIRROR(0x800) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x208000, 0x2087ff) AM_MIRROR(0x800) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x20a000, 0x20a7ff) AM_MIRROR(0x800) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x200000, 0x200fff) AM_MIRROR(0x1000) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x202000, 0x2027ff) AM_MIRROR(0x800) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x208000, 0x2087ff) AM_MIRROR(0x800) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x20a000, 0x20a7ff) AM_MIRROR(0x800) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x204000, 0x2047ff) AM_RAM AM_BASE(&rohga_pf1_rowscroll)
AM_RANGE(0x206000, 0x2067ff) AM_RAM AM_BASE(&rohga_pf2_rowscroll)
AM_RANGE(0x20c000, 0x20c7ff) AM_RAM AM_BASE(&rohga_pf3_rowscroll)
AM_RANGE(0x20e000, 0x20e7ff) AM_RAM AM_BASE(&rohga_pf4_rowscroll)
AM_RANGE(0x300000, 0x30000f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x310000, 0x31000f) AM_DEVWRITE("deco_custom", decodev_pf34_control_w)
AM_RANGE(0x300000, 0x30000f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x310000, 0x31000f) AM_DEVWRITE("deco_custom", deco16ic_pf34_control_w)
AM_RANGE(0x320000, 0x320001) AM_READ_PORT("DSW3") AM_DEVWRITE("deco_custom", decodev_priority_w) /* Priority */
AM_RANGE(0x320000, 0x320001) AM_READ_PORT("DSW3") AM_DEVWRITE("deco_custom", deco16ic_priority_w) /* Priority */
AM_RANGE(0x320002, 0x320003) AM_WRITENOP /* ? */
AM_RANGE(0x320004, 0x320005) AM_WRITE(wizdfire_irq_ack_w) /* VBL IRQ ack */
@ -227,8 +227,8 @@ static ADDRESS_MAP_START( nitrobal_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x360000, 0x3607ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram2)
AM_RANGE(0x370000, 0x370001) AM_WRITE(buffer_spriteram16_2_w) /* Triggers DMA for spriteram */
AM_RANGE(0x380000, 0x381fff) AM_RAM_DEVWRITE("deco_custom", decodev_buffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x390008, 0x390009) AM_DEVWRITE("deco_custom", decodev_palette_dma_w)
AM_RANGE(0x380000, 0x381fff) AM_RAM_DEVWRITE("deco_custom", deco16ic_buffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x390008, 0x390009) AM_DEVWRITE("deco_custom", deco16ic_palette_dma_w)
AM_RANGE(0xfec000, 0xff3fff) AM_RAM
AM_RANGE(0xff4000, 0xff47ff) AM_MIRROR(0x800) AM_READWRITE(deco16_146_nitroball_prot_r,deco16_146_nitroball_prot_w) AM_BASE(&deco16_prot_ram) /* Protection device */
@ -237,30 +237,30 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( schmeisr_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x200000, 0x20000f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x240000, 0x24000f) AM_DEVWRITE("deco_custom", decodev_pf34_control_w)
AM_RANGE(0x200000, 0x20000f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x240000, 0x24000f) AM_DEVWRITE("deco_custom", deco16ic_pf34_control_w)
AM_RANGE(0x280000, 0x2807ff) AM_MIRROR(0x800) AM_READWRITE(deco16_104_rohga_prot_r,deco16_104_rohga_prot_w) AM_BASE(&deco16_prot_ram) /* Protection device */
AM_RANGE(0x2c0000, 0x2c0001) AM_READ_PORT("DSW3")
AM_RANGE(0x300000, 0x300001) AM_READ_PORT("DSW3") AM_WRITE(rohga_buffer_spriteram16_w) /* write 1 for sprite dma */
AM_RANGE(0x310002, 0x310003) AM_READ_PORT("IN1")
AM_RANGE(0x310000, 0x310009) AM_WRITENOP /* Palette control? */
AM_RANGE(0x31000a, 0x31000b) AM_DEVWRITE("deco_custom", decodev_palette_dma_w) /* Write 1111 for dma? (Or any value?) */
AM_RANGE(0x31000a, 0x31000b) AM_DEVWRITE("deco_custom", deco16ic_palette_dma_w) /* Write 1111 for dma? (Or any value?) */
AM_RANGE(0x320000, 0x320001) AM_WRITENOP /* ? */
AM_RANGE(0x322000, 0x322001) AM_DEVWRITE("deco_custom", decodev_priority_w)
AM_RANGE(0x322000, 0x322001) AM_DEVWRITE("deco_custom", deco16ic_priority_w)
AM_RANGE(0x321100, 0x321101) AM_WRITE(wizdfire_irq_ack_w) /* Irq ack? Value not used */
AM_RANGE(0x3c0000, 0x3c1fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x3c2000, 0x3c2fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x3c4000, 0x3c4fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x3c6000, 0x3c6fff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x3c0000, 0x3c1fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x3c2000, 0x3c2fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x3c4000, 0x3c4fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x3c6000, 0x3c6fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x3c8000, 0x3c8fff) AM_MIRROR(0x1000) AM_RAM AM_BASE(&rohga_pf1_rowscroll)
AM_RANGE(0x3ca000, 0x3cafff) AM_MIRROR(0x1000) AM_RAM AM_BASE(&rohga_pf2_rowscroll)
AM_RANGE(0x3cc000, 0x3ccfff) AM_MIRROR(0x1000) AM_RAM AM_BASE(&rohga_pf3_rowscroll)
AM_RANGE(0x3ce000, 0x3cefff) AM_MIRROR(0x1000) AM_RAM AM_BASE(&rohga_pf4_rowscroll)
AM_RANGE(0x3d0000, 0x3d07ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x3e0000, 0x3e1fff) AM_MIRROR(0x2000) AM_RAM_DEVWRITE("deco_custom", decodev_buffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x3e0000, 0x3e1fff) AM_MIRROR(0x2000) AM_RAM_DEVWRITE("deco_custom", deco16ic_buffered_palette_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0xff0000, 0xff7fff) AM_RAM /* Main ram */
ADDRESS_MAP_END

View File

@ -93,7 +93,7 @@ Are the OKI M6295 clocks from Heavy Smash are correct at least for the Mitchell
#include "cpu/arm/arm.h"
#include "machine/eeprom.h"
#include "sound/okim6295.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
static UINT32 *simpl156_systemram;
extern UINT16 *simpl156_pf1_rowscroll,*simpl156_pf2_rowscroll;
@ -254,10 +254,10 @@ static ADDRESS_MAP_START( joemacr_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x110000, 0x111fff) AM_READWRITE(simpl156_spriteram_r, simpl156_spriteram_w) AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x120000, 0x120fff) AM_READWRITE(simpl156_palette_r,simpl156_palette_w)
AM_RANGE(0x130000, 0x130003) AM_READWRITE(simpl156_system_r,simpl156_eeprom_w)
AM_RANGE(0x140000, 0x14001f) AM_DEVREADWRITE("deco_custom", decodev_pf12_control_dword_r, decodev_pf12_control_dword_w)
AM_RANGE(0x150000, 0x151fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x152000, 0x153fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x154000, 0x155fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_dword_r, decodev_pf2_data_dword_w)
AM_RANGE(0x140000, 0x14001f) AM_DEVREADWRITE("deco_custom", deco16ic_pf12_control_dword_r, deco16ic_pf12_control_dword_w)
AM_RANGE(0x150000, 0x151fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x152000, 0x153fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x154000, 0x155fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_dword_r, deco16ic_pf2_data_dword_w)
AM_RANGE(0x160000, 0x161fff) AM_READWRITE(simpl156_pf1_rowscroll_r, simpl156_pf1_rowscroll_w)
AM_RANGE(0x164000, 0x165fff) AM_READWRITE(simpl156_pf2_rowscroll_r, simpl156_pf2_rowscroll_w)
AM_RANGE(0x170000, 0x170003) AM_READONLY AM_WRITENOP // ?
@ -278,10 +278,10 @@ static ADDRESS_MAP_START( chainrec_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x410000, 0x411fff) AM_READWRITE(simpl156_spriteram_r, simpl156_spriteram_w) AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x420000, 0x420fff) AM_READWRITE(simpl156_palette_r,simpl156_palette_w)
AM_RANGE(0x430000, 0x430003) AM_READWRITE(simpl156_system_r,simpl156_eeprom_w)
AM_RANGE(0x440000, 0x44001f) AM_DEVREADWRITE("deco_custom", decodev_pf12_control_dword_r, decodev_pf12_control_dword_w)
AM_RANGE(0x450000, 0x451fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x452000, 0x453fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x454000, 0x455fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_dword_r, decodev_pf2_data_dword_w)
AM_RANGE(0x440000, 0x44001f) AM_DEVREADWRITE("deco_custom", deco16ic_pf12_control_dword_r, deco16ic_pf12_control_dword_w)
AM_RANGE(0x450000, 0x451fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x452000, 0x453fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x454000, 0x455fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_dword_r, deco16ic_pf2_data_dword_w)
AM_RANGE(0x460000, 0x461fff) AM_READWRITE(simpl156_pf1_rowscroll_r, simpl156_pf1_rowscroll_w)
AM_RANGE(0x464000, 0x465fff) AM_READWRITE(simpl156_pf2_rowscroll_r, simpl156_pf2_rowscroll_w)
AM_RANGE(0x470000, 0x470003) AM_READONLY AM_WRITENOP // ??
@ -299,10 +299,10 @@ static ADDRESS_MAP_START( magdrop_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x390000, 0x391fff) AM_READWRITE(simpl156_spriteram_r, simpl156_spriteram_w) AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x3a0000, 0x3a0fff) AM_READWRITE(simpl156_palette_r,simpl156_palette_w)
AM_RANGE(0x3b0000, 0x3b0003) AM_READWRITE(simpl156_system_r,simpl156_eeprom_w)
AM_RANGE(0x3c0000, 0x3c001f) AM_DEVREADWRITE("deco_custom", decodev_pf12_control_dword_r, decodev_pf12_control_dword_w)
AM_RANGE(0x3d0000, 0x3d1fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x3d2000, 0x3d3fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x3d4000, 0x3d5fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_dword_r, decodev_pf2_data_dword_w)
AM_RANGE(0x3c0000, 0x3c001f) AM_DEVREADWRITE("deco_custom", deco16ic_pf12_control_dword_r, deco16ic_pf12_control_dword_w)
AM_RANGE(0x3d0000, 0x3d1fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x3d2000, 0x3d3fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x3d4000, 0x3d5fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_dword_r, deco16ic_pf2_data_dword_w)
AM_RANGE(0x3e0000, 0x3e1fff) AM_READWRITE(simpl156_pf1_rowscroll_r, simpl156_pf1_rowscroll_w)
AM_RANGE(0x3e4000, 0x3e5fff) AM_READWRITE(simpl156_pf2_rowscroll_r, simpl156_pf2_rowscroll_w)
AM_RANGE(0x3f0000, 0x3f0003) AM_READONLY AM_WRITENOP //?
@ -320,10 +320,10 @@ static ADDRESS_MAP_START( magdropp_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x690000, 0x691fff) AM_READWRITE(simpl156_spriteram_r, simpl156_spriteram_w) AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x6a0000, 0x6a0fff) AM_READWRITE(simpl156_palette_r,simpl156_palette_w)
AM_RANGE(0x6b0000, 0x6b0003) AM_READWRITE(simpl156_system_r,simpl156_eeprom_w)
AM_RANGE(0x6c0000, 0x6c001f) AM_DEVREADWRITE("deco_custom", decodev_pf12_control_dword_r, decodev_pf12_control_dword_w)
AM_RANGE(0x6d0000, 0x6d1fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x6d2000, 0x6d3fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x6d4000, 0x6d5fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_dword_r, decodev_pf2_data_dword_w)
AM_RANGE(0x6c0000, 0x6c001f) AM_DEVREADWRITE("deco_custom", deco16ic_pf12_control_dword_r, deco16ic_pf12_control_dword_w)
AM_RANGE(0x6d0000, 0x6d1fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x6d2000, 0x6d3fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x6d4000, 0x6d5fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_dword_r, deco16ic_pf2_data_dword_w)
AM_RANGE(0x6e0000, 0x6e1fff) AM_READWRITE(simpl156_pf1_rowscroll_r, simpl156_pf1_rowscroll_w)
AM_RANGE(0x6e4000, 0x6e5fff) AM_READWRITE(simpl156_pf2_rowscroll_r, simpl156_pf2_rowscroll_w)
AM_RANGE(0x6f0000, 0x6f0003) AM_READONLY AM_WRITENOP // ?
@ -340,10 +340,10 @@ static ADDRESS_MAP_START( mitchell156_map, ADDRESS_SPACE_PROGRAM, 32 )
AM_RANGE(0x190000, 0x191fff) AM_READWRITE(simpl156_spriteram_r, simpl156_spriteram_w) AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0x1a0000, 0x1a0fff) AM_READWRITE(simpl156_palette_r,simpl156_palette_w)
AM_RANGE(0x1b0000, 0x1b0003) AM_READWRITE(simpl156_system_r,simpl156_eeprom_w)
AM_RANGE(0x1c0000, 0x1c001f) AM_DEVREADWRITE("deco_custom", decodev_pf12_control_dword_r, decodev_pf12_control_dword_w)
AM_RANGE(0x1d0000, 0x1d1fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x1d2000, 0x1d3fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_dword_r, decodev_pf1_data_dword_w)
AM_RANGE(0x1d4000, 0x1d5fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_dword_r, decodev_pf2_data_dword_w)
AM_RANGE(0x1c0000, 0x1c001f) AM_DEVREADWRITE("deco_custom", deco16ic_pf12_control_dword_r, deco16ic_pf12_control_dword_w)
AM_RANGE(0x1d0000, 0x1d1fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x1d2000, 0x1d3fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_dword_r, deco16ic_pf1_data_dword_w)
AM_RANGE(0x1d4000, 0x1d5fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_dword_r, deco16ic_pf2_data_dword_w)
AM_RANGE(0x1e0000, 0x1e1fff) AM_READWRITE(simpl156_pf1_rowscroll_r, simpl156_pf1_rowscroll_w)
AM_RANGE(0x1e4000, 0x1e5fff) AM_READWRITE(simpl156_pf2_rowscroll_r, simpl156_pf2_rowscroll_w)
AM_RANGE(0x1f0000, 0x1f0003) AM_READONLY AM_WRITENOP // ?

View File

@ -25,7 +25,7 @@ down hardware (it doesn't write any good sound data btw, mostly zeros).
#include "cpu/h6280/h6280.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "includes/supbtime.h"
@ -69,9 +69,9 @@ static ADDRESS_MAP_START( supbtime_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x180000, 0x18000f) AM_READ(supbtime_controls_r)
AM_RANGE(0x18000a, 0x18000d) AM_WRITENOP
AM_RANGE(0x1a0000, 0x1a0001) AM_WRITE(sound_w)
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("deco_custom", decodev_pf12_control_r, decodev_pf12_control_w)
AM_RANGE(0x320000, 0x321fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x322000, 0x323fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("deco_custom", deco16ic_pf12_control_r, deco16ic_pf12_control_w)
AM_RANGE(0x320000, 0x321fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x322000, 0x323fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x340000, 0x3407ff) AM_RAM AM_BASE_MEMBER(supbtime_state, pf1_rowscroll)
AM_RANGE(0x342000, 0x3427ff) AM_RAM AM_BASE_MEMBER(supbtime_state, pf2_rowscroll)
ADDRESS_MAP_END
@ -84,9 +84,9 @@ static ADDRESS_MAP_START( chinatwn_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x180000, 0x18000f) AM_READ(supbtime_controls_r)
AM_RANGE(0x18000a, 0x18000d) AM_WRITENOP
AM_RANGE(0x1a0000, 0x1a3fff) AM_RAM
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("deco_custom", decodev_pf12_control_r, decodev_pf12_control_w)
AM_RANGE(0x320000, 0x321fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x322000, 0x323fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("deco_custom", deco16ic_pf12_control_r, deco16ic_pf12_control_w)
AM_RANGE(0x320000, 0x321fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x322000, 0x323fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x340000, 0x3407ff) AM_RAM AM_BASE_MEMBER(supbtime_state, pf1_rowscroll) // unused
AM_RANGE(0x342000, 0x3427ff) AM_RAM AM_BASE_MEMBER(supbtime_state, pf2_rowscroll) // unused
ADDRESS_MAP_END

View File

@ -322,23 +322,20 @@ Stephh's notes (based on the games M68000 code and some tests) :
#define FNCYWLD_HACK 0
static WRITE16_HANDLER( semicom_soundcmd_w );
static UINT16* tumblepb_mainram;
UINT16* jumppop_control;
UINT16* suprtrio_control;
/******************************************************************************/
static WRITE16_DEVICE_HANDLER( tumblepb_oki_w )
{
if (mem_mask==0xffff)
if (mem_mask == 0xffff)
{
okim6295_w(device,0,data&0xff);
//printf("tumbleb_oki_w %04x %04x\n",data,mem_mask);
okim6295_w(device, 0, data & 0xff);
//printf("tumbleb_oki_w %04x %04x\n", data, mem_mask);
}
else
{
okim6295_w(device,0,(data>>8)&0xff);
//printf("tumbleb_oki_w %04x %04x\n",data,mem_mask);
okim6295_w(device, 0, (data >> 8) & 0xff);
//printf("tumbleb_oki_w %04x %04x\n", data, mem_mask);
}
/* STUFF IN OTHER BYTE TOO..*/
}
@ -351,22 +348,24 @@ static READ16_HANDLER( tumblepb_prot_r )
#ifdef UNUSED_FUNCTION
static WRITE16_HANDLER( tumblepb_sound_w )
{
soundlatch_w(space,0,data & 0xff);
cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
tumbleb_state *state = (tumbleb_state *)space->machine->driver_data;
soundlatch_w(space, 0, data & 0xff);
cpu_set_input_line(state->audiocpu, 0, HOLD_LINE);
}
#endif
static WRITE16_HANDLER( jumppop_sound_w )
{
soundlatch_w(space,0,data & 0xff);
cputag_set_input_line(space->machine, "audiocpu", 0, ASSERT_LINE );
tumbleb_state *state = (tumbleb_state *)space->machine->driver_data;
soundlatch_w(space, 0, data & 0xff);
cpu_set_input_line(state->audiocpu, 0, ASSERT_LINE);
}
/******************************************************************************/
static READ16_HANDLER( tumblepopb_controls_r )
{
switch (offset<<1)
switch (offset << 1)
{
case 0:
return input_port_read(space->machine, "PLAYERS");
@ -451,21 +450,17 @@ command 1 - stop?
*/
static int tumblep_music_command;
static int tumblep_music_bank;
static int tumbleb2_music_is_playing;
static void tumbleb2_playmusic(running_device *device)
static void tumbleb2_playmusic( running_device *device )
{
int status = okim6295_r(device,0);
tumbleb_state *state = (tumbleb_state *)device->machine->driver_data;
int status = okim6295_r(device, 0);
if (tumbleb2_music_is_playing)
if (state->music_is_playing)
{
if ((status&0x08)==0x00)
if (!BIT(status, 3))
{
okim6295_w(device,0,0x80|tumblep_music_command);
okim6295_w(device,0,0x00|0x82);
okim6295_w(device, 0, 0x80 | state->music_command);
okim6295_w(device, 0, 0x00 | 0x82);
}
}
}
@ -473,8 +468,9 @@ static void tumbleb2_playmusic(running_device *device)
static INTERRUPT_GEN( tumbleb2_interrupt )
{
tumbleb_state *state = (tumbleb_state *)device->machine->driver_data;
cpu_set_input_line(device, 6, HOLD_LINE);
tumbleb2_playmusic(devtag_get_device(device->machine, "oki"));
tumbleb2_playmusic(state->oki);
}
static const int tumbleb_sound_lookup[256] = {
@ -498,30 +494,30 @@ static const int tumbleb_sound_lookup[256] = {
};
/* we use channels 1,2,3 for sound effects, and channel 4 for music */
static void tumbleb2_set_music_bank(running_machine *machine, int bank)
static void tumbleb2_set_music_bank( running_machine *machine, int bank )
{
UINT8 *oki = memory_region(machine, "oki");
memcpy(&oki[0x38000], &oki[0x80000+0x38000+0x8000*bank],0x8000);
memcpy(&oki[0x38000], &oki[0x80000 + 0x38000 + 0x8000 * bank], 0x8000);
}
static void tumbleb2_play_sound (running_device *device, int data)
static void tumbleb2_play_sound( running_device *device, int data )
{
int status = okim6295_r(device,0);
int status = okim6295_r(device, 0);
if ((status&0x01)==0x00)
if (!BIT(status, 0))
{
okim6295_w(device,0,0x80|data);
okim6295_w(device,0,0x00|0x12);
okim6295_w(device, 0, 0x80 | data);
okim6295_w(device, 0, 0x00 | 0x12);
}
else if ((status&0x02)==0x00)
else if (!BIT(status, 1))
{
okim6295_w(device,0,0x80|data);
okim6295_w(device,0,0x00|0x22);
okim6295_w(device, 0, 0x80 | data);
okim6295_w(device, 0, 0x00 | 0x22);
}
else if ((status&0x04)==0x00)
else if (!BIT(status, 2))
{
okim6295_w(device,0,0x80|data);
okim6295_w(device,0,0x00|0x42);
okim6295_w(device, 0, 0x80 | data);
okim6295_w(device, 0, 0x00 | 0x42);
}
}
@ -537,116 +533,113 @@ static void tumbleb2_play_sound (running_device *device, int data)
// bank 7 = how to play?
// bank 8 = boss???
static void process_tumbleb2_music_command(running_device *device, int data)
static void process_tumbleb2_music_command( running_device *device, int data )
{
int status = okim6295_r(device,0);
tumbleb_state *state = (tumbleb_state *)device->machine->driver_data;
int status = okim6295_r(device, 0);
if (data == 1) // stop?
{
if ((status&0x08)==0x08)
if (BIT(status, 3))
{
okim6295_w(device,0,0x40); /* Stop playing music */
tumbleb2_music_is_playing = 0;
okim6295_w(device, 0, 0x40); /* Stop playing music */
state->music_is_playing = 0;
}
}
else
{
if (tumbleb2_music_is_playing != data)
if (state->music_is_playing != data)
{
tumbleb2_music_is_playing = data;
okim6295_w(device,0,0x40); // stop the current music
state->music_is_playing = data;
okim6295_w(device, 0, 0x40); // stop the current music
switch (data)
{
case 0x04: // map screen
tumblep_music_bank = 1;
tumblep_music_command = 0x38;
state->music_bank = 1;
state->music_command = 0x38;
break;
case 0x05: // america
tumblep_music_bank = 6;
tumblep_music_command = 0x38;
state->music_bank = 6;
state->music_command = 0x38;
break;
case 0x06: // asia
tumblep_music_bank = 2;
tumblep_music_command = 0x38;
state->music_bank = 2;
state->music_command = 0x38;
break;
case 0x07: // africa/egypt -- don't seem to have a tune for this one
tumblep_music_bank = 4;
tumblep_music_command = 0x38;
state->music_bank = 4;
state->music_command = 0x38;
break;
case 0x08: // antartica
tumblep_music_bank = 3;
tumblep_music_command = 0x38;
state->music_bank = 3;
state->music_command = 0x38;
break;
case 0x09: // brazil / south america
tumblep_music_bank = 4;
tumblep_music_command = 0x38;
state->music_bank = 4;
state->music_command = 0x38;
break;
case 0x0a: // japan -- don't seem to have a tune
tumblep_music_bank = 2;
tumblep_music_command = 0x38;
state->music_bank = 2;
state->music_command = 0x38;
break;
case 0x0b: // australia
tumblep_music_bank = 5;
tumblep_music_command = 0x38;
state->music_bank = 5;
state->music_command = 0x38;
break;
case 0x0c: // france/europe
tumblep_music_bank = 6;
tumblep_music_command = 0x38;
state->music_bank = 6;
state->music_command = 0x38;
break;
case 0x0d: // how to play
tumblep_music_bank = 7;
tumblep_music_command = 0x38;
state->music_bank = 7;
state->music_command = 0x38;
break;
case 0x0f: // stage clear
tumblep_music_bank = 0;
tumblep_music_command = 0x33;
state->music_bank = 0;
state->music_command = 0x33;
break;
case 0x10: // boss stage
tumblep_music_bank = 8;
tumblep_music_command = 0x38;
state->music_bank = 8;
state->music_command = 0x38;
break;
case 0x12: // world clear
tumblep_music_bank = 0;
tumblep_music_command = 0x34;
state->music_bank = 0;
state->music_command = 0x34;
break;
default: // anything else..
tumblep_music_bank = 8;
tumblep_music_command = 0x38;
state->music_bank = 8;
state->music_command = 0x38;
break;
}
tumbleb2_set_music_bank(device->machine, tumblep_music_bank);
tumbleb2_set_music_bank(device->machine, state->music_bank);
tumbleb2_playmusic(device);
}
}
}
static WRITE16_DEVICE_HANDLER( tumbleb2_soundmcu_w )
{
int sound;
sound = tumbleb_sound_lookup[data&0xff];
int sound = tumbleb_sound_lookup[data & 0xff];
if (sound == 0x00)
{
/* pangpang has more commands than tumbleb2, extra sounds */
//mame_printf_debug("Command %04x\n",data);
//mame_printf_debug("Command %04x\n", data);
}
else if (sound == -2)
{
@ -666,16 +659,16 @@ static ADDRESS_MAP_START( tumblepopb_main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_WRITEONLY /* To write levels modifications */
#endif
AM_RANGE(0x100000, 0x100001) AM_READ(tumblepb_prot_r) AM_DEVWRITE("oki", tumblepb_oki_w)
AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE(&tumblepb_mainram)
AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE_MEMBER(tumbleb_state, mainram)
AM_RANGE(0x140000, 0x1407ff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* Bootleg sprite buffer */
AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_BASE_SIZE_MEMBER(tumbleb_state, spriteram, spriteram_size) /* Bootleg sprite buffer */
AM_RANGE(0x160800, 0x160807) AM_WRITEONLY /* writes past the end of spriteram */
AM_RANGE(0x180000, 0x18000f) AM_READ(tumblepopb_controls_r)
AM_RANGE(0x18000c, 0x18000d) AM_WRITENOP
AM_RANGE(0x1a0000, 0x1a07ff) AM_RAM
AM_RANGE(0x300000, 0x30000f) AM_WRITE(tumblepb_control_0_w)
AM_RANGE(0x320000, 0x320fff) AM_WRITE(tumblepb_pf1_data_w) AM_BASE(&tumblepb_pf1_data)
AM_RANGE(0x322000, 0x322fff) AM_WRITE(tumblepb_pf2_data_w) AM_BASE(&tumblepb_pf2_data)
AM_RANGE(0x320000, 0x320fff) AM_WRITE(tumblepb_pf1_data_w) AM_BASE_MEMBER(tumbleb_state, pf1_data)
AM_RANGE(0x322000, 0x322fff) AM_WRITE(tumblepb_pf2_data_w) AM_BASE_MEMBER(tumbleb_state, pf2_data)
AM_RANGE(0x340000, 0x3401ff) AM_WRITENOP /* Unused row scroll */
AM_RANGE(0x340400, 0x34047f) AM_WRITENOP /* Unused col scroll */
AM_RANGE(0x342000, 0x3421ff) AM_WRITENOP
@ -690,14 +683,14 @@ static ADDRESS_MAP_START( fncywld_main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x100000, 0x100003) AM_DEVREADWRITE8("ymsnd", ym2151_r, ym2151_w, 0x00ff)
AM_RANGE(0x100004, 0x100005) AM_DEVREADWRITE8("oki", okim6295_r, okim6295_w, 0x00ff)
AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE(paletteram16_xxxxRRRRGGGGBBBB_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* sprites */
AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_BASE_SIZE_MEMBER(tumbleb_state, spriteram, spriteram_size) /* sprites */
AM_RANGE(0x160800, 0x16080f) AM_WRITEONLY /* goes slightly past the end of spriteram? */
AM_RANGE(0x180000, 0x18000f) AM_READ(tumblepopb_controls_r)
AM_RANGE(0x18000c, 0x18000d) AM_WRITENOP
AM_RANGE(0x1a0000, 0x1a07ff) AM_RAM
AM_RANGE(0x300000, 0x30000f) AM_WRITE(tumblepb_control_0_w)
AM_RANGE(0x320000, 0x321fff) AM_RAM_WRITE(fncywld_pf1_data_w) AM_BASE(&tumblepb_pf1_data)
AM_RANGE(0x322000, 0x323fff) AM_RAM_WRITE(fncywld_pf2_data_w) AM_BASE(&tumblepb_pf2_data)
AM_RANGE(0x320000, 0x321fff) AM_RAM_WRITE(fncywld_pf1_data_w) AM_BASE_MEMBER(tumbleb_state, pf1_data)
AM_RANGE(0x322000, 0x323fff) AM_RAM_WRITE(fncywld_pf2_data_w) AM_BASE_MEMBER(tumbleb_state, pf2_data)
AM_RANGE(0x340000, 0x3401ff) AM_WRITENOP /* Unused row scroll */
AM_RANGE(0x340400, 0x34047f) AM_WRITENOP /* Unused col scroll */
AM_RANGE(0x342000, 0x3421ff) AM_WRITENOP
@ -710,53 +703,54 @@ static READ16_HANDLER( semibase_unknown_r )
{
return mame_rand(space->machine);
}
static ADDRESS_MAP_START( htchctch_main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0fffff) AM_ROM
AM_RANGE(0x100000, 0x10000f) AM_READ(semibase_unknown_r)
AM_RANGE(0x100000, 0x100001) AM_WRITE(semicom_soundcmd_w)
AM_RANGE(0x100002, 0x100003) AM_WRITE(bcstory_tilebank_w)
AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE(&tumblepb_mainram)
AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE_MEMBER(tumbleb_state, mainram)
AM_RANGE(0x140000, 0x1407ff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x160000, 0x160fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* Bootleg sprite buffer */
AM_RANGE(0x160000, 0x160fff) AM_RAM AM_BASE_SIZE_MEMBER(tumbleb_state, spriteram, spriteram_size) /* Bootleg sprite buffer */
AM_RANGE(0x180000, 0x18000f) AM_READ(tumblepopb_controls_r)
AM_RANGE(0x18000c, 0x18000d) AM_WRITENOP
AM_RANGE(0x1a0000, 0x1a0fff) AM_RAM
AM_RANGE(0x300000, 0x30000f) AM_WRITE(tumblepb_control_0_w)
AM_RANGE(0x320000, 0x321fff) AM_WRITE(tumblepb_pf1_data_w) AM_BASE(&tumblepb_pf1_data)
AM_RANGE(0x322000, 0x322fff) AM_WRITE(tumblepb_pf2_data_w) AM_BASE(&tumblepb_pf2_data)
AM_RANGE(0x320000, 0x321fff) AM_WRITE(tumblepb_pf1_data_w) AM_BASE_MEMBER(tumbleb_state, pf1_data)
AM_RANGE(0x322000, 0x322fff) AM_WRITE(tumblepb_pf2_data_w) AM_BASE_MEMBER(tumbleb_state, pf2_data)
AM_RANGE(0x341000, 0x342fff) AM_RAM // Extra ram?
ADDRESS_MAP_END
static ADDRESS_MAP_START( jumppop_main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE(&tumblepb_mainram)
AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE_MEMBER(tumbleb_state, mainram)
AM_RANGE(0x140000, 0x1407ff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x160000, 0x160fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* Bootleg sprite buffer */
AM_RANGE(0x160000, 0x160fff) AM_RAM AM_BASE_SIZE_MEMBER(tumbleb_state, spriteram, spriteram_size) /* Bootleg sprite buffer */
AM_RANGE(0x180000, 0x180001) AM_NOP /* IRQ ack? */
AM_RANGE(0x180002, 0x180003) AM_READ_PORT("PLAYERS")
AM_RANGE(0x180004, 0x180005) AM_READ_PORT("SYSTEM")
AM_RANGE(0x180006, 0x180007) AM_READ_PORT("DSW")
AM_RANGE(0x18000c, 0x18000d) AM_WRITE(jumppop_sound_w)
AM_RANGE(0x1a0000, 0x1a7fff) AM_RAM
AM_RANGE(0x300000, 0x303fff) AM_RAM_WRITE(tumblepb_pf2_data_w) AM_BASE(&tumblepb_pf2_data)
AM_RANGE(0x320000, 0x323fff) AM_RAM_WRITE(tumblepb_pf1_data_w) AM_BASE(&tumblepb_pf1_data)
AM_RANGE(0x380000, 0x38000f) AM_WRITEONLY AM_BASE(&jumppop_control)
AM_RANGE(0x300000, 0x303fff) AM_RAM_WRITE(tumblepb_pf2_data_w) AM_BASE_MEMBER(tumbleb_state, pf2_data)
AM_RANGE(0x320000, 0x323fff) AM_RAM_WRITE(tumblepb_pf1_data_w) AM_BASE_MEMBER(tumbleb_state, pf1_data)
AM_RANGE(0x380000, 0x38000f) AM_WRITEONLY AM_BASE_MEMBER(tumbleb_state, control)
ADDRESS_MAP_END
static WRITE16_HANDLER( jumpkids_sound_w )
{
tumbleb_state *state = (tumbleb_state *)space->machine->driver_data;
soundlatch_w(space, 0, data & 0xff);
cputag_set_input_line(space->machine, "audiocpu", 0, HOLD_LINE);
cpu_set_input_line(state->audiocpu, 0, HOLD_LINE);
}
static ADDRESS_MAP_START( suprtrio_main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x700000, 0x700fff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram)
AM_RANGE(0xa00000, 0xa0000f) AM_RAM AM_BASE(&suprtrio_control)
AM_RANGE(0xa20000, 0xa20fff) AM_RAM_WRITE(tumblepb_pf1_data_w) AM_BASE(&tumblepb_pf1_data)
AM_RANGE(0xa22000, 0xa22fff) AM_RAM_WRITE(tumblepb_pf2_data_w) AM_BASE(&tumblepb_pf2_data)
AM_RANGE(0x700000, 0x700fff) AM_RAM AM_BASE_SIZE_MEMBER(tumbleb_state, spriteram, spriteram_size)
AM_RANGE(0xa00000, 0xa0000f) AM_RAM AM_BASE_MEMBER(tumbleb_state, control)
AM_RANGE(0xa20000, 0xa20fff) AM_RAM_WRITE(tumblepb_pf1_data_w) AM_BASE_MEMBER(tumbleb_state, pf1_data)
AM_RANGE(0xa22000, 0xa22fff) AM_RAM_WRITE(tumblepb_pf2_data_w) AM_BASE_MEMBER(tumbleb_state, pf2_data)
AM_RANGE(0xcf0000, 0xcf05ff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0xe00000, 0xe00001) AM_READ_PORT("PLAYERS") AM_WRITE(suprtrio_tilebank_w)
AM_RANGE(0xe40000, 0xe40001) AM_READ_PORT("SYSTEM")
@ -767,15 +761,15 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( pangpang_main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE(&tumblepb_mainram)
AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE_MEMBER(tumbleb_state, mainram)
AM_RANGE(0x140000, 0x1407ff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* Bootleg sprite buffer */
AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_BASE_SIZE_MEMBER(tumbleb_state, spriteram, spriteram_size) /* Bootleg sprite buffer */
AM_RANGE(0x160800, 0x160807) AM_WRITEONLY // writes past the end of spriteram
AM_RANGE(0x180000, 0x18000f) AM_READ(tumblepopb_controls_r)
AM_RANGE(0x1a0000, 0x1a07ff) AM_RAM
AM_RANGE(0x300000, 0x30000f) AM_WRITE(tumblepb_control_0_w)
AM_RANGE(0x320000, 0x321fff) AM_RAM_WRITE(pangpang_pf1_data_w) AM_BASE(&tumblepb_pf1_data)
AM_RANGE(0x340000, 0x341fff) AM_RAM_WRITE(pangpang_pf2_data_w) AM_BASE(&tumblepb_pf2_data)
AM_RANGE(0x320000, 0x321fff) AM_RAM_WRITE(pangpang_pf1_data_w) AM_BASE_MEMBER(tumbleb_state, pf1_data)
AM_RANGE(0x340000, 0x341fff) AM_RAM_WRITE(pangpang_pf2_data_w) AM_BASE_MEMBER(tumbleb_state, pf2_data)
ADDRESS_MAP_END
@ -785,9 +779,9 @@ static WRITE16_HANDLER( semicom_soundcmd_w )
{
if (ACCESSING_BITS_0_7)
{
soundlatch_w(space,0,data & 0xff);
soundlatch_w(space, 0, data & 0xff);
// needed for Super Trio which reads the sound with polling
// cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(100));
// cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(100));
cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(20));
}
@ -804,7 +798,7 @@ static ADDRESS_MAP_START( semicom_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0xd000, 0xd7ff) AM_RAM
AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE("ymsnd", ym2151_r, ym2151_w)
AM_RANGE(0xf002, 0xf002) AM_DEVREADWRITE("oki", okim6295_r, okim6295_w)
// AM_RANGE(0xf006, 0xf006) ??
//AM_RANGE(0xf006, 0xf006) ??
AM_RANGE(0xf008, 0xf008) AM_READ(soundlatch_r)
AM_RANGE(0xf00e, 0xf00e) AM_WRITE(oki_sound_bank_w)
ADDRESS_MAP_END
@ -813,7 +807,7 @@ static ADDRESS_MAP_START( suprtrio_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0xcfff) AM_ROM
AM_RANGE(0xd000, 0xd7ff) AM_RAM
AM_RANGE(0xf002, 0xf002) AM_DEVREADWRITE("oki", okim6295_r, okim6295_w)
// AM_RANGE(0xf006, 0xf006) ??
//AM_RANGE(0xf006, 0xf006) ??
AM_RANGE(0xf008, 0xf008) AM_READ(soundlatch_r)
AM_RANGE(0xf00e, 0xf00e) AM_WRITE(oki_sound_bank_w)
ADDRESS_MAP_END
@ -831,7 +825,8 @@ ADDRESS_MAP_END
static READ8_HANDLER(jumppop_z80latch_r)
{
cputag_set_input_line(space->machine, "audiocpu", 0, CLEAR_LINE);
tumbleb_state *state = (tumbleb_state *)space->machine->driver_data;
cpu_set_input_line(state->audiocpu, 0, CLEAR_LINE);
return soundlatch_r(space, 0);
}
@ -850,16 +845,16 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( jumpkids_main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x07ffff) AM_ROM
AM_RANGE(0x100000, 0x100001) AM_WRITE(jumpkids_sound_w)
AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE(&tumblepb_mainram)
AM_RANGE(0x120000, 0x123fff) AM_RAM AM_BASE_MEMBER(tumbleb_state, mainram)
AM_RANGE(0x140000, 0x1407ff) AM_RAM_WRITE(paletteram16_xxxxBBBBGGGGRRRR_word_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_BASE_SIZE_GENERIC(spriteram) /* Bootleg sprite buffer */
AM_RANGE(0x160000, 0x1607ff) AM_RAM AM_BASE_SIZE_MEMBER(tumbleb_state, spriteram, spriteram_size) /* Bootleg sprite buffer */
AM_RANGE(0x160800, 0x160807) AM_WRITEONLY /* writes past the end of spriteram */
AM_RANGE(0x180000, 0x18000f) AM_READ(tumblepopb_controls_r)
AM_RANGE(0x18000c, 0x18000d) AM_WRITENOP
AM_RANGE(0x1a0000, 0x1a07ff) AM_RAM
AM_RANGE(0x300000, 0x30000f) AM_WRITE(tumblepb_control_0_w)
AM_RANGE(0x320000, 0x320fff) AM_WRITE(tumblepb_pf1_data_w) AM_BASE(&tumblepb_pf1_data)
AM_RANGE(0x322000, 0x322fff) AM_WRITE(tumblepb_pf2_data_w) AM_BASE(&tumblepb_pf2_data)
AM_RANGE(0x320000, 0x320fff) AM_WRITE(tumblepb_pf1_data_w) AM_BASE_MEMBER(tumbleb_state, pf1_data)
AM_RANGE(0x322000, 0x322fff) AM_WRITE(tumblepb_pf2_data_w) AM_BASE_MEMBER(tumbleb_state, pf2_data)
AM_RANGE(0x340000, 0x3401ff) AM_WRITENOP /* Unused row scroll */
AM_RANGE(0x340400, 0x34047f) AM_WRITENOP /* Unused col scroll */
AM_RANGE(0x342000, 0x3421ff) AM_WRITENOP
@ -872,7 +867,7 @@ static WRITE8_HANDLER( jumpkids_oki_bank_w )
UINT8* sound2 = memory_region(space->machine, "oki2");
int bank = data & 0x03;
memcpy (sound1+0x20000, sound2+bank*0x20000, 0x20000);
memcpy(sound1 + 0x20000, sound2 + bank * 0x20000, 0x20000);
}
static ADDRESS_MAP_START( jumpkids_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
@ -1988,13 +1983,48 @@ GFXDECODE_END
/******************************************************************************/
static MACHINE_START( tumbleb )
{
tumbleb_state *state = (tumbleb_state *)machine->driver_data;
state->maincpu = devtag_get_device(machine, "maincpu");
state->audiocpu = devtag_get_device(machine, "audiocpu");
state->oki = devtag_get_device(machine, "oki");
state_save_register_global(machine, state->music_command);
state_save_register_global(machine, state->music_bank);
state_save_register_global(machine, state->music_is_playing);
state_save_register_global_array(machine, state->control_0);
state_save_register_global(machine, state->flipscreen);
state_save_register_global(machine, state->tilebank);
}
static MACHINE_RESET( tumbleb )
{
tumbleb_state *state = (tumbleb_state *)machine->driver_data;
state->music_command = 0;
state->music_bank = 0;
state->music_is_playing = 0;
state->flipscreen = 0;
state->tilebank = 0;
memset(state->control_0, 0, ARRAY_LENGTH(state->control_0));
}
static MACHINE_DRIVER_START( tumblepb )
/* driver data */
MDRV_DRIVER_DATA(tumbleb_state)
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M68000, 14000000)
MDRV_CPU_PROGRAM_MAP(tumblepopb_main_map)
MDRV_CPU_VBLANK_INT("screen", irq6_line_hold)
MDRV_MACHINE_START(tumbleb)
MDRV_MACHINE_RESET(tumbleb)
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(58)
@ -2020,11 +2050,17 @@ MACHINE_DRIVER_END
static MACHINE_DRIVER_START( tumbleb2 )
/* driver data */
MDRV_DRIVER_DATA(tumbleb_state)
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M68000, 14000000)
MDRV_CPU_PROGRAM_MAP(tumblepopb_main_map)
MDRV_CPU_VBLANK_INT("screen", tumbleb2_interrupt)
MDRV_MACHINE_START(tumbleb)
MDRV_MACHINE_RESET(tumbleb)
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(58)
@ -2049,6 +2085,9 @@ MACHINE_DRIVER_END
static MACHINE_DRIVER_START( jumpkids )
/* driver data */
MDRV_DRIVER_DATA(tumbleb_state)
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M68000, 12000000)
MDRV_CPU_PROGRAM_MAP(jumpkids_main_map)
@ -2058,6 +2097,9 @@ static MACHINE_DRIVER_START( jumpkids )
MDRV_CPU_ADD("audiocpu", Z80, 8000000/2)
MDRV_CPU_PROGRAM_MAP(jumpkids_sound_map)
MDRV_MACHINE_START(tumbleb)
MDRV_MACHINE_RESET(tumbleb)
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(60)
@ -2081,11 +2123,18 @@ static MACHINE_DRIVER_START( jumpkids )
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( fncywld )
/* driver data */
MDRV_DRIVER_DATA(tumbleb_state)
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M68000, 12000000)
MDRV_CPU_PROGRAM_MAP(fncywld_main_map)
MDRV_CPU_VBLANK_INT("screen", irq6_line_hold)
MDRV_MACHINE_START(tumbleb)
MDRV_MACHINE_RESET(tumbleb)
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(60)
@ -2115,9 +2164,10 @@ MACHINE_DRIVER_END
static void semicom_irqhandler(running_device *device, int irq)
static void semicom_irqhandler( running_device *device, int irq )
{
cputag_set_input_line(device->machine, "audiocpu", 0, irq ? ASSERT_LINE : CLEAR_LINE);
tumbleb_state *state = (tumbleb_state *)device->machine->driver_data;
cpu_set_input_line(state->audiocpu, 0, irq ? ASSERT_LINE : CLEAR_LINE);
}
@ -2128,17 +2178,23 @@ static const ym2151_interface semicom_ym2151_interface =
static MACHINE_RESET (htchctch)
{
/* copy protection data every reset */
tumbleb_state *state = (tumbleb_state *)machine->driver_data;
/* copy protection data every reset */
UINT16 *PROTDATA = (UINT16*)memory_region(machine, "user1");
int i, len = memory_region_length(machine, "user1");
for (i = 0;i < len/2;i++)
tumblepb_mainram[0x000/2 + i] = PROTDATA[i];
for (i = 0; i < len / 2; i++)
state->mainram[0x000/2 + i] = PROTDATA[i];
MACHINE_RESET_CALL(tumbleb);
}
static MACHINE_DRIVER_START( htchctch )
/* driver data */
MDRV_DRIVER_DATA(tumbleb_state)
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M68000, 15000000) /* verified */
MDRV_CPU_PROGRAM_MAP(htchctch_main_map)
@ -2147,7 +2203,8 @@ static MACHINE_DRIVER_START( htchctch )
MDRV_CPU_ADD("audiocpu", Z80, 15000000/4) /* verified on dquizgo */
MDRV_CPU_PROGRAM_MAP(semicom_sound_map)
MDRV_MACHINE_RESET ( htchctch )
MDRV_MACHINE_START(tumbleb)
MDRV_MACHINE_RESET(htchctch)
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
@ -2184,7 +2241,7 @@ MACHINE_DRIVER_END
static MACHINE_DRIVER_START( bcstory )
MDRV_IMPORT_FROM(htchctch)
MDRV_VIDEO_UPDATE( bcstory )
MDRV_VIDEO_UPDATE(bcstory)
MDRV_SOUND_REPLACE("ymsnd", YM2151, 3427190)
MDRV_SOUND_CONFIG(semicom_ym2151_interface)
@ -2214,6 +2271,10 @@ static MACHINE_DRIVER_START( metlsavr )
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( jumppop )
/* driver data */
MDRV_DRIVER_DATA(tumbleb_state)
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M68000, 16000000)
MDRV_CPU_PROGRAM_MAP(jumppop_main_map)
@ -2224,6 +2285,9 @@ static MACHINE_DRIVER_START( jumppop )
MDRV_CPU_IO_MAP(jumppop_sound_io_map)
MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 1953) /* measured */
MDRV_MACHINE_START(tumbleb)
MDRV_MACHINE_RESET(tumbleb)
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(60)
@ -2252,6 +2316,9 @@ MACHINE_DRIVER_END
static MACHINE_DRIVER_START( suprtrio )
/* driver data */
MDRV_DRIVER_DATA(tumbleb_state)
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M68000, 14000000) /* 14mhz should be correct, but lots of sprite flicker later in game */
MDRV_CPU_PROGRAM_MAP(suprtrio_main_map)
@ -2260,6 +2327,9 @@ static MACHINE_DRIVER_START( suprtrio )
MDRV_CPU_ADD("audiocpu", Z80, 8000000)
MDRV_CPU_PROGRAM_MAP(suprtrio_sound_map)
MDRV_MACHINE_START(tumbleb)
MDRV_MACHINE_RESET(tumbleb)
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(60)
@ -2285,11 +2355,17 @@ MACHINE_DRIVER_END
static MACHINE_DRIVER_START( pangpang )
/* driver data */
MDRV_DRIVER_DATA(tumbleb_state)
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M68000, 14000000)
MDRV_CPU_PROGRAM_MAP(pangpang_main_map)
MDRV_CPU_VBLANK_INT("screen", tumbleb2_interrupt)
MDRV_MACHINE_START(tumbleb)
MDRV_MACHINE_RESET(tumbleb)
/* video hardware */
MDRV_SCREEN_ADD("screen", RASTER)
MDRV_SCREEN_REFRESH_RATE(58)
@ -3255,7 +3331,7 @@ static void tumblepb_gfx1_rearrange(running_machine *machine)
int i;
/* gfx data is in the wrong order */
for (i = 0;i < len;i++)
for (i = 0; i < len; i++)
{
if ((i & 0x20) == 0)
{
@ -3263,7 +3339,7 @@ static void tumblepb_gfx1_rearrange(running_machine *machine)
}
}
/* low/high half are also swapped */
for (i = 0;i < len/2;i++)
for (i = 0; i < len/2; i++)
{
int t = rom[i]; rom[i] = rom[i + len/2]; rom[i + len/2] = t;
}
@ -3315,11 +3391,8 @@ static DRIVER_INIT( fncywld )
}
static READ16_HANDLER( bcstory_1a0_read )
{
//mame_printf_debug("bcstory_io %06x\n",cpu_get_pc(space->cpu));
if (cpu_get_pc(space->cpu)==0x0560) return 0x1a0;
@ -3336,6 +3409,7 @@ static DRIVER_INIT ( bcstory )
static DRIVER_INIT( htchctch )
{
tumbleb_state *state = (tumbleb_state *)machine->driver_data;
// UINT16 *HCROM = (UINT16*)memory_region(machine, "maincpu");
UINT16 *PROTDATA = (UINT16*)memory_region(machine, "user1");
int i, len = memory_region_length(machine, "user1");
@ -3347,11 +3421,11 @@ static DRIVER_INIT( htchctch )
// };
// for (i = 0;i < sizeof(htchctch_mcu68k)/sizeof(htchctch_mcu68k[0]);i++)
// tumblepb_mainram[0x000/2 + i] = htchctch_mcu68k[i];
// for (i = 0; i < sizeof(htchctch_mcu68k) / sizeof(htchctch_mcu68k[0]); i++)
// state->mainram[0x000/2 + i] = htchctch_mcu68k[i];
for (i = 0;i < len/2;i++)
tumblepb_mainram[0x000/2 + i] = PROTDATA[i];
for (i = 0; i < len / 2; i++)
state->mainram[0x000/2 + i] = PROTDATA[i];
@ -3595,8 +3669,8 @@ static void suprtrio_decrypt_code(running_machine *machine)
int i;
/* decrypt main ROMs */
memcpy(buf,rom,0x80000);
for (i = 0;i < 0x40000;i++)
memcpy(buf, rom, 0x80000);
for (i = 0; i < 0x40000; i++)
{
int j = i ^ 0x06;
if ((i & 1) == 0) j ^= 0x02;
@ -3613,8 +3687,8 @@ static void suprtrio_decrypt_gfx(running_machine *machine)
int i;
/* decrypt tiles */
memcpy(buf,rom,0x100000);
for (i = 0;i < 0x80000;i++)
memcpy(buf, rom, 0x100000);
for (i = 0; i < 0x80000; i++)
{
int j = i ^ 0x02;
if (i & 1) j ^= 0x04;
@ -3656,22 +3730,22 @@ static DRIVER_INIT ( dquizgo )
/******************************************************************************/
GAME( 1991, tumbleb, tumblep, tumblepb, tumblepb, tumblepb, ROT0, "bootleg", "Tumble Pop (bootleg set 1)", GAME_IMPERFECT_SOUND )
GAME( 1991, tumbleb2, tumblep, tumbleb2, tumblepb, tumbleb2, ROT0, "bootleg", "Tumble Pop (bootleg set 2)", GAME_IMPERFECT_SOUND ) // PIC is protected, sound simulation not 100%
GAME( 1993, jumpkids, 0, jumpkids, tumblepb, jumpkids, ROT0, "Comad", "Jump Kids", 0 )
GAME( 1994, metlsavr, 0, metlsavr, metlsavr, chokchok, ROT0, "First Amusement", "Metal Saver", 0 )
GAME( 1994, pangpang, 0, pangpang, tumblepb, tumbleb2, ROT0, "Dong Gue La Mi Ltd.", "Pang Pang", GAME_IMPERFECT_SOUND ) // PIC is protected, sound simulation not 100%
GAME( 1994, suprtrio, 0, suprtrio, suprtrio, suprtrio, ROT0, "Gameace", "Super Trio", 0 )
GAME( 1991, tumbleb, tumblep, tumblepb, tumblepb, tumblepb, ROT0, "bootleg", "Tumble Pop (bootleg set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
GAME( 1991, tumbleb2, tumblep, tumbleb2, tumblepb, tumbleb2, ROT0, "bootleg", "Tumble Pop (bootleg set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // PIC is protected, sound simulation not 100%
GAME( 1993, jumpkids, 0, jumpkids, tumblepb, jumpkids, ROT0, "Comad", "Jump Kids", GAME_SUPPORTS_SAVE )
GAME( 1994, metlsavr, 0, metlsavr, metlsavr, chokchok, ROT0, "First Amusement", "Metal Saver", GAME_SUPPORTS_SAVE )
GAME( 1994, pangpang, 0, pangpang, tumblepb, tumbleb2, ROT0, "Dong Gue La Mi Ltd.", "Pang Pang", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // PIC is protected, sound simulation not 100%
GAME( 1994, suprtrio, 0, suprtrio, suprtrio, suprtrio, ROT0, "Gameace", "Super Trio", GAME_SUPPORTS_SAVE )
// Should also be 'Magicball Fighting' (c)1994 see http://kmrb.or.kr/Game_Image/1999/%EC%A0%9C1248%ED%98%B8.jpg
GAME( 1995, htchctch, 0, htchctch, htchctch, htchctch, ROT0, "SemiCom", "Hatch Catch" , 0 ) // not 100% sure about gfx offsets
GAME( 1995, cookbib, 0, cookbib, cookbib, htchctch, ROT0, "SemiCom", "Cookie & Bibi" , 0 ) // not 100% sure about gfx offsets
GAME( 1995, chokchok, 0, cookbib, chokchok, chokchok, ROT0, "SemiCom", "Choky! Choky!", GAME_IMPERFECT_GRAPHICS ) // corruption during attract mode (tmap disable?)
GAME( 1995, wlstar, 0, cookbib, wlstar, wlstar, ROT0, "Mijin", "Wonder League Star - Sok-Magicball Fighting (Korea)", 0) // translates to 'Wonder League Star - Return of Magicball Fighting'
GAME( 1996, wondl96, 0, cookbib, wondl96, wlstar, ROT0, "SemiCom", "Wonder League '96 (Korea)", 0)
GAME( 1996, fncywld, 0, fncywld, fncywld, fncywld, ROT0, "Unico", "Fancy World - Earth of Crisis" , 0 ) // game says 1996, testmode 1995?
GAME( 1996, sdfight, 0, sdfight, sdfight, bcstory, ROT0, "SemiCom", "SD Fighters (Korea)", 0)
GAME( 1997, bcstry, 0, bcstory, bcstory, bcstory, ROT0, "SemiCom", "B.C. Story (set 1)", GAME_IMPERFECT_GRAPHICS) // gfx offsets?
GAME( 1997, bcstrya, bcstry, bcstory, bcstory, bcstory, ROT0, "SemiCom", "B.C. Story (set 2)", GAME_IMPERFECT_GRAPHICS) // gfx offsets?
GAME( 1997, semibase, 0, semibase, semibase, bcstory, ROT0, "SemiCom", "MuHanSeungBu (SemiCom Baseball) (Korea)", GAME_IMPERFECT_GRAPHICS)// sprite offsets..
GAME( 1998, dquizgo, 0, cookbib, dquizgo, dquizgo, ROT0, "SemiCom", "Date Quiz Go Go (Korea)", GAME_IMPERFECT_GRAPHICS) // check layer offsets
GAME( 2001, jumppop, 0, jumppop, jumppop, 0, ORIENTATION_FLIP_X, "ESD", "Jumping Pop", 0 )
GAME( 1995, htchctch, 0, htchctch, htchctch, htchctch, ROT0, "SemiCom", "Hatch Catch" , GAME_SUPPORTS_SAVE ) // not 100% sure about gfx offsets
GAME( 1995, cookbib, 0, cookbib, cookbib, htchctch, ROT0, "SemiCom", "Cookie & Bibi" , GAME_SUPPORTS_SAVE ) // not 100% sure about gfx offsets
GAME( 1995, chokchok, 0, cookbib, chokchok, chokchok, ROT0, "SemiCom", "Choky! Choky!", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // corruption during attract mode (tmap disable?)
GAME( 1995, wlstar, 0, cookbib, wlstar, wlstar, ROT0, "Mijin", "Wonder League Star - Sok-Magicball Fighting (Korea)", GAME_SUPPORTS_SAVE ) // translates to 'Wonder League Star - Return of Magicball Fighting'
GAME( 1996, wondl96, 0, cookbib, wondl96, wlstar, ROT0, "SemiCom", "Wonder League '96 (Korea)", GAME_SUPPORTS_SAVE )
GAME( 1996, fncywld, 0, fncywld, fncywld, fncywld, ROT0, "Unico", "Fancy World - Earth of Crisis" , GAME_SUPPORTS_SAVE ) // game says 1996, testmode 1995?
GAME( 1996, sdfight, 0, sdfight, sdfight, bcstory, ROT0, "SemiCom", "SD Fighters (Korea)", GAME_SUPPORTS_SAVE )
GAME( 1997, bcstry, 0, bcstory, bcstory, bcstory, ROT0, "SemiCom", "B.C. Story (set 1)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // gfx offsets?
GAME( 1997, bcstrya, bcstry, bcstory, bcstory, bcstory, ROT0, "SemiCom", "B.C. Story (set 2)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // gfx offsets?
GAME( 1997, semibase, 0, semibase, semibase, bcstory, ROT0, "SemiCom", "MuHanSeungBu (SemiCom Baseball) (Korea)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )// sprite offsets..
GAME( 1998, dquizgo, 0, cookbib, dquizgo, dquizgo, ROT0, "SemiCom", "Date Quiz Go Go (Korea)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE ) // check layer offsets
GAME( 2001, jumppop, 0, jumppop, jumppop, 0, ORIENTATION_FLIP_X, "ESD", "Jumping Pop", GAME_SUPPORTS_SAVE )

View File

@ -47,7 +47,7 @@ Stephh's notes (based on the games M68000 code and some tests) :
#include "sound/3812intf.h"
#include "sound/okim6295.h"
#include "includes/tumblep.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#define TUMBLEP_HACK 0
@ -117,9 +117,9 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x180000, 0x18000f) AM_READ(tumblepop_controls_r)
AM_RANGE(0x18000c, 0x18000d) AM_WRITENOP
AM_RANGE(0x1a0000, 0x1a07ff) AM_RAM AM_BASE_SIZE_MEMBER(tumblep_state, spriteram, spriteram_size)
AM_RANGE(0x300000, 0x30000f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x320000, 0x320fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x322000, 0x322fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x300000, 0x30000f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x320000, 0x320fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x322000, 0x322fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x340000, 0x3407ff) AM_WRITEONLY AM_BASE_MEMBER(tumblep_state, pf1_rowscroll) // unused
AM_RANGE(0x342000, 0x3427ff) AM_WRITEONLY AM_BASE_MEMBER(tumblep_state, pf2_rowscroll) // unused
ADDRESS_MAP_END

View File

@ -14,22 +14,19 @@
#include "sound/2203intf.h"
#include "sound/2151intf.h"
#include "sound/okim6295.h"
#include "video/decodev.h"
VIDEO_UPDATE( vaportra );
WRITE16_HANDLER( vaportra_priority_w );
WRITE16_HANDLER( vaportra_palette_24bit_rg_w );
WRITE16_HANDLER( vaportra_palette_24bit_b_w );
#include "video/deco16ic.h"
#include "includes/vaportra.h"
/******************************************************************************/
static WRITE16_HANDLER( vaportra_sound_w )
{
vaportra_state *state = (vaportra_state *)space->machine->driver_data;
/* Force synchronisation between CPUs with fake timer */
timer_call_after_resynch(space->machine, NULL, 0, NULL);
soundlatch_w(space,0,data & 0xff);
cputag_set_input_line(space->machine, "audiocpu", 0, ASSERT_LINE);
soundlatch_w(space, 0, data & 0xff);
cpu_set_input_line(state->audiocpu, 0, ASSERT_LINE);
}
static READ16_HANDLER( vaportra_control_r )
@ -55,12 +52,12 @@ static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x100000, 0x100003) AM_WRITE(vaportra_priority_w)
AM_RANGE(0x100006, 0x100007) AM_WRITE(vaportra_sound_w)
AM_RANGE(0x100000, 0x10000f) AM_READ(vaportra_control_r)
AM_RANGE(0x200000, 0x201fff) AM_DEVREADWRITE("deco_custom", decodev_pf3_data_r, decodev_pf3_data_w)
AM_RANGE(0x202000, 0x203fff) AM_DEVREADWRITE("deco_custom", decodev_pf4_data_r, decodev_pf4_data_w)
AM_RANGE(0x240000, 0x24000f) AM_DEVWRITE("deco_custom", decodev_pf34_control_w)
AM_RANGE(0x280000, 0x281fff) AM_DEVREADWRITE("deco_custom", decodev_pf1_data_r, decodev_pf1_data_w)
AM_RANGE(0x282000, 0x283fff) AM_DEVREADWRITE("deco_custom", decodev_pf2_data_r, decodev_pf2_data_w)
AM_RANGE(0x2c0000, 0x2c000f) AM_DEVWRITE("deco_custom", decodev_pf12_control_w)
AM_RANGE(0x200000, 0x201fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf3_data_r, deco16ic_pf3_data_w)
AM_RANGE(0x202000, 0x203fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf4_data_r, deco16ic_pf4_data_w)
AM_RANGE(0x240000, 0x24000f) AM_DEVWRITE("deco_custom", deco16ic_pf34_control_w)
AM_RANGE(0x280000, 0x281fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf1_data_r, deco16ic_pf1_data_w)
AM_RANGE(0x282000, 0x283fff) AM_DEVREADWRITE("deco_custom", deco16ic_pf2_data_r, deco16ic_pf2_data_w)
AM_RANGE(0x2c0000, 0x2c000f) AM_DEVWRITE("deco_custom", deco16ic_pf12_control_w)
AM_RANGE(0x300000, 0x3009ff) AM_RAM_WRITE(vaportra_palette_24bit_rg_w) AM_BASE_GENERIC(paletteram)
AM_RANGE(0x304000, 0x3049ff) AM_RAM_WRITE(vaportra_palette_24bit_b_w) AM_BASE_GENERIC(paletteram2)
AM_RANGE(0x308000, 0x308001) AM_NOP
@ -74,7 +71,8 @@ ADDRESS_MAP_END
static READ8_HANDLER( vaportra_soundlatch_r )
{
cputag_set_input_line(space->machine, "audiocpu", 0, CLEAR_LINE);
vaportra_state *state = (vaportra_state *)space->machine->driver_data;
cpu_set_input_line(state->audiocpu, 0, CLEAR_LINE);
return soundlatch_r(space, offset);
}
@ -192,8 +190,6 @@ static const gfx_layout tilelayout =
32*16
};
static GFXDECODE_START( vaportra )
GFXDECODE_ENTRY( "gfx1", 0x000000, charlayout, 0x000, 0x500 ) /* Characters 8x8 */
GFXDECODE_ENTRY( "gfx1", 0x000000, tilelayout, 0x000, 0x500 ) /* Tiles 16x16 */
@ -203,9 +199,10 @@ GFXDECODE_END
/******************************************************************************/
static void sound_irq(running_device *device, int state)
static void sound_irq( running_device *device, int state )
{
cputag_set_input_line(device->machine, "audiocpu", 1, state); /* IRQ 2 */
vaportra_state *driver_state = (vaportra_state *)device->machine->driver_data;
cpu_set_input_line(driver_state->audiocpu, 1, state); /* IRQ 2 */
}
static const ym2151_interface ym2151_config =
@ -233,8 +230,30 @@ static const deco16ic_interface vaportra_deco16ic_intf =
};
static MACHINE_START( vaportra )
{
vaportra_state *state = (vaportra_state *)machine->driver_data;
state->maincpu = devtag_get_device(machine, "maincpu");
state->audiocpu = devtag_get_device(machine, "audiocpu");
state->deco16ic = devtag_get_device(machine, "deco_custom");
state_save_register_global_array(machine, state->priority);
}
static MACHINE_RESET( vaportra )
{
vaportra_state *state = (vaportra_state *)machine->driver_data;
state->priority[0] = 0;
state->priority[1] = 0;
}
static MACHINE_DRIVER_START( vaportra )
/* driver data */
MDRV_DRIVER_DATA(vaportra_state)
/* basic machine hardware */
MDRV_CPU_ADD("maincpu", M68000,12000000) /* Custom chip 59 */
MDRV_CPU_PROGRAM_MAP(main_map)
@ -243,6 +262,9 @@ static MACHINE_DRIVER_START( vaportra )
MDRV_CPU_ADD("audiocpu", H6280, 32220000/4) /* Custom chip 45; Audio section crystal is 32.220 MHz */
MDRV_CPU_PROGRAM_MAP(sound_map)
MDRV_MACHINE_START(vaportra)
MDRV_MACHINE_RESET(vaportra)
/* video hardware */
MDRV_VIDEO_ATTRIBUTES(VIDEO_BUFFERS_SPRITERAM)
@ -784,12 +806,12 @@ static DRIVER_INIT( vaportra )
UINT8 *RAM = memory_region(machine, "maincpu");
int i;
for (i=0x00000; i<0x80000; i++)
RAM[i]=(RAM[i] & 0x7e) | ((RAM[i] & 0x01) << 7) | ((RAM[i] & 0x80) >> 7);
for (i = 0x00000; i < 0x80000; i++)
RAM[i] = (RAM[i] & 0x7e) | ((RAM[i] & 0x01) << 7) | ((RAM[i] & 0x80) >> 7);
}
/******************************************************************************/
GAME( 1989, vaportra, 0, vaportra, vaportra, vaportra, ROT270, "Data East Corporation", "Vapor Trail - Hyper Offence Formation (World revision 1)", 0 )
GAME( 1989, vaportrau,vaportra, vaportra, vaportra, vaportra, ROT270, "Data East USA", "Vapor Trail - Hyper Offence Formation (US)", 0 )
GAME( 1989, kuhga, vaportra, vaportra, vaportra, vaportra, ROT270, "Data East Corporation", "Kuhga - Operation Code 'Vapor Trail' (Japan revision 3)", 0 )
GAME( 1989, vaportra, 0, vaportra, vaportra, vaportra, ROT270, "Data East Corporation", "Vapor Trail - Hyper Offence Formation (World revision 1)", GAME_SUPPORTS_SAVE )
GAME( 1989, vaportrau,vaportra, vaportra, vaportra, vaportra, ROT270, "Data East USA", "Vapor Trail - Hyper Offence Formation (US)", GAME_SUPPORTS_SAVE )
GAME( 1989, kuhga, vaportra, vaportra, vaportra, vaportra, ROT270, "Data East Corporation", "Kuhga - Operation Code 'Vapor Trail' (Japan revision 3)", GAME_SUPPORTS_SAVE )

View File

@ -15,7 +15,7 @@ public:
UINT16 * pf1_rowscroll;
UINT16 * pf2_rowscroll;
UINT16 * spriteram;
// UINT16 * paletteram; // currently this uses generic palette handling (in decodev.c)
// UINT16 * paletteram; // currently this uses generic palette handling (in deco16ic.c)
size_t spriteram_size;
/* devices */

View File

@ -0,0 +1,31 @@
/*************************************************************************
Funky Jet
*************************************************************************/
class funkyjet_state
{
public:
static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, funkyjet_state(machine)); }
funkyjet_state(running_machine &machine) { }
/* memory pointers */
UINT16 * pf1_rowscroll;
UINT16 * pf2_rowscroll;
UINT16 * spriteram;
// UINT16 * paletteram; // currently this uses generic palette handling (in deco16ic.c)
size_t spriteram_size;
/* devices */
running_device *maincpu;
running_device *audiocpu;
running_device *deco16ic;
};
/*----------- defined in video/funkyjet.c -----------*/
VIDEO_UPDATE( funkyjet );

View File

@ -15,7 +15,7 @@ public:
UINT16 * pf1_rowscroll;
UINT16 * pf2_rowscroll;
UINT16 * spriteram;
// UINT16 * paletteram; // currently this uses generic palette handling (in decodev.c)
// UINT16 * paletteram; // currently this uses generic palette handling (in deco16ic.c)
size_t spriteram_size;
UINT16* pktgaldb_fgram;

View File

@ -15,7 +15,7 @@ public:
UINT16 * pf1_rowscroll;
UINT16 * pf2_rowscroll;
UINT16 * spriteram;
// UINT16 * paletteram; // currently this uses generic palette handling (in decodev.c)
// UINT16 * paletteram; // currently this uses generic palette handling (in deco16ic.c)
size_t spriteram_size;
/* video-related */

View File

@ -1,31 +1,41 @@
/*----------- defined in drivers/tumbleb.c -----------*/
extern UINT16* jumppop_control;
extern UINT16* suprtrio_control;
class tumbleb_state
{
public:
static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, tumbleb_state(machine)); }
tumbleb_state(running_machine &machine) { }
/* memory pointers */
UINT16 * pf1_data;
UINT16 * pf2_data;
UINT16 * mainram;
UINT16 * spriteram;
UINT16 * control;
size_t spriteram_size;
// UINT16 * paletteram; // currently this uses generic palette handling
/* misc */
int music_command;
int music_bank;
int music_is_playing;
/* video-related */
tilemap_t *pf1_tilemap,*pf1_alt_tilemap,*pf2_tilemap,*pf2_alt_tilemap;
UINT16 control_0[8];
int flipscreen;
UINT16 tilebank;
int sprite_xoffset;
int sprite_yoffset;
/* devices */
running_device *maincpu;
running_device *audiocpu;
running_device *oki;
};
/*----------- defined in video/tumbleb.c -----------*/
extern UINT16 *tumblepb_pf1_data,*tumblepb_pf2_data;
VIDEO_START( tumblepb );
VIDEO_START( fncywld );
VIDEO_START( jumppop );
VIDEO_START( sdfight );
VIDEO_UPDATE( tumblepb );
VIDEO_UPDATE( jumpkids );
VIDEO_UPDATE( fncywld );
VIDEO_UPDATE( jumppop );
VIDEO_UPDATE( semicom );
VIDEO_UPDATE( semicom_altoffsets );
VIDEO_UPDATE( bcstory );
VIDEO_UPDATE(semibase );
VIDEO_START( suprtrio );
VIDEO_UPDATE( suprtrio );
VIDEO_START( pangpang );
VIDEO_UPDATE( pangpang );
VIDEO_UPDATE( sdfight );
WRITE16_HANDLER( tumblepb_pf1_data_w );
WRITE16_HANDLER( tumblepb_pf2_data_w );
WRITE16_HANDLER( fncywld_pf1_data_w );
@ -38,3 +48,22 @@ WRITE16_HANDLER( bcstory_tilebank_w );
WRITE16_HANDLER( suprtrio_tilebank_w );
WRITE16_HANDLER( chokchok_tilebank_w );
WRITE16_HANDLER( wlstar_tilebank_w );
VIDEO_START( tumblepb );
VIDEO_START( fncywld );
VIDEO_START( jumppop );
VIDEO_START( sdfight );
VIDEO_START( suprtrio );
VIDEO_START( pangpang );
VIDEO_UPDATE( tumblepb );
VIDEO_UPDATE( jumpkids );
VIDEO_UPDATE( fncywld );
VIDEO_UPDATE( jumppop );
VIDEO_UPDATE( semicom );
VIDEO_UPDATE( semicom_altoffsets );
VIDEO_UPDATE( bcstory );
VIDEO_UPDATE(semibase );
VIDEO_UPDATE( suprtrio );
VIDEO_UPDATE( pangpang );
VIDEO_UPDATE( sdfight );

View File

@ -15,7 +15,7 @@ public:
UINT16 * pf1_rowscroll;
UINT16 * pf2_rowscroll;
UINT16 * spriteram;
// UINT16 * paletteram; // currently this uses generic palette handling (in decodev.c)
// UINT16 * paletteram; // currently this uses generic palette handling (in deco16ic.c)
size_t spriteram_size;
/* devices */

View File

@ -0,0 +1,37 @@
/*************************************************************************
Vapour Trail
*************************************************************************/
class vaportra_state
{
public:
static void *alloc(running_machine &machine) { return auto_alloc_clear(&machine, vaportra_state(machine)); }
vaportra_state(running_machine &machine) { }
/* memory pointers */
UINT16 * pf1_rowscroll;
UINT16 * pf2_rowscroll;
UINT16 * pf3_rowscroll;
UINT16 * pf4_rowscroll;
/* misc */
UINT16 priority[2];
/* devices */
running_device *maincpu;
running_device *audiocpu;
running_device *deco16ic;
};
/*----------- defined in video/vaportra.c -----------*/
WRITE16_HANDLER( vaportra_priority_w );
WRITE16_HANDLER( vaportra_palette_24bit_rg_w );
WRITE16_HANDLER( vaportra_palette_24bit_b_w );
VIDEO_UPDATE( vaportra );

View File

@ -592,7 +592,7 @@ $(MAMEOBJ)/dataeast.a: \
$(MACHINE)/deco102.o \
$(MACHINE)/decocrpt.o \
$(MACHINE)/decoprot.o \
$(VIDEO)/decodev.o \
$(VIDEO)/deco16ic.o \
$(MAMEOBJ)/dooyong.a: \
$(DRIVERS)/dooyong.o $(VIDEO)/dooyong.o \

View File

@ -1,5 +1,5 @@
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
UINT16 *boogwing_pf1_rowscroll,*boogwing_pf2_rowscroll;
UINT16 *boogwing_pf3_rowscroll,*boogwing_pf4_rowscroll;
@ -9,7 +9,7 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap,const recta
running_device *deco16ic = devtag_get_device(machine, "deco_custom");
int offs;
int flipscreen=!flip_screen_get(machine);
UINT16 priority = decodev_priority_r(deco16ic, 0, 0xffff);
UINT16 priority = deco16ic_priority_r(deco16ic, 0, 0xffff);
for (offs = 0x400-4;offs >= 0;offs -= 4)
{
@ -122,7 +122,7 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap,const recta
while (multi >= 0)
{
decodev_pdrawgfx(
deco16ic_pdrawgfx(
deco16ic,
bitmap, cliprect, machine->gfx[gfx_region],
sprite - multi * inc,
@ -139,15 +139,15 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap,const recta
VIDEO_UPDATE( boogwing )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = decodev_priority_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = deco16ic_priority_r(deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, boogwing_pf1_rowscroll, boogwing_pf2_rowscroll);
decodev_pf34_update(deco16ic, boogwing_pf3_rowscroll, boogwing_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, boogwing_pf1_rowscroll, boogwing_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, boogwing_pf3_rowscroll, boogwing_pf4_rowscroll);
/* Draw playfields */
decodev_clear_sprite_priority_bitmap(deco16ic);
deco16ic_clear_sprite_priority_bitmap(deco16ic);
bitmap_fill(bitmap, cliprect, screen->machine->pens[0x400]); /* pen not confirmed */
bitmap_fill(screen->machine->priority_bitmap, NULL, 0);
@ -155,34 +155,34 @@ VIDEO_UPDATE( boogwing )
// bit&0x4 combines playfields
if ((priority & 0x7) == 0x5)
{
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_34_combine_draw(deco16ic, bitmap, cliprect, 0, 32);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_34_combine_draw(deco16ic, bitmap, cliprect, 0, 32);
}
else if ((priority & 0x7) == 0x1 || (priority & 0x7) == 0x2)
{
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 8);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 32);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 8);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 32);
}
else if ((priority & 0x7) == 0x3)
{
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 8);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 8);
// This mode uses playfield 3 to shadow sprites & playfield 2 (instead of
// regular alpha-blending, the destination is inverted). Not yet implemented.
// decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 32);
// deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 32);
}
else
{
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 8);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 32);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 8);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 32);
}
draw_sprites(screen->machine, bitmap, cliprect, screen->machine->generic.buffered_spriteram.u16, 3);
draw_sprites(screen->machine, bitmap, cliprect, screen->machine->generic.buffered_spriteram2.u16, 4);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}

View File

@ -5,7 +5,7 @@
***************************************************************************/
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
static int twocrude_pri;
@ -119,29 +119,29 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
VIDEO_UPDATE( twocrude )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, !BIT(flip, 7));
decodev_pf12_update(deco16ic, twocrude_pf1_rowscroll, twocrude_pf2_rowscroll);
decodev_pf34_update(deco16ic, twocrude_pf3_rowscroll, twocrude_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, twocrude_pf1_rowscroll, twocrude_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, twocrude_pf3_rowscroll, twocrude_pf4_rowscroll);
/* Draw playfields & sprites */
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
draw_sprites(screen->machine, bitmap, cliprect, 0);
if (twocrude_pri)
{
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 0);
}
else
{
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 0);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
}
draw_sprites(screen->machine, bitmap, cliprect, 1);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}

View File

@ -5,7 +5,7 @@
****************************************************************************/
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "includes/cninja.h"
UINT16 *cninja_pf1_rowscroll,*cninja_pf2_rowscroll;
@ -18,9 +18,9 @@ VIDEO_START( stoneage )
running_device *deco16ic = devtag_get_device(machine, "deco_custom");
/* The bootleg has broken scroll registers */
decodev_set_scrolldx(deco16ic, 3, 0, -10, -10); /* pf4 16x16 tilemap */
decodev_set_scrolldx(deco16ic, 1, 0, -10, -10); /* pf2 16x16 tilemap */
decodev_set_scrolldx(deco16ic, 0, 1, 2, 2); /* pf1 8x8 tilemap */
deco16ic_set_scrolldx(deco16ic, 3, 0, -10, -10); /* pf4 16x16 tilemap */
deco16ic_set_scrolldx(deco16ic, 1, 0, -10, -10); /* pf2 16x16 tilemap */
deco16ic_set_scrolldx(deco16ic, 0, 1, 2, 2); /* pf1 8x8 tilemap */
}
/******************************************************************************/
@ -374,124 +374,124 @@ static void mutantf_draw_sprites(running_machine *machine, bitmap_t *bitmap, con
VIDEO_UPDATE( cninja )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, cninja_pf1_rowscroll, cninja_pf2_rowscroll);
decodev_pf34_update(deco16ic, cninja_pf3_rowscroll, cninja_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, cninja_pf1_rowscroll, cninja_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, cninja_pf3_rowscroll, cninja_pf4_rowscroll);
/* Draw playfields */
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
bitmap_fill(bitmap, cliprect, 512);
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 2);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 4);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 2);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 4);
cninja_draw_sprites(screen->machine, bitmap, cliprect);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}
VIDEO_UPDATE( cninjabl )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, cninja_pf1_rowscroll, cninja_pf2_rowscroll);
decodev_pf34_update(deco16ic, cninja_pf3_rowscroll, cninja_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, cninja_pf1_rowscroll, cninja_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, cninja_pf3_rowscroll, cninja_pf4_rowscroll);
/* Draw playfields */
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
bitmap_fill(bitmap, cliprect, 512);
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 2);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 4);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 2);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 4);
cninjabl_draw_sprites(screen->machine, bitmap, cliprect);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}
VIDEO_UPDATE( edrandy )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, cninja_pf1_rowscroll, cninja_pf2_rowscroll);
decodev_pf34_update(deco16ic, cninja_pf3_rowscroll, cninja_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, cninja_pf1_rowscroll, cninja_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, cninja_pf3_rowscroll, cninja_pf4_rowscroll);
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
bitmap_fill(bitmap, cliprect, 0);
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 4);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 4);
cninja_draw_sprites(screen->machine, bitmap, cliprect);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}
VIDEO_UPDATE( robocop2 )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = decodev_priority_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = deco16ic_priority_r(deco16ic, 0, 0xffff);
/* One of the tilemap chips can switch between 2 tilemaps at 4bpp, or 1 at 8bpp */
if (priority & 4)
{
decodev_set_tilemap_colour_mask(deco16ic, 2, 0);
decodev_set_tilemap_colour_mask(deco16ic, 3, 0);
decodev_pf34_set_gfxbank(deco16ic, 0, 4);
deco16ic_set_tilemap_colour_mask(deco16ic, 2, 0);
deco16ic_set_tilemap_colour_mask(deco16ic, 3, 0);
deco16ic_pf34_set_gfxbank(deco16ic, 0, 4);
}
else
{
decodev_set_tilemap_colour_mask(deco16ic, 2, 0xf);
decodev_set_tilemap_colour_mask(deco16ic, 3, 0xf);
decodev_pf34_set_gfxbank(deco16ic, 0, 2);
deco16ic_set_tilemap_colour_mask(deco16ic, 2, 0xf);
deco16ic_set_tilemap_colour_mask(deco16ic, 3, 0xf);
deco16ic_pf34_set_gfxbank(deco16ic, 0, 2);
}
/* Update playfields */
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, cninja_pf1_rowscroll, cninja_pf2_rowscroll);
decodev_pf34_update(deco16ic, cninja_pf3_rowscroll, cninja_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, cninja_pf1_rowscroll, cninja_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, cninja_pf3_rowscroll, cninja_pf4_rowscroll);
/* Draw playfields */
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
bitmap_fill(bitmap, cliprect, 0x200);
if ((priority & 4) == 0)
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
/* Switchable priority */
switch (priority & 0x8)
{
case 8:
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 4);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 4);
break;
default:
case 0:
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 4);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 4);
break;
}
robocop2_draw_sprites(screen->machine, bitmap, cliprect);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}
VIDEO_UPDATE( mutantf )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = decodev_priority_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = deco16ic_priority_r(deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, cninja_pf1_rowscroll, cninja_pf2_rowscroll);
decodev_pf34_update(deco16ic, cninja_pf3_rowscroll, cninja_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, cninja_pf1_rowscroll, cninja_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, cninja_pf3_rowscroll, cninja_pf4_rowscroll);
/* Draw playfields */
bitmap_fill(bitmap, cliprect, 0x400); /* Confirmed */
@ -507,9 +507,9 @@ VIDEO_UPDATE( mutantf )
The other bits may control alpha blend on the 2nd sprite chip, or
layer order.
*/
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 0);
/* We need to abuse the priority bitmap a little by clearing it before
drawing each sprite layer. This is because there is no priority
@ -531,6 +531,6 @@ VIDEO_UPDATE( mutantf )
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
mutantf_draw_sprites(screen->machine, bitmap, cliprect, screen->machine->generic.buffered_spriteram.u16, 3);
}
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}

View File

@ -5,7 +5,7 @@
****************************************************************************/
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
UINT16 *dassault_pf2_rowscroll,*dassault_pf4_rowscroll;
@ -156,7 +156,7 @@ static void draw_sprites( running_machine* machine, bitmap_t *bitmap, const rect
while (multi >= 0)
{
decodev_pdrawgfx(
deco16ic_pdrawgfx(
deco16ic,
bitmap,cliprect,machine->gfx[gfxbank],
sprite - multi * inc,
@ -176,35 +176,35 @@ static void draw_sprites( running_machine* machine, bitmap_t *bitmap, const rect
VIDEO_UPDATE( dassault )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = decodev_priority_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = deco16ic_priority_r(deco16ic, 0, 0xffff);
/* Update tilemaps */
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, 0, dassault_pf2_rowscroll);
decodev_pf34_update(deco16ic, 0, dassault_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, 0, dassault_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, 0, dassault_pf4_rowscroll);
/* Draw playfields/update priority bitmap */
decodev_clear_sprite_priority_bitmap(deco16ic);
deco16ic_clear_sprite_priority_bitmap(deco16ic);
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
bitmap_fill(bitmap, cliprect, screen->machine->pens[3072]);
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
/* The middle playfields can be swapped priority-wise */
if ((priority & 3) == 0)
{
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 16);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 16);
}
else if ((priority & 3) == 1)
{
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 64);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 64);
}
else if ((priority & 3) == 3)
{
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 16);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 16);
}
else
{
@ -213,6 +213,6 @@ VIDEO_UPDATE( dassault )
/* Draw sprites - two sprite generators, with selectable priority */
draw_sprites(screen->machine, bitmap, cliprect, priority);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}

View File

@ -146,7 +146,7 @@ Rowscroll style:
***************************************************************************/
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "ui.h"
#if 0
@ -228,7 +228,7 @@ INLINE const deco16ic_interface *get_interface( running_device *device )
/* Later games have double buffered paletteram - the real palette ram is
only updated on a DMA call */
WRITE16_DEVICE_HANDLER( decodev_nonbuffered_palette_w )
WRITE16_DEVICE_HANDLER( deco16ic_nonbuffered_palette_w )
{
int r,g,b;
@ -242,7 +242,7 @@ WRITE16_DEVICE_HANDLER( decodev_nonbuffered_palette_w )
palette_set_color(device->machine, offset / 2, MAKE_RGB(r,g,b));
}
WRITE16_DEVICE_HANDLER( decodev_buffered_palette_w )
WRITE16_DEVICE_HANDLER( deco16ic_buffered_palette_w )
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -251,7 +251,7 @@ WRITE16_DEVICE_HANDLER( decodev_buffered_palette_w )
deco16ic->dirty_palette[offset / 2] = 1;
}
WRITE16_DEVICE_HANDLER( decodev_palette_dma_w )
WRITE16_DEVICE_HANDLER( deco16ic_palette_dma_w )
{
deco16ic_state *deco16ic = get_safe_token(device);
const int m = device->machine->config->total_colors;
@ -275,18 +275,18 @@ WRITE16_DEVICE_HANDLER( decodev_palette_dma_w )
/*****************************************************************************************/
/* */
READ16_DEVICE_HANDLER( decodev_71_r )
READ16_DEVICE_HANDLER( deco16ic_71_r )
{
return 0xffff;
}
WRITE16_DEVICE_HANDLER( decodev_priority_w )
WRITE16_DEVICE_HANDLER( deco16ic_priority_w )
{
deco16ic_state *deco16ic = get_safe_token(device);
deco16ic->priority = data;
}
READ16_DEVICE_HANDLER( decodev_priority_r )
READ16_DEVICE_HANDLER( deco16ic_priority_r )
{
deco16ic_state *deco16ic = get_safe_token(device);
return deco16ic->priority;
@ -589,7 +589,7 @@ static void custom_tilemap_draw(
/******************************************************************************/
/* robocop 2 can switch between 2 tilemaps at 4bpp, or 1 at 8bpp */
void decodev_set_tilemap_colour_mask( running_device *device, int tmap, int mask )
void deco16ic_set_tilemap_colour_mask( running_device *device, int tmap, int mask )
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -602,7 +602,7 @@ void decodev_set_tilemap_colour_mask( running_device *device, int tmap, int mask
}
}
void decodev_pf34_set_gfxbank( running_device *device, int small, int big )
void deco16ic_pf34_set_gfxbank( running_device *device, int small, int big )
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -619,7 +619,7 @@ void decodev_pf34_set_gfxbank( running_device *device, int small, int big )
}
/* stoneage has broken scroll registers */
void decodev_set_scrolldx( running_device *device, int tmap, int size, int dx, int dx_if_flipped )
void deco16ic_set_scrolldx( running_device *device, int tmap, int size, int dx, int dx_if_flipped )
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -650,7 +650,7 @@ void decodev_set_scrolldx( running_device *device, int tmap, int size, int dx, i
/******************************************************************************/
WRITE16_DEVICE_HANDLER( decodev_pf1_data_w )
WRITE16_DEVICE_HANDLER( deco16ic_pf1_data_w )
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -661,7 +661,7 @@ WRITE16_DEVICE_HANDLER( decodev_pf1_data_w )
tilemap_mark_tile_dirty(deco16ic->pf1_tilemap_16x16, offset);
}
WRITE16_DEVICE_HANDLER( decodev_pf2_data_w )
WRITE16_DEVICE_HANDLER( deco16ic_pf2_data_w )
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -672,7 +672,7 @@ WRITE16_DEVICE_HANDLER( decodev_pf2_data_w )
tilemap_mark_tile_dirty(deco16ic->pf2_tilemap_16x16, offset);
}
WRITE16_DEVICE_HANDLER( decodev_pf3_data_w )
WRITE16_DEVICE_HANDLER( deco16ic_pf3_data_w )
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -680,7 +680,7 @@ WRITE16_DEVICE_HANDLER( decodev_pf3_data_w )
tilemap_mark_tile_dirty(deco16ic->pf3_tilemap_16x16, offset);
}
WRITE16_DEVICE_HANDLER( decodev_pf4_data_w )
WRITE16_DEVICE_HANDLER( deco16ic_pf4_data_w )
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -688,115 +688,115 @@ WRITE16_DEVICE_HANDLER( decodev_pf4_data_w )
tilemap_mark_tile_dirty(deco16ic->pf4_tilemap_16x16, offset);
}
READ16_DEVICE_HANDLER( decodev_pf1_data_r )
READ16_DEVICE_HANDLER( deco16ic_pf1_data_r )
{
deco16ic_state *deco16ic = get_safe_token(device);
return deco16ic->pf1_data[offset];
}
READ16_DEVICE_HANDLER( decodev_pf2_data_r )
READ16_DEVICE_HANDLER( deco16ic_pf2_data_r )
{
deco16ic_state *deco16ic = get_safe_token(device);
return deco16ic->pf2_data[offset];
}
READ16_DEVICE_HANDLER( decodev_pf3_data_r )
READ16_DEVICE_HANDLER( deco16ic_pf3_data_r )
{
deco16ic_state *deco16ic = get_safe_token(device);
return deco16ic->pf3_data[offset];
}
READ16_DEVICE_HANDLER( decodev_pf4_data_r )
READ16_DEVICE_HANDLER( deco16ic_pf4_data_r )
{
deco16ic_state *deco16ic = get_safe_token(device);
return deco16ic->pf4_data[offset];
}
WRITE16_DEVICE_HANDLER( decodev_pf12_control_w )
WRITE16_DEVICE_HANDLER( deco16ic_pf12_control_w )
{
deco16ic_state *deco16ic = get_safe_token(device);
COMBINE_DATA(&deco16ic->pf12_control[offset]);
}
WRITE16_DEVICE_HANDLER( decodev_pf34_control_w )
WRITE16_DEVICE_HANDLER( deco16ic_pf34_control_w )
{
deco16ic_state *deco16ic = get_safe_token(device);
COMBINE_DATA(&deco16ic->pf34_control[offset]);
}
READ16_DEVICE_HANDLER( decodev_pf12_control_r )
READ16_DEVICE_HANDLER( deco16ic_pf12_control_r )
{
deco16ic_state *deco16ic = get_safe_token(device);
return deco16ic->pf12_control[offset];
}
READ16_DEVICE_HANDLER( decodev_pf34_control_r )
READ16_DEVICE_HANDLER( deco16ic_pf34_control_r )
{
deco16ic_state *deco16ic = get_safe_token(device);
return deco16ic->pf34_control[offset];
}
READ32_DEVICE_HANDLER ( decodev_pf12_control_dword_r )
READ32_DEVICE_HANDLER ( deco16ic_pf12_control_dword_r )
{
return decodev_pf12_control_r(device, offset, 0xffff)^0xffff0000;
return deco16ic_pf12_control_r(device, offset, 0xffff)^0xffff0000;
}
WRITE32_DEVICE_HANDLER( decodev_pf12_control_dword_w )
WRITE32_DEVICE_HANDLER( deco16ic_pf12_control_dword_w )
{
decodev_pf12_control_w(device, offset, data & 0xffff, mem_mask & 0xffff);
deco16ic_pf12_control_w(device, offset, data & 0xffff, mem_mask & 0xffff);
}
READ32_DEVICE_HANDLER ( decodev_pf34_control_dword_r )
READ32_DEVICE_HANDLER ( deco16ic_pf34_control_dword_r )
{
return decodev_pf34_control_r(device, offset, 0xffff)^0xffff0000;
return deco16ic_pf34_control_r(device, offset, 0xffff)^0xffff0000;
}
WRITE32_DEVICE_HANDLER( decodev_pf34_control_dword_w )
WRITE32_DEVICE_HANDLER( deco16ic_pf34_control_dword_w )
{
decodev_pf34_control_w(device, offset, data & 0xffff, mem_mask & 0xffff);
deco16ic_pf34_control_w(device, offset, data & 0xffff, mem_mask & 0xffff);
}
READ32_DEVICE_HANDLER( decodev_pf1_data_dword_r )
READ32_DEVICE_HANDLER( deco16ic_pf1_data_dword_r )
{
return decodev_pf1_data_r(device, offset, 0xffff)^0xffff0000;
return deco16ic_pf1_data_r(device, offset, 0xffff)^0xffff0000;
}
WRITE32_DEVICE_HANDLER( decodev_pf1_data_dword_w )
WRITE32_DEVICE_HANDLER( deco16ic_pf1_data_dword_w )
{
decodev_pf1_data_w(device, offset, data & 0xffff, mem_mask & 0xffff);
deco16ic_pf1_data_w(device, offset, data & 0xffff, mem_mask & 0xffff);
}
READ32_DEVICE_HANDLER( decodev_pf2_data_dword_r )
READ32_DEVICE_HANDLER( deco16ic_pf2_data_dword_r )
{
return decodev_pf2_data_r(device, offset, 0xffff)^0xffff0000;
return deco16ic_pf2_data_r(device, offset, 0xffff)^0xffff0000;
}
WRITE32_DEVICE_HANDLER( decodev_pf2_data_dword_w )
WRITE32_DEVICE_HANDLER( deco16ic_pf2_data_dword_w )
{
decodev_pf2_data_w(device, offset, data & 0xffff, mem_mask & 0xffff);
deco16ic_pf2_data_w(device, offset, data & 0xffff, mem_mask & 0xffff);
}
READ32_DEVICE_HANDLER( decodev_pf3_data_dword_r )
READ32_DEVICE_HANDLER( deco16ic_pf3_data_dword_r )
{
return decodev_pf3_data_r(device, offset, 0xffff)^0xffff0000;
return deco16ic_pf3_data_r(device, offset, 0xffff)^0xffff0000;
}
WRITE32_DEVICE_HANDLER( decodev_pf3_data_dword_w )
WRITE32_DEVICE_HANDLER( deco16ic_pf3_data_dword_w )
{
decodev_pf3_data_w(device, offset, data & 0xffff, mem_mask & 0xffff);
deco16ic_pf3_data_w(device, offset, data & 0xffff, mem_mask & 0xffff);
}
READ32_DEVICE_HANDLER( decodev_pf4_data_dword_r )
READ32_DEVICE_HANDLER( deco16ic_pf4_data_dword_r )
{
return decodev_pf4_data_r(device, offset, 0xffff)^0xffff0000;
return deco16ic_pf4_data_r(device, offset, 0xffff)^0xffff0000;
}
WRITE32_DEVICE_HANDLER( decodev_pf4_data_dword_w )
WRITE32_DEVICE_HANDLER( deco16ic_pf4_data_dword_w )
{
decodev_pf4_data_w(device, offset, data & 0xffff, mem_mask & 0xffff);
deco16ic_pf4_data_w(device, offset, data & 0xffff, mem_mask & 0xffff);
}
@ -970,7 +970,7 @@ static int deco16_pf_update(
return use_custom;
}
void decodev_pf12_update( running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr )
void deco16ic_pf12_update( running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr )
{
deco16ic_state *deco16ic = get_safe_token(device);
int bank1, bank2;
@ -1013,7 +1013,7 @@ void decodev_pf12_update( running_device *device, const UINT16 *rowscroll_1_ptr,
}
}
void decodev_pf34_update( running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr )
void deco16ic_pf34_update( running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr )
{
deco16ic_state *deco16ic = get_safe_token(device);
int bank1, bank2;
@ -1052,7 +1052,7 @@ void decodev_pf34_update( running_device *device, const UINT16 *rowscroll_1_ptr,
/*****************************************************************************************/
void decodev_print_debug_info(running_device *device, bitmap_t *bitmap)
void deco16ic_print_debug_info(running_device *device, bitmap_t *bitmap)
{
deco16ic_state *deco16ic = get_safe_token(device);
char buf[64*5];
@ -1083,7 +1083,7 @@ void decodev_print_debug_info(running_device *device, bitmap_t *bitmap)
/*****************************************************************************************/
void decodev_clear_sprite_priority_bitmap( running_device *device )
void deco16ic_clear_sprite_priority_bitmap( running_device *device )
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -1092,7 +1092,7 @@ void decodev_clear_sprite_priority_bitmap( running_device *device )
}
/* A special pdrawgfx z-buffered sprite renderer that is needed to properly draw multiple sprite sources with alpha */
void decodev_pdrawgfx(
void deco16ic_pdrawgfx(
running_device *device,
bitmap_t *dest, const rectangle *clip, const gfx_element *gfx,
UINT32 code, UINT32 color, int flipx, int flipy, int sx, int sy,
@ -1163,7 +1163,7 @@ void decodev_pdrawgfx(
/*****************************************************************************************/
void decodev_tilemap_1_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority )
void deco16ic_tilemap_1_draw( running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority )
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -1180,7 +1180,7 @@ void decodev_tilemap_1_draw( running_device *device, bitmap_t *bitmap, const rec
}
}
void decodev_tilemap_2_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority)
void deco16ic_tilemap_2_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority)
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -1197,7 +1197,7 @@ void decodev_tilemap_2_draw(running_device *device, bitmap_t *bitmap, const rect
}
}
void decodev_tilemap_3_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority)
void deco16ic_tilemap_3_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority)
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -1207,7 +1207,7 @@ void decodev_tilemap_3_draw(running_device *device, bitmap_t *bitmap, const rect
tilemap_draw(bitmap, cliprect, deco16ic->pf3_tilemap_16x16, flags, priority);
}
void decodev_tilemap_4_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority)
void deco16ic_tilemap_4_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority)
{
deco16ic_state *deco16ic = get_safe_token(device);
@ -1220,7 +1220,7 @@ void decodev_tilemap_4_draw(running_device *device, bitmap_t *bitmap, const rect
/*****************************************************************************************/
// Combines the output of two 4BPP tilemaps into an 8BPP tilemap
void decodev_tilemap_34_combine_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority)
void deco16ic_tilemap_34_combine_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority)
{
deco16ic_state *deco16ic = get_safe_token(device);
custom_tilemap_draw(device, bitmap, 0, deco16ic->pf3_tilemap_16x16, 0, deco16ic->pf4_tilemap_16x16, deco16ic->pf3_rowscroll_ptr, deco16ic->pf34_control[1], deco16ic->pf34_control[2], deco16ic->pf34_control[5] & 0xff, deco16ic->pf34_control[6] & 0xff, 0xf, 4, 0xff, flags, priority);

124
src/mame/video/deco16ic.h Normal file
View File

@ -0,0 +1,124 @@
/*************************************************************************
deco16ic.h
Implementation of various Data East custom 16bit video ICs
**************************************************************************/
#include "devcb.h"
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
typedef int (*deco16_bank_cb)( const int bank );
typedef struct _deco16ic_interface deco16ic_interface;
struct _deco16ic_interface
{
const char *screen;
int pf12_only;
int split;
int full_width;
int trans_mask1, trans_mask2, trans_mask3, trans_mask4;
int col_base1, col_base2, col_base3, col_base4;
int col_mask1, col_mask2, col_mask3, col_mask4;
deco16_bank_cb bank_cb0, bank_cb1, bank_cb2, bank_cb3;
};
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
DEVICE_GET_INFO( deco16ic );
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define DECO16IC DEVICE_GET_INFO_NAME( deco16ic )
#define MDRV_DECO16IC_ADD(_tag, _interface) \
MDRV_DEVICE_ADD(_tag, DECO16IC, 0) \
MDRV_DEVICE_CONFIG(_interface)
/***************************************************************************
DEVICE I/O FUNCTIONS
***************************************************************************/
WRITE16_DEVICE_HANDLER( deco16ic_pf1_data_w );
WRITE16_DEVICE_HANDLER( deco16ic_pf2_data_w );
WRITE16_DEVICE_HANDLER( deco16ic_pf3_data_w );
WRITE16_DEVICE_HANDLER( deco16ic_pf4_data_w );
READ16_DEVICE_HANDLER( deco16ic_pf1_data_r );
READ16_DEVICE_HANDLER( deco16ic_pf2_data_r );
READ16_DEVICE_HANDLER( deco16ic_pf3_data_r );
READ16_DEVICE_HANDLER( deco16ic_pf4_data_r );
WRITE16_DEVICE_HANDLER( deco16ic_pf12_control_w );
WRITE16_DEVICE_HANDLER( deco16ic_pf34_control_w );
READ16_DEVICE_HANDLER( deco16ic_pf12_control_r );
READ16_DEVICE_HANDLER( deco16ic_pf34_control_r );
WRITE32_DEVICE_HANDLER( deco16ic_pf1_data_dword_w );
WRITE32_DEVICE_HANDLER( deco16ic_pf2_data_dword_w );
WRITE32_DEVICE_HANDLER( deco16ic_pf3_data_dword_w );
WRITE32_DEVICE_HANDLER( deco16ic_pf4_data_dword_w );
READ32_DEVICE_HANDLER( deco16ic_pf1_data_dword_r );
READ32_DEVICE_HANDLER( deco16ic_pf2_data_dword_r );
READ32_DEVICE_HANDLER( deco16ic_pf3_data_dword_r );
READ32_DEVICE_HANDLER( deco16ic_pf4_data_dword_r );
WRITE32_DEVICE_HANDLER( deco16ic_pf12_control_dword_w );
WRITE32_DEVICE_HANDLER( deco16ic_pf34_control_dword_w );
READ32_DEVICE_HANDLER( deco16ic_pf12_control_dword_r );
READ32_DEVICE_HANDLER( deco16ic_pf34_control_dword_r );
WRITE16_DEVICE_HANDLER( deco16ic_nonbuffered_palette_w );
WRITE16_DEVICE_HANDLER( deco16ic_buffered_palette_w );
WRITE16_DEVICE_HANDLER( deco16ic_palette_dma_w );
WRITE16_DEVICE_HANDLER( deco16ic_priority_w );
READ16_DEVICE_HANDLER( deco16ic_priority_r );
READ16_DEVICE_HANDLER( deco16ic_71_r );
void deco16ic_print_debug_info(running_device *device, bitmap_t *bitmap);
void deco16ic_pf12_update(running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr);
void deco16ic_pf34_update(running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr);
void deco16ic_tilemap_1_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority);
void deco16ic_tilemap_2_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority);
void deco16ic_tilemap_3_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority);
void deco16ic_tilemap_4_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority);
/* used by boogwing, nitrobal */
void deco16ic_tilemap_34_combine_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority);
/* used by boogwing, dassault, nitrobal */
void deco16ic_clear_sprite_priority_bitmap(running_device *device);
void deco16ic_pdrawgfx(
running_device *device,
bitmap_t *dest,const rectangle *clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
int transparent_color,UINT32 pri_mask,UINT32 sprite_mask,UINT8 write_pri,UINT8 alpha);
/* used by robocop2 */
void deco16ic_set_tilemap_colour_mask(running_device *device, int tmap, int mask);
void deco16ic_pf34_set_gfxbank(running_device *device, int small, int big);
/* used by stoneage */
void deco16ic_set_scrolldx(running_device *device, int tmap, int size, int dx, int dx_if_flipped);

View File

@ -1,124 +0,0 @@
/*************************************************************************
decodev.h
Implementation of various Data East custom video ICs
**************************************************************************/
#include "devcb.h"
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
typedef int (*deco16_bank_cb)( const int bank );
typedef struct _deco16ic_interface deco16ic_interface;
struct _deco16ic_interface
{
const char *screen;
int pf12_only;
int split;
int full_width;
int trans_mask1, trans_mask2, trans_mask3, trans_mask4;
int col_base1, col_base2, col_base3, col_base4;
int col_mask1, col_mask2, col_mask3, col_mask4;
deco16_bank_cb bank_cb0, bank_cb1, bank_cb2, bank_cb3;
};
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
DEVICE_GET_INFO( deco16ic );
/***************************************************************************
DEVICE CONFIGURATION MACROS
***************************************************************************/
#define DECO16IC DEVICE_GET_INFO_NAME( deco16ic )
#define MDRV_DECO16IC_ADD(_tag, _interface) \
MDRV_DEVICE_ADD(_tag, DECO16IC, 0) \
MDRV_DEVICE_CONFIG(_interface)
/***************************************************************************
DEVICE I/O FUNCTIONS
***************************************************************************/
WRITE16_DEVICE_HANDLER( decodev_pf1_data_w );
WRITE16_DEVICE_HANDLER( decodev_pf2_data_w );
WRITE16_DEVICE_HANDLER( decodev_pf3_data_w );
WRITE16_DEVICE_HANDLER( decodev_pf4_data_w );
READ16_DEVICE_HANDLER( decodev_pf1_data_r );
READ16_DEVICE_HANDLER( decodev_pf2_data_r );
READ16_DEVICE_HANDLER( decodev_pf3_data_r );
READ16_DEVICE_HANDLER( decodev_pf4_data_r );
WRITE16_DEVICE_HANDLER( decodev_pf12_control_w );
WRITE16_DEVICE_HANDLER( decodev_pf34_control_w );
READ16_DEVICE_HANDLER( decodev_pf12_control_r );
READ16_DEVICE_HANDLER( decodev_pf34_control_r );
WRITE32_DEVICE_HANDLER( decodev_pf1_data_dword_w );
WRITE32_DEVICE_HANDLER( decodev_pf2_data_dword_w );
WRITE32_DEVICE_HANDLER( decodev_pf3_data_dword_w );
WRITE32_DEVICE_HANDLER( decodev_pf4_data_dword_w );
READ32_DEVICE_HANDLER( decodev_pf1_data_dword_r );
READ32_DEVICE_HANDLER( decodev_pf2_data_dword_r );
READ32_DEVICE_HANDLER( decodev_pf3_data_dword_r );
READ32_DEVICE_HANDLER( decodev_pf4_data_dword_r );
WRITE32_DEVICE_HANDLER( decodev_pf12_control_dword_w );
WRITE32_DEVICE_HANDLER( decodev_pf34_control_dword_w );
READ32_DEVICE_HANDLER( decodev_pf12_control_dword_r );
READ32_DEVICE_HANDLER( decodev_pf34_control_dword_r );
WRITE16_DEVICE_HANDLER( decodev_nonbuffered_palette_w );
WRITE16_DEVICE_HANDLER( decodev_buffered_palette_w );
WRITE16_DEVICE_HANDLER( decodev_palette_dma_w );
WRITE16_DEVICE_HANDLER( decodev_priority_w );
READ16_DEVICE_HANDLER( decodev_priority_r );
READ16_DEVICE_HANDLER( decodev_71_r );
void decodev_print_debug_info(running_device *device, bitmap_t *bitmap);
void decodev_pf12_update(running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr);
void decodev_pf34_update(running_device *device, const UINT16 *rowscroll_1_ptr, const UINT16 *rowscroll_2_ptr);
void decodev_tilemap_1_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority);
void decodev_tilemap_2_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority);
void decodev_tilemap_3_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority);
void decodev_tilemap_4_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority);
/* used by boogwing, nitrobal */
void decodev_tilemap_34_combine_draw(running_device *device, bitmap_t *bitmap, const rectangle *cliprect, int flags, UINT32 priority);
/* used by boogwing, dassault, nitrobal */
void decodev_clear_sprite_priority_bitmap(running_device *device);
void decodev_pdrawgfx(
running_device *device,
bitmap_t *dest,const rectangle *clip,const gfx_element *gfx,
UINT32 code,UINT32 color,int flipx,int flipy,int sx,int sy,
int transparent_color,UINT32 pri_mask,UINT32 sprite_mask,UINT8 write_pri,UINT8 alpha);
/* used by robocop2 */
void decodev_set_tilemap_colour_mask(running_device *device, int tmap, int mask);
void decodev_pf34_set_gfxbank(running_device *device, int small, int big);
/* used by stoneage */
void decodev_set_scrolldx(running_device *device, int tmap, int size, int dx, int dx_if_flipped);

View File

@ -1,5 +1,5 @@
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "includes/dietgo.h"
@ -75,15 +75,15 @@ static void draw_sprites( running_machine* machine, bitmap_t *bitmap, const rect
VIDEO_UPDATE( dietgo )
{
dietgo_state *state = (dietgo_state *)screen->machine->driver_data;
UINT16 flip = decodev_pf12_control_r(state->deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(state->deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
deco16ic_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
bitmap_fill(bitmap, cliprect, 256); /* not verified */
decodev_tilemap_2_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_2_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
draw_sprites(screen->machine, bitmap, cliprect);
return 0;

View File

@ -5,29 +5,30 @@
***************************************************************************/
#include "emu.h"
#include "video/decodev.h"
UINT16 *funkyjet_pf1_rowscroll,*funkyjet_pf2_rowscroll;
#include "includes/funkyjet.h"
#include "video/deco16ic.h"
/******************************************************************************/
static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
{
UINT16 *spriteram16 = machine->generic.spriteram.u16;
funkyjet_state *state = (funkyjet_state *)machine->driver_data;
UINT16 *spriteram = state->spriteram;
int offs;
for (offs = 0;offs < 0x400;offs += 4)
for (offs = 0; offs < 0x400; offs += 4)
{
int x,y,sprite,colour,multi,fx,fy,inc,flash,mult;
int x, y,sprite, colour, multi, fx, fy, inc, flash, mult;
sprite = spriteram16[offs+1] & 0x3fff;
sprite = spriteram[offs + 1] & 0x3fff;
y = spriteram16[offs];
flash=y&0x1000;
if (flash && (video_screen_get_frame_number(machine->primary_screen) & 1)) continue;
y = spriteram[offs];
flash = y & 0x1000;
if (flash && (video_screen_get_frame_number(machine->primary_screen) & 1))
continue;
x = spriteram16[offs+2];
colour = (x >>9) & 0x1f;
x = spriteram[offs + 2];
colour = (x >> 9) & 0x1f;
fx = y & 0x2000;
fy = y & 0x4000;
@ -40,7 +41,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
y = 240 - y;
x = 304 - x;
if (x>320) continue;
if (x > 320)
continue;
sprite &= ~multi;
if (fy)
@ -53,13 +55,14 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
if (flip_screen_get(machine))
{
y=240-y;
x=304-x;
if (fx) fx=0; else fx=1;
if (fy) fy=0; else fy=1;
mult=16;
y = 240 - y;
x = 304 - x;
if (fx) fx = 0; else fx = 1;
if (fy) fy = 0; else fy = 1;
mult = 16;
}
else mult=-16;
else
mult = -16;
while (multi >= 0)
{
@ -76,15 +79,15 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
VIDEO_UPDATE( funkyjet )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
funkyjet_state *state = (funkyjet_state *)screen->machine->driver_data;
UINT16 flip = deco16ic_pf12_control_r(state->deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, funkyjet_pf1_rowscroll, funkyjet_pf2_rowscroll);
deco16ic_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
bitmap_fill(bitmap, cliprect, 768);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_2_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
draw_sprites(screen->machine, bitmap, cliprect);
return 0;
}

View File

@ -1,5 +1,5 @@
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "includes/pktgaldx.h"
static void draw_sprites( running_machine *machine, bitmap_t *bitmap,const rectangle *cliprect )
@ -76,17 +76,17 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap,const recta
VIDEO_UPDATE( pktgaldx )
{
pktgaldx_state *state = (pktgaldx_state *)screen->machine->driver_data;
UINT16 flip = decodev_pf12_control_r(state->deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(state->deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
deco16ic_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
bitmap_fill(bitmap, cliprect, 0); /* not Confirmed */
bitmap_fill(screen->machine->priority_bitmap, NULL, 0);
decodev_tilemap_2_draw(state->deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_2_draw(state->deco16ic, bitmap, cliprect, 0, 0);
draw_sprites(screen->machine, bitmap, cliprect);
decodev_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
return 0;
}

View File

@ -5,7 +5,7 @@
***************************************************************************/
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
static UINT16 * rohga_spriteram;
@ -207,7 +207,7 @@ static void nitrobal_draw_sprites(running_machine *machine, bitmap_t *bitmap, co
{
running_device *deco16ic = devtag_get_device(machine, "deco_custom");
int offs,end,inc;
UINT16 priority = decodev_priority_r(deco16ic, 0, 0xffff);
UINT16 priority = deco16ic_priority_r(deco16ic, 0, 0xffff);
/*
Alternate format from most 16 bit games - same as Captain America and Mutant Fighter
@ -382,7 +382,7 @@ sprite 2:
for (x=0; x<w; x++) {
for (y=0; y<h; y++) {
decodev_pdrawgfx(
deco16ic_pdrawgfx(
deco16ic,
bitmap,cliprect,machine->gfx[gfxbank],
sprite + y + h * x,
@ -402,13 +402,13 @@ sprite 2:
static void update_rohga(running_device *screen, bitmap_t *bitmap, const rectangle *cliprect, int is_schmeisr)
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = decodev_priority_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = deco16ic_priority_r(deco16ic, 0, 0xffff);
/* Update playfields */
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, rohga_pf1_rowscroll, rohga_pf2_rowscroll);
decodev_pf34_update(deco16ic, rohga_pf3_rowscroll, rohga_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, rohga_pf1_rowscroll, rohga_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, rohga_pf3_rowscroll, rohga_pf4_rowscroll);
/* Draw playfields */
bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
@ -420,30 +420,30 @@ static void update_rohga(running_device *screen, bitmap_t *bitmap, const rectang
if (priority & 4)
{
// Draw as 1 8BPP layer
decodev_tilemap_34_combine_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 3);
deco16ic_tilemap_34_combine_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 3);
}
else
{
// Draw as 2 4BPP layers
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 2);
}
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 4);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 4);
break;
case 1:
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 4);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 4);
break;
case 2:
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 4);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 4);
break;
}
rohga_draw_sprites(screen->machine, bitmap, cliprect, rohga_spriteram, is_schmeisr);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
}
VIDEO_UPDATE( rohga )
@ -463,58 +463,58 @@ VIDEO_UPDATE( schmeisr )
VIDEO_UPDATE( wizdfire )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = decodev_priority_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 priority = deco16ic_priority_r(deco16ic, 0, 0xffff);
/* Update playfields */
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, 0, 0);
decodev_pf34_update(deco16ic, rohga_pf3_rowscroll, rohga_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, 0, 0);
deco16ic_pf34_update(deco16ic, rohga_pf3_rowscroll, rohga_pf4_rowscroll);
/* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */
bitmap_fill(bitmap, cliprect, screen->machine->pens[512]);
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
wizdfire_draw_sprites(screen->machine, bitmap, cliprect, screen->machine->generic.buffered_spriteram.u16, 4, 3);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
wizdfire_draw_sprites(screen->machine, bitmap, cliprect, screen->machine->generic.buffered_spriteram.u16, 3, 3);
if ((priority & 0x1f) == 0x1f) /* Wizdfire has bit 0x40 always set, Dark Seal 2 doesn't?! */
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 0);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_ALPHA(0x80), 0);
else
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 0);
/* See notes in wizdfire_draw_sprites about this */
wizdfire_draw_sprites(screen->machine, bitmap, cliprect, screen->machine->generic.buffered_spriteram.u16, 0, 3);
wizdfire_draw_sprites(screen->machine, bitmap, cliprect, screen->machine->generic.buffered_spriteram2.u16, 2, 4);
wizdfire_draw_sprites(screen->machine, bitmap, cliprect, screen->machine->generic.buffered_spriteram2.u16, 1, 4);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}
VIDEO_UPDATE( nitrobal )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(deco16ic, 0, 0xffff);
/* Update playfields */
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(deco16ic, rohga_pf1_rowscroll, rohga_pf2_rowscroll);
decodev_pf34_update(deco16ic, rohga_pf3_rowscroll, rohga_pf4_rowscroll);
deco16ic_pf12_update(deco16ic, rohga_pf1_rowscroll, rohga_pf2_rowscroll);
deco16ic_pf34_update(deco16ic, rohga_pf3_rowscroll, rohga_pf4_rowscroll);
/* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */
bitmap_fill(bitmap, cliprect, screen->machine->pens[512]);
bitmap_fill(screen->machine->priority_bitmap, NULL, 0);
decodev_clear_sprite_priority_bitmap(deco16ic);
deco16ic_clear_sprite_priority_bitmap(deco16ic);
/* pf3 and pf4 are combined into a single 8bpp bitmap */
decodev_tilemap_34_combine_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_34_combine_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 16);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 16);
nitrobal_draw_sprites(screen->machine, bitmap, cliprect, screen->machine->generic.buffered_spriteram.u16, 3);
nitrobal_draw_sprites(screen->machine, bitmap, cliprect, screen->machine->generic.buffered_spriteram2.u16, 4);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
return 0;
}

View File

@ -3,7 +3,7 @@
*/
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
UINT16 *simpl156_pf1_rowscroll,*simpl156_pf2_rowscroll;
@ -119,12 +119,12 @@ VIDEO_UPDATE( simpl156 )
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
bitmap_fill(screen->machine->priority_bitmap,NULL,0);
decodev_pf12_update(deco16ic, simpl156_pf1_rowscroll, simpl156_pf2_rowscroll);
deco16ic_pf12_update(deco16ic, simpl156_pf1_rowscroll, simpl156_pf2_rowscroll);
bitmap_fill(bitmap, cliprect, 256);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 4);
deco16ic_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 2);
deco16ic_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 4);
draw_sprites(screen->machine, bitmap, cliprect);
return 0;

View File

@ -13,7 +13,7 @@ End sequence uses rowscroll '98 c0' on pf1 (jmp to 1d61a on supbtimj)
***************************************************************************/
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "includes/supbtime.h"
/******************************************************************************/
@ -91,15 +91,15 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
VIDEO_UPDATE(supbtime)
{
supbtime_state *state = (supbtime_state *)screen->machine->driver_data;
UINT16 flip = decodev_pf12_control_r(state->deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(state->deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
deco16ic_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
bitmap_fill(bitmap, cliprect, 768);
decodev_tilemap_2_draw(state->deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_2_draw(state->deco16ic, bitmap, cliprect, 0, 0);
draw_sprites(screen->machine, bitmap, cliprect);
decodev_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
return 0;
}

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ to switch between 8*8 tiles and 16*16 tiles.
***************************************************************************/
#include "emu.h"
#include "video/decodev.h"
#include "video/deco16ic.h"
#include "includes/tumblep.h"
static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
@ -87,15 +87,15 @@ static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rect
VIDEO_UPDATE( tumblep )
{
tumblep_state *state = (tumblep_state *)screen->machine->driver_data;
UINT16 flip = decodev_pf12_control_r(state->deco16ic, 0, 0xffff);
UINT16 flip = deco16ic_pf12_control_r(state->deco16ic, 0, 0xffff);
flip_screen_set(screen->machine, BIT(flip, 7));
decodev_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
deco16ic_pf12_update(state->deco16ic, state->pf1_rowscroll, state->pf2_rowscroll);
bitmap_fill(bitmap, cliprect, 256); /* not verified */
decodev_tilemap_2_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_2_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
draw_sprites(screen->machine, bitmap, cliprect);
return 0;

View File

@ -10,29 +10,28 @@
***************************************************************************/
#include "emu.h"
#include "video/decodev.h"
static UINT16 vaportra_priority[2];
#include "video/deco16ic.h"
#include "includes/vaportra.h"
/******************************************************************************/
WRITE16_HANDLER( vaportra_priority_w )
{
COMBINE_DATA(&vaportra_priority[offset]);
vaportra_state *state = (vaportra_state *)space->machine->driver_data;
COMBINE_DATA(&state->priority[offset]);
}
/******************************************************************************/
static void update_24bitcol(running_machine *machine, int offset)
static void update_24bitcol( running_machine *machine, int offset )
{
UINT8 r,g,b;
UINT8 r, g, b;
r = (machine->generic.paletteram.u16[offset] >> 0) & 0xff;
g = (machine->generic.paletteram.u16[offset] >> 8) & 0xff;
b = (machine->generic.paletteram2.u16[offset] >> 0) & 0xff;
palette_set_color(machine,offset,MAKE_RGB(r,g,b));
palette_set_color(machine, offset, MAKE_RGB(r,g,b));
}
WRITE16_HANDLER( vaportra_palette_24bit_rg_w )
@ -49,28 +48,32 @@ WRITE16_HANDLER( vaportra_palette_24bit_b_w )
/******************************************************************************/
static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int pri)
static void draw_sprites( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int pri )
{
UINT16 *buffered_spriteram16 = machine->generic.buffered_spriteram.u16;
int offs,priority_value;
vaportra_state *state = (vaportra_state *)machine->driver_data;
UINT16 *buffered_spriteram = machine->generic.buffered_spriteram.u16;
int offs;
int priority_value = state->priority[1];
priority_value=vaportra_priority[1];
for (offs = 0;offs < 0x400;offs += 4)
for (offs = 0; offs < 0x400; offs += 4)
{
int x,y,sprite,colour,multi,fx,fy,inc,flash,mult;
int x, y, sprite, colour, multi, fx, fy, inc, flash, mult;
y = buffered_spriteram16[offs];
if ((y&0x8000) == 0) continue;
y = buffered_spriteram[offs];
if ((y & 0x8000) == 0)
continue;
sprite = buffered_spriteram16[offs+1] & 0x1fff;
x = buffered_spriteram16[offs+2];
colour = (x >> 12) &0xf;
if (pri && (colour>=priority_value)) continue;
if (!pri && !(colour>=priority_value)) continue;
sprite = buffered_spriteram[offs + 1] & 0x1fff;
x = buffered_spriteram[offs + 2];
colour = (x >> 12) & 0xf;
if (pri && (colour >= priority_value))
continue;
if (!pri && !(colour >= priority_value))
continue;
flash=x&0x800;
if (flash && (video_screen_get_frame_number(machine->primary_screen) & 1)) continue;
flash = x & 0x800;
if (flash && (video_screen_get_frame_number(machine->primary_screen) & 1))
continue;
fx = y & 0x2000;
fy = y & 0x4000;
@ -83,7 +86,8 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
x = 240 - x;
y = 240 - y;
if (x>256) continue; /* Speedup */
if (x > 256)
continue; /* Speedup */
sprite &= ~multi;
if (fy)
@ -96,13 +100,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
if (flip_screen_get(machine))
{
y=240-y;
x=240-x;
if (fx) fx=0; else fx=1;
if (fy) fy=0; else fy=1;
mult=16;
y = 240 - y;
x = 240 - x;
if (fx) fx = 0; else fx = 1;
if (fy) fy = 0; else fy = 1;
mult = 16;
}
else mult=-16;
else mult = -16;
while (multi >= 0)
{
@ -120,45 +124,45 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta
VIDEO_UPDATE( vaportra )
{
running_device *deco16ic = devtag_get_device(screen->machine, "deco_custom");
UINT16 flip = decodev_pf12_control_r(deco16ic, 0, 0xffff);
int pri = vaportra_priority[0] & 0x03;
vaportra_state *state = (vaportra_state *)screen->machine->driver_data;
UINT16 flip = deco16ic_pf12_control_r(state->deco16ic, 0, 0xffff);
int pri = state->priority[0] & 0x03;
flip_screen_set(screen->machine, !BIT(flip, 7));
decodev_pf12_update(deco16ic, 0, 0);
decodev_pf34_update(deco16ic, 0, 0);
deco16ic_pf12_update(state->deco16ic, 0, 0);
deco16ic_pf34_update(state->deco16ic, 0, 0);
/* Draw playfields */
if (pri == 0)
{
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_4_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_3_draw(state->deco16ic, bitmap, cliprect, 0, 0);
draw_sprites(screen->machine, bitmap, cliprect, 0);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_2_draw(state->deco16ic, bitmap, cliprect, 0, 0);
}
else if (pri == 1)
{
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_3_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_4_draw(state->deco16ic, bitmap, cliprect, 0, 0);
draw_sprites(screen->machine, bitmap, cliprect, 0);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_2_draw(state->deco16ic, bitmap, cliprect, 0, 0);
}
else if (pri == 2)
{
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_4_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_2_draw(state->deco16ic, bitmap, cliprect, 0, 0);
draw_sprites(screen->machine, bitmap, cliprect, 0);
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_3_draw(state->deco16ic, bitmap, cliprect, 0, 0);
}
else
{
decodev_tilemap_3_draw(deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
decodev_tilemap_2_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_3_draw(state->deco16ic, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
deco16ic_tilemap_2_draw(state->deco16ic, bitmap, cliprect, 0, 0);
draw_sprites(screen->machine, bitmap, cliprect, 0);
decodev_tilemap_4_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_4_draw(state->deco16ic, bitmap, cliprect, 0, 0);
}
draw_sprites(screen->machine, bitmap, cliprect, 1);
decodev_tilemap_1_draw(deco16ic, bitmap, cliprect, 0, 0);
deco16ic_tilemap_1_draw(state->deco16ic, bitmap, cliprect, 0, 0);
return 0;
}