start looking at the macrossp line regs (nw)

This commit is contained in:
David Haywood 2013-08-20 21:13:34 +00:00
parent f38babb223
commit 0d3d5c42cf
3 changed files with 73 additions and 36 deletions

View File

@ -6,24 +6,11 @@ Quiz Bisyoujo Senshi Sailor Moon (c)1997 Banpresto
Driver by David Haywood
TODO:
- macrossp: tilemap zoom is wrong, see title screen (misplaced) and level 2 boss
(background scrolls faster than sprites)
- should use VIDEO_RGB_DIRECT for alpha blending to work, but tilemap_draw_roz()
doesn't support it.
- Sprite Zoom on quizmoon title screen isn't right
- Tilemap zoom effect on macrossp title screen and probably other places
- Priorities (Sprites & Backgrounds) - see quizmoon attract mode
- sprite/tilemap priorities might not be 100% correct
- Sound
- optimize palette fading in macrossp.quizmoon doesn't use that register.
- All Other Unused Reads / Writes
- Correct unknown ports if/as needed
- Clean Up
- Flip Screen support (both games have a dipswitch for it's selection)
Notes:
Whats the BIOS rom? should it be in the 68020 map, its different between games.
- what is the 'bios' rom for? it appears to be data tables and is very different between games but we don't map it anywhere
- priorities
- zooming is wrong
- is alpha REALLY alpha or sprite flicker?
- convert tilemaps to devices?
68020 interrupts
lev 1 : 0x64 : 0000 084c - unknown..
@ -397,20 +384,20 @@ static ADDRESS_MAP_START( macrossp_map, AS_PROGRAM, 32, macrossp_state )
AM_RANGE(0x800000, 0x802fff) AM_RAM AM_SHARE("spriteram")
/* SCR A Layer */
AM_RANGE(0x900000, 0x903fff) AM_RAM_WRITE(macrossp_scra_videoram_w) AM_SHARE("scra_videoram")
AM_RANGE(0x904200, 0x9043ff) AM_WRITEONLY /* W/O? */
AM_RANGE(0x905000, 0x90500b) AM_WRITEONLY AM_SHARE("scra_videoregs") /* W/O? */
AM_RANGE(0x904200, 0x9043ff) AM_RAM AM_SHARE("scra_linezoom") /* W/O? */
AM_RANGE(0x905000, 0x90500b) AM_RAM AM_SHARE("scra_videoregs") /* W/O? */
/* SCR B Layer */
AM_RANGE(0x908000, 0x90bfff) AM_RAM_WRITE(macrossp_scrb_videoram_w) AM_SHARE("scrb_videoram")
AM_RANGE(0x90c200, 0x90c3ff) AM_WRITEONLY /* W/O? */
AM_RANGE(0x90d000, 0x90d00b) AM_WRITEONLY AM_SHARE("scrb_videoregs") /* W/O? */
AM_RANGE(0x90c200, 0x90c3ff) AM_RAM AM_SHARE("scrb_linezoom") /* W/O? */
AM_RANGE(0x90d000, 0x90d00b) AM_RAM AM_SHARE("scrb_videoregs") /* W/O? */
/* SCR C Layer */
AM_RANGE(0x910000, 0x913fff) AM_RAM_WRITE(macrossp_scrc_videoram_w) AM_SHARE("scrc_videoram")
AM_RANGE(0x914200, 0x9143ff) AM_WRITEONLY /* W/O? */
AM_RANGE(0x915000, 0x91500b) AM_WRITEONLY AM_SHARE("scrc_videoregs") /* W/O? */
AM_RANGE(0x914200, 0x9143ff) AM_RAM AM_SHARE("scrc_linezoom")/* W/O? */
AM_RANGE(0x915000, 0x91500b) AM_RAM AM_SHARE("scrc_videoregs") /* W/O? */
/* Text Layer */
AM_RANGE(0x918000, 0x91bfff) AM_RAM_WRITE(macrossp_text_videoram_w) AM_SHARE("text_videoram")
AM_RANGE(0x91c200, 0x91c3ff) AM_WRITEONLY /* W/O? */
AM_RANGE(0x91d000, 0x91d00b) AM_WRITEONLY AM_SHARE("text_videoregs") /* W/O? */
AM_RANGE(0x91c200, 0x91c3ff) AM_RAM AM_SHARE("text_linezoom") /* W/O? */
AM_RANGE(0x91d000, 0x91d00b) AM_RAM AM_SHARE("text_videoregs") /* W/O? */
AM_RANGE(0xa00000, 0xa03fff) AM_RAM_WRITE(paletteram32_macrossp_w) AM_SHARE("paletteram")

View File

@ -11,27 +11,42 @@ public:
: driver_device(mconfig, type, tag),
m_spriteram(*this, "spriteram"),
m_scra_videoram(*this, "scra_videoram"),
m_scra_linezoom(*this, "scra_linezoom"),
m_scra_videoregs(*this, "scra_videoregs"),
m_scrb_videoram(*this, "scrb_videoram"),
m_scrb_linezoom(*this, "scrb_linezoom"),
m_scrb_videoregs(*this, "scrb_videoregs"),
m_scrc_videoram(*this, "scrc_videoram"),
m_scrc_linezoom(*this, "scrc_linezoom"),
m_scrc_videoregs(*this, "scrc_videoregs"),
m_text_videoram(*this, "text_videoram"),
m_text_linezoom(*this, "text_linezoom"),
m_text_videoregs(*this, "text_videoregs"),
m_paletteram(*this, "paletteram"),
m_mainram(*this, "mainram"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"){ }
m_audiocpu(*this, "audiocpu")
{
}
/* memory pointers */
required_shared_ptr<UINT32> m_spriteram;
required_shared_ptr<UINT32> m_scra_videoram;
required_shared_ptr<UINT32> m_scra_linezoom;
required_shared_ptr<UINT32> m_scra_videoregs;
required_shared_ptr<UINT32> m_scrb_videoram;
required_shared_ptr<UINT32> m_scrb_linezoom;
required_shared_ptr<UINT32> m_scrb_videoregs;
required_shared_ptr<UINT32> m_scrc_videoram;
required_shared_ptr<UINT32> m_scrc_linezoom;
required_shared_ptr<UINT32> m_scrc_videoregs;
required_shared_ptr<UINT32> m_text_videoram;
required_shared_ptr<UINT32> m_text_linezoom;
required_shared_ptr<UINT32> m_text_videoregs;
required_shared_ptr<UINT32> m_paletteram;
required_shared_ptr<UINT32> m_mainram;
@ -76,7 +91,7 @@ public:
UINT32 screen_update_macrossp(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void screen_eof_macrossp(screen_device &screen, bool state);
void draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect, int priority );
void draw_layer( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int layer );
void draw_layer( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int layer, int line );
void sortlayers(int *layer,int *pri);
void update_colors( );
DECLARE_WRITE_LINE_MEMBER(irqhandler);

View File

@ -304,10 +304,11 @@ void macrossp_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprec
}
void macrossp_state::draw_layer( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int layer )
void macrossp_state::draw_layer( screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int layer, int line )
{
tilemap_t *tm;
UINT32 *vr;
UINT32 *lr;
switch (layer)
{
@ -315,34 +316,45 @@ void macrossp_state::draw_layer( screen_device &screen, bitmap_rgb32 &bitmap, co
default:
tm = m_scra_tilemap;
vr = m_scra_videoregs;
lr = m_scra_linezoom;
break;
case 1:
tm = m_scrb_tilemap;
vr = m_scrb_videoregs;
lr = m_scrb_linezoom;
break;
case 2:
tm = m_scrc_tilemap;
vr = m_scrc_videoregs;
lr = m_scrc_linezoom;
break;
}
if ((vr[2] & 0xf0000000) == 0xe0000000) /* zoom enable (guess, surely wrong) */
{
int startx, starty, inc;
int startx, starty, inc, linc;
startx = (vr[1] & 0x0000ffff) << 16;
starty = (vr[1] & 0xffff0000) >> 0;
inc = (vr[2] & 0x00ff0000) >> 6,
inc = (vr[2] & 0x00ff0000) >> 6;
if (line&1)
linc = (lr[line/2] & 0x0000ffff)>>0;
else
linc = (lr[line/2] & 0xffff0000)>>16;
linc <<= 10;
/* WRONG! */
/* scroll register contain position relative to the center of the screen, so adjust */
startx -= (368/2) * inc;
startx -= (368/2) * linc;
starty -= (240/2) * inc;
tm->draw_roz(screen, bitmap, cliprect,
startx,starty,inc,0,0,inc,
startx,starty,linc,0,0,inc,
1, /* wraparound */
0,0);
}
@ -385,11 +397,34 @@ UINT32 macrossp_state::screen_update_macrossp(screen_device &screen, bitmap_rgb3
sortlayers(layers, layerpri);
draw_layer(screen, bitmap, cliprect, layers[0]);
rectangle clip;
const rectangle &visarea = screen.visible_area();
clip = visarea;
for (int y=0;y<240;y++)
{
clip.min_y = clip.max_y = y;
draw_layer(screen, bitmap, clip, layers[0], y);
}
draw_sprites(bitmap, cliprect, 0);
draw_layer(screen, bitmap, cliprect, layers[1]);
for (int y=0;y<240;y++)
{
clip.min_y = clip.max_y = y;
draw_layer(screen, bitmap, clip, layers[1], y);
}
draw_sprites(bitmap, cliprect, 1);
draw_layer(screen, bitmap, cliprect, layers[2]);
for (int y=0;y<240;y++)
{
clip.min_y = clip.max_y = y;
draw_layer(screen, bitmap, clip, layers[2], y);
}
draw_sprites(bitmap, cliprect, 2);
draw_sprites(bitmap, cliprect, 3);
m_text_tilemap->draw(screen, bitmap, cliprect, 0, 0);