mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
MT#04287,04289 -- hook up bootleg video systems properly
This commit is contained in:
parent
bc045a00bd
commit
bf65492d5e
4 changed files with 34 additions and 25 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -3166,6 +3166,7 @@ src/mame/includes/snk.h svneol=native#text/plain
|
|||
src/mame/includes/snk6502.h svneol=native#text/plain
|
||||
src/mame/includes/snk68.h svneol=native#text/plain
|
||||
src/mame/includes/snookr10.h svneol=native#text/plain
|
||||
src/mame/includes/snowbros.h svneol=native#text/plain
|
||||
src/mame/includes/solomon.h svneol=native#text/plain
|
||||
src/mame/includes/sonson.h svneol=native#text/plain
|
||||
src/mame/includes/spacefb.h svneol=native#text/plain
|
||||
|
|
|
@ -64,6 +64,7 @@ out of the sprite list at that point.. (verify on real hw)
|
|||
|
||||
#include "emu.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/snowbros.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/2151intf.h"
|
||||
|
@ -74,21 +75,6 @@ out of the sprite list at that point.. (verify on real hw)
|
|||
#include "cpu/mcs51/mcs51.h" // for semicom mcu
|
||||
|
||||
|
||||
class snowbros_state : public driver_device
|
||||
{
|
||||
public:
|
||||
snowbros_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: driver_device(machine, config) { }
|
||||
|
||||
UINT16 *hyperpac_ram;
|
||||
int sb3_music_is_playing;
|
||||
int sb3_music;
|
||||
UINT8 semicom_prot_offset;
|
||||
UINT8 *spriteram;
|
||||
size_t spriteram_size;
|
||||
};
|
||||
|
||||
|
||||
static WRITE16_HANDLER( snowbros_flipscreen_w )
|
||||
{
|
||||
if (ACCESSING_BITS_8_15)
|
||||
|
@ -280,7 +266,7 @@ static ADDRESS_MAP_START( wintbob_map, AS_PROGRAM, 16 )
|
|||
AM_RANGE(0x500002, 0x500003) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0x500004, 0x500005) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0x600000, 0x6001ff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x700000, 0x701fff) AM_RAM AM_BASE_SIZE_MEMBER(snowbros_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0x700000, 0x701fff) AM_RAM AM_BASE_SIZE_MEMBER(snowbros_state, bootleg_spriteram16, spriteram_size)
|
||||
AM_RANGE(0x800000, 0x800001) AM_WRITE(snowbros_irq4_ack_w) /* IRQ 4 acknowledge */
|
||||
AM_RANGE(0x900000, 0x900001) AM_WRITE(snowbros_irq3_ack_w) /* IRQ 3 acknowledge */
|
||||
AM_RANGE(0xa00000, 0xa00001) AM_WRITE(snowbros_irq2_ack_w) /* IRQ 2 acknowledge */
|
||||
|
@ -301,7 +287,7 @@ static ADDRESS_MAP_START( honeydol_map, AS_PROGRAM, 16 )
|
|||
AM_RANGE(0x900002, 0x900003) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0x900004, 0x900005) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0xa00000, 0xa007ff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0xb00000, 0xb01fff) AM_RAM AM_BASE_SIZE_MEMBER(snowbros_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0xb00000, 0xb01fff) AM_RAM AM_BASE_SIZE_MEMBER(snowbros_state, bootleg_spriteram16, spriteram_size)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( honeydol_sound_map, AS_PROGRAM, 8 )
|
||||
|
@ -338,7 +324,7 @@ static ADDRESS_MAP_START( twinadv_map, AS_PROGRAM, 16 )
|
|||
AM_RANGE(0x500002, 0x500003) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0x500004, 0x500005) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE(0x600000, 0x6001ff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC(paletteram)
|
||||
AM_RANGE(0x700000, 0x701fff) AM_RAM AM_BASE_SIZE_MEMBER(snowbros_state, spriteram, spriteram_size)
|
||||
AM_RANGE(0x700000, 0x701fff) AM_RAM AM_BASE_SIZE_MEMBER(snowbros_state, bootleg_spriteram16, spriteram_size)
|
||||
AM_RANGE(0x800000, 0x800001) AM_WRITE(snowbros_irq4_ack_w) /* IRQ 4 acknowledge */
|
||||
AM_RANGE(0x900000, 0x900001) AM_WRITE(snowbros_irq3_ack_w) /* IRQ 3 acknowledge */
|
||||
AM_RANGE(0xa00000, 0xa00001) AM_WRITE(snowbros_irq2_ack_w) /* IRQ 2 acknowledge */
|
||||
|
@ -513,7 +499,7 @@ static ADDRESS_MAP_START( snowbros3_map, AS_PROGRAM, 16 )
|
|||
AM_RANGE( 0x500002, 0x500003) AM_READ_PORT("DSW2")
|
||||
AM_RANGE( 0x500004, 0x500005) AM_READ_PORT("SYSTEM")
|
||||
AM_RANGE( 0x600000, 0x6003ff) AM_RAM_WRITE(paletteram16_xBBBBBGGGGGRRRRR_word_w) AM_BASE_GENERIC (paletteram)
|
||||
AM_RANGE( 0x700000, 0x7021ff) AM_RAM AM_BASE_SIZE_MEMBER(snowbros_state, spriteram, spriteram_size)
|
||||
AM_RANGE( 0x700000, 0x7021ff) AM_RAM AM_BASE_SIZE_MEMBER(snowbros_state, bootleg_spriteram16, spriteram_size)
|
||||
AM_RANGE(0x800000, 0x800001) AM_WRITE(snowbros_irq4_ack_w) /* IRQ 4 acknowledge */
|
||||
AM_RANGE(0x900000, 0x900001) AM_WRITE(snowbros_irq3_ack_w) /* IRQ 3 acknowledge */
|
||||
AM_RANGE(0xa00000, 0xa00001) AM_WRITE(snowbros_irq2_ack_w) /* IRQ 2 acknowledge */
|
||||
|
|
17
src/mame/includes/snowbros.h
Normal file
17
src/mame/includes/snowbros.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include "emu.h"
|
||||
|
||||
class snowbros_state : public driver_device
|
||||
{
|
||||
public:
|
||||
snowbros_state(running_machine &machine, const driver_device_config_base &config)
|
||||
: driver_device(machine, config) { }
|
||||
|
||||
UINT16 *hyperpac_ram;
|
||||
int sb3_music_is_playing;
|
||||
int sb3_music;
|
||||
UINT8 semicom_prot_offset;
|
||||
UINT8 *spriteram;
|
||||
UINT16 *bootleg_spriteram16;
|
||||
size_t spriteram_size;
|
||||
};
|
||||
|
|
@ -2,10 +2,12 @@
|
|||
|
||||
#include "emu.h"
|
||||
#include "kan_panb.h"
|
||||
#include "includes/snowbros.h"
|
||||
|
||||
SCREEN_UPDATE( honeydol )
|
||||
{
|
||||
UINT16 *spriteram16 = screen->machine().generic.spriteram.u16;
|
||||
snowbros_state *state = screen->machine().driver_data<snowbros_state>();
|
||||
UINT16 *spriteram16 = state->bootleg_spriteram16;
|
||||
int sx=0, sy=0, x=0, y=0, offs;
|
||||
/* sprites clip on left / right edges when scrolling, but it seems correct,
|
||||
no extra sprite attribute bits are set during this time, the sprite co-ordinates
|
||||
|
@ -90,7 +92,8 @@ SCREEN_UPDATE( honeydol )
|
|||
|
||||
SCREEN_UPDATE( twinadv )
|
||||
{
|
||||
UINT16 *spriteram16 = screen->machine().generic.spriteram.u16;
|
||||
snowbros_state *state = screen->machine().driver_data<snowbros_state>();
|
||||
UINT16 *spriteram16 = state->bootleg_spriteram16;
|
||||
int sx=0, sy=0, x=0, y=0, offs;
|
||||
/* sprites clip on left / right edges when scrolling, but it seems correct,
|
||||
no extra sprite attribute bits are set during this time, the sprite co-ordinates
|
||||
|
@ -145,12 +148,13 @@ SCREEN_UPDATE( twinadv )
|
|||
|
||||
SCREEN_UPDATE( wintbob )
|
||||
{
|
||||
UINT16 *spriteram16 = screen->machine().generic.spriteram.u16;
|
||||
snowbros_state *state = screen->machine().driver_data<snowbros_state>();
|
||||
UINT16 *spriteram16 = state->bootleg_spriteram16;
|
||||
int offs;
|
||||
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine()));
|
||||
|
||||
for (offs = 0;offs < screen->machine().generic.spriteram_size/2;offs += 8)
|
||||
for (offs = 0;offs < state->spriteram_size/2;offs += 8)
|
||||
{
|
||||
int xpos = spriteram16[offs] & 0xff;
|
||||
int ypos = spriteram16[offs+4] & 0xff;
|
||||
|
@ -188,7 +192,8 @@ SCREEN_UPDATE( wintbob )
|
|||
|
||||
SCREEN_UPDATE( snowbro3 )
|
||||
{
|
||||
UINT16 *spriteram16 = screen->machine().generic.spriteram.u16;
|
||||
snowbros_state *state = screen->machine().driver_data<snowbros_state>();
|
||||
UINT16 *spriteram16 = state->bootleg_spriteram16;
|
||||
int sx=0, sy=0, x=0, y=0, offs;
|
||||
|
||||
/*
|
||||
|
@ -217,7 +222,7 @@ SCREEN_UPDATE( snowbro3 )
|
|||
|
||||
bitmap_fill(bitmap,cliprect,get_black_pen(screen->machine()));
|
||||
|
||||
for (offs = 0;offs < screen->machine().generic.spriteram_size/2;offs += 8)
|
||||
for (offs = 0;offs < state->spriteram_size/2;offs += 8)
|
||||
{
|
||||
gfx_element *gfx = screen->machine().gfx[0];
|
||||
int dx = spriteram16[offs+4] & 0xff;
|
||||
|
|
Loading…
Reference in a new issue