mirror of
https://github.com/holub/mame
synced 2025-04-25 17:56:43 +03:00
Fixed cocktail mode, added a note about the 'cooperative mode', implemented y scroll, added vram and cram mirrors
This commit is contained in:
parent
da6f3e3722
commit
aa93055456
@ -15,7 +15,7 @@ i8751 protection simulation and other fixes by Bryan McPhail, 15/10/00.
|
||||
|
||||
|
||||
ToDo:
|
||||
support screen flipping for sprites
|
||||
-
|
||||
|
||||
|
||||
Stephh's notes (based on the games M6809 code and some tests) :
|
||||
@ -123,6 +123,12 @@ Stephh's notes (based on the games M6809 code and some tests) :
|
||||
* Lives settings (table at 0x4696) : 06 03 02 instead of 06 03 09
|
||||
* Timer settings (table at 0x9d99) : 30 20 18 instead of 40 30 20, so the timer is faster
|
||||
|
||||
Additional notes:
|
||||
----------------
|
||||
- sidepckt and sidepcktb don't have cocktail mode at all, while sidepcktj has a 'cooperative' cocktail mode; when it's the p2 turn,
|
||||
the screen scrolls and a 'flipped score area' is shown on the other side, so the 2nd player just continues the same game.
|
||||
Note that the screen never flips in any case.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
@ -195,18 +201,16 @@ WRITE8_MEMBER(sidepckt_state::i8751_w)
|
||||
|
||||
static ADDRESS_MAP_START( sidepckt_map, AS_PROGRAM, 8, sidepckt_state )
|
||||
AM_RANGE(0x0000, 0x0fff) AM_RAM
|
||||
AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x1400, 0x17ff) AM_RAM // ???
|
||||
AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
|
||||
AM_RANGE(0x1c00, 0x1fff) AM_RAM // ???
|
||||
AM_RANGE(0x1000, 0x13ff) AM_MIRROR(0x400) AM_RAM_WRITE(videoram_w) AM_SHARE("videoram")
|
||||
AM_RANGE(0x1800, 0x1bff) AM_MIRROR(0x400) AM_RAM_WRITE(colorram_w) AM_SHARE("colorram")
|
||||
AM_RANGE(0x2000, 0x20ff) AM_RAM AM_SHARE("spriteram")
|
||||
AM_RANGE(0x2100, 0x24ff) AM_RAM // ???
|
||||
AM_RANGE(0x2100, 0x24ff) AM_WRITENOP // ??? (Unused spriteram? The game writes some values at boot, but never read)
|
||||
AM_RANGE(0x3000, 0x3000) AM_READ_PORT("P1")
|
||||
AM_RANGE(0x3001, 0x3001) AM_READ_PORT("P2")
|
||||
AM_RANGE(0x3002, 0x3002) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0x3003, 0x3003) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0x3004, 0x3004) AM_WRITE(sound_cpu_command_w)
|
||||
AM_RANGE(0x300c, 0x300c) AM_READNOP AM_WRITE(flipscreen_w)
|
||||
AM_RANGE(0x300c, 0x300c) AM_READWRITE(scroll_y_r, scroll_y_w)
|
||||
AM_RANGE(0x3014, 0x3014) AM_READ(i8751_r)
|
||||
AM_RANGE(0x3018, 0x3018) AM_WRITE(i8751_w)
|
||||
AM_RANGE(0x4000, 0xffff) AM_ROM
|
||||
@ -356,11 +360,12 @@ GFXDECODE_END
|
||||
|
||||
void sidepckt_state::machine_reset()
|
||||
{
|
||||
m_i8751_return = 0;
|
||||
m_current_ptr = 0;
|
||||
m_i8751_return = 0;
|
||||
m_current_ptr = 0;
|
||||
m_current_table = 0;
|
||||
m_in_math = 0;
|
||||
m_math_param = 0;
|
||||
m_in_math = 0;
|
||||
m_math_param = 0;
|
||||
m_scroll_y = 0;
|
||||
}
|
||||
|
||||
static MACHINE_CONFIG_START( sidepckt, sidepckt_state )
|
||||
@ -498,6 +503,7 @@ DRIVER_INIT_MEMBER(sidepckt_state,sidepckt)
|
||||
save_item(NAME(m_current_table));
|
||||
save_item(NAME(m_in_math));
|
||||
save_item(NAME(m_math_param));
|
||||
save_item(NAME(m_scroll_y));
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(sidepckt_state,sidepcktj)
|
||||
@ -514,6 +520,6 @@ DRIVER_INIT_MEMBER(sidepckt_state,sidepcktj)
|
||||
}
|
||||
|
||||
|
||||
GAME( 1986, sidepckt, 0, sidepckt, sidepckt, sidepckt_state, sidepckt, ROT0, "Data East Corporation", "Side Pocket (World)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, sidepcktj, sidepckt, sidepckt, sidepcktj, sidepckt_state, sidepcktj, ROT0, "Data East Corporation", "Side Pocket (Japan)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, sidepcktb, sidepckt, sidepcktb, sidepcktb, driver_device, 0, ROT0, "bootleg", "Side Pocket (bootleg)", MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, sidepckt, 0, sidepckt, sidepckt, sidepckt_state, sidepckt, ROT0, "Data East Corporation", "Side Pocket (World)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, sidepcktj, sidepckt, sidepckt, sidepcktj, sidepckt_state, sidepcktj, ROT0, "Data East Corporation", "Side Pocket (Japan)", MACHINE_SUPPORTS_SAVE )
|
||||
GAME( 1986, sidepcktb, sidepckt, sidepcktb, sidepcktb, driver_device, 0, ROT0, "bootleg", "Side Pocket (bootleg)", MACHINE_SUPPORTS_SAVE )
|
||||
|
@ -40,13 +40,15 @@ public:
|
||||
uint8_t m_current_table;
|
||||
uint8_t m_in_math;
|
||||
uint8_t m_math_param;
|
||||
uint8_t m_scroll_y;
|
||||
|
||||
DECLARE_WRITE8_MEMBER(sound_cpu_command_w);
|
||||
DECLARE_READ8_MEMBER(i8751_r);
|
||||
DECLARE_WRITE8_MEMBER(i8751_w);
|
||||
DECLARE_WRITE8_MEMBER(videoram_w);
|
||||
DECLARE_WRITE8_MEMBER(colorram_w);
|
||||
DECLARE_WRITE8_MEMBER(flipscreen_w);
|
||||
DECLARE_READ8_MEMBER(scroll_y_r);
|
||||
DECLARE_WRITE8_MEMBER(scroll_y_w);
|
||||
|
||||
DECLARE_DRIVER_INIT(sidepckt);
|
||||
DECLARE_DRIVER_INIT(sidepcktj);
|
||||
|
@ -100,10 +100,19 @@ WRITE8_MEMBER(sidepckt_state::colorram_w)
|
||||
m_bg_tilemap->mark_tile_dirty(offset);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(sidepckt_state::flipscreen_w)
|
||||
READ8_MEMBER(sidepckt_state::scroll_y_r)
|
||||
{
|
||||
int flipscreen = data;
|
||||
machine().tilemap().set_flip_all(flipscreen ? TILEMAP_FLIPY : TILEMAP_FLIPX);
|
||||
return (m_scroll_y);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(sidepckt_state::scroll_y_w)
|
||||
{
|
||||
// Bits 0-5: Scroll y
|
||||
m_scroll_y = data & 0x3F;
|
||||
|
||||
// Other bits: Unknown, but they seem never written
|
||||
if (data > 0x3F)
|
||||
logerror ("scroll_y_w: Unknown write -> data = 0x%02X\n", data);
|
||||
}
|
||||
|
||||
|
||||
@ -145,6 +154,8 @@ void sidepckt_state::draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect
|
||||
|
||||
uint32_t sidepckt_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
||||
{
|
||||
m_bg_tilemap->set_scrolly (0, m_scroll_y);
|
||||
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1,0);
|
||||
draw_sprites(bitmap,cliprect);
|
||||
m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0,0);
|
||||
|
Loading…
Reference in New Issue
Block a user