Clean-ups in the ST-V driver and corrected protection number seeds for elandore.

This commit is contained in:
Angelo Salese 2008-11-09 14:25:38 +00:00
parent bc72141598
commit ecffdc96cb
3 changed files with 80 additions and 37 deletions

View File

@ -143,7 +143,7 @@ ToDo / Notes:
-Protection issues: -Protection issues:
\-ffreveng: boot vectors; \-ffreveng: boot vectors;
\-decathlt: in-game graphics; \-decathlt: in-game graphics;
\-elandore: human textures; \-elandore: human / dragons textures;
\-twcup98: tecmo logo / sprite movements; \-twcup98: tecmo logo / sprite movements;
\-astrass: text layer (kludged for now); \-astrass: text layer (kludged for now);

View File

@ -9,10 +9,10 @@
Known Protected ST-V Games Known Protected ST-V Games
Astra Superstars (text layer gfx transfer) Astra Superstars (text layer gfx transfer)
Elandoree (gfx transfer of textures for some characters) Elandoree (gfx transfer of textures)
Final Fight Revenge (boot vectors etc.?) Final Fight Revenge (boot vectors etc.?)
Radiant Silvergun (game start protection) Radiant Silvergun (game start protection ?)
Steep Slope Sliders (gfx transfer of some character portraits) Steep Slope Sliders (gfx transfer of character portraits)
Decathlete (transfer of all gfx data) Decathlete (transfer of all gfx data)
Tecmo World Cup '98 (tecmo logo, player movement?) Tecmo World Cup '98 (tecmo logo, player movement?)
@ -48,7 +48,15 @@ the data used by the games in the various circumstances for reference:
[0] [1] [2] [3] [0] [1] [2] [3]
No protection test mode No protection test mode
No protection attract mode No protection attract mode
0x000y0000 0x00000000 0xe69000f9 0xff7f0000 gameplay,VDP-1 write (textures on humans) 0x000y0000 0x00000000 0x****00** 0xff7f0000 gameplay,VDP-1 write (textures on humans)
0x000y0000 0x00000000 0x****00** 0xffbf0000 gameplay,VDP-1 write (textures on humans)
0x000y0000 0x00000000 0x****00** 0xf9ff0000 gameplay,VDP-1 write (textures on dragons)
0x000y0000 0x00000000 0x****00** 0xfbff0000 gameplay,VDP-1 write (textures on dragons)
0x000y0000 0x00000000 0x****00** 0xfe7f0000 gameplay,VDP-1 write (textures on dragons)
0x000y0000 0x00000000 0x****00** 0xfd7f0000 gameplay,VDP-1 write (textures on dragons)
0x000y0000 0x00000000 0x****00** 0xfeff0000 gameplay,VDP-1 write (textures on dragons)
0x000y0000 0x00000000 0x****00** 0xf9bf0000 gameplay,VDP-1 write (textures on dragons)
-Final Fight Revenge [ffreveng] -Final Fight Revenge [ffreveng]
[0] [1] [2] [3] [0] [1] [2] [3]
@ -118,6 +126,17 @@ Wrong vectors (at least not where I tested it):
*/ */
static const UINT32 vector_prot[] = { 0x0603B1B2,0x234 }; static const UINT32 vector_prot[] = { 0x0603B1B2,0x234 };
#define ELANDORE_CTRL_1_HUMAN 0xff7f0000
#define ELANDORE_CTRL_2_HUMAN 0xffbf0000
#define ELANDORE_CTRL_1_DRAGON 0xf9ff0000
#define ELANDORE_CTRL_2_DRAGON 0xfbff0000
#define ELANDORE_CTRL_3_DRAGON 0xfe7f0000
#define ELANDORE_CTRL_4_DRAGON 0xfd7f0000
#define ELANDORE_CTRL_5_DRAGON 0xfeff0000
#define ELANDORE_CTRL_6_DRAGON 0xf9bf0000
static READ32_HANDLER( a_bus_ctrl_r ) static READ32_HANDLER( a_bus_ctrl_r )
{ {
UINT32 *ROM = (UINT32 *)memory_region(machine, "user1"); UINT32 *ROM = (UINT32 *)memory_region(machine, "user1");
@ -228,14 +247,15 @@ static READ32_HANDLER( a_bus_ctrl_r )
ctrl_index += 4; ctrl_index += 4;
return val; return val;
} }
case 0xff7f0000://elandore //elandore
if(a_bus[2] == 0xe69000f9) case ELANDORE_CTRL_1_HUMAN:
{ case ELANDORE_CTRL_2_HUMAN:
ctrl_index++; case ELANDORE_CTRL_1_DRAGON:
return ROM[ctrl_index]; case ELANDORE_CTRL_2_DRAGON:
} case ELANDORE_CTRL_3_DRAGON:
else return 0x12345678; case ELANDORE_CTRL_4_DRAGON:
case 0xffbf0000: case ELANDORE_CTRL_5_DRAGON:
case ELANDORE_CTRL_6_DRAGON:
ctrl_index++; ctrl_index++;
return ROM[ctrl_index]; return ROM[ctrl_index];
} }
@ -255,6 +275,7 @@ static WRITE32_HANDLER ( a_bus_ctrl_w )
logerror("A-Bus control protection write at %06x: [%02x] <- %08x\n",activecpu_get_pc(),offset,data); logerror("A-Bus control protection write at %06x: [%02x] <- %08x\n",activecpu_get_pc(),offset,data);
if(offset == 3) if(offset == 3)
{ {
//printf("MAIN : %08x DATA : %08x\n",a_bus[3],a_bus[2]);
switch(a_bus[3]) switch(a_bus[3])
{ {
/*astrass,I need an original test mode screen to compare...*/ /*astrass,I need an original test mode screen to compare...*/
@ -277,8 +298,30 @@ static WRITE32_HANDLER ( a_bus_ctrl_w )
/*rsgun*/ /*rsgun*/
case 0x77770000: ctrl_index = 0; break; case 0x77770000: ctrl_index = 0; break;
/*elandore*/ /*elandore*/
case 0xff7f0000: ctrl_index = ((0x400000)/4)-1; break; case ELANDORE_CTRL_1_HUMAN: // (human polygons)
case 0xffbf0000: ctrl_index = (0x1c40000/4)-1; break; ctrl_index = ((0x00000000/4) + ((a_bus[2] & 0xff)<<16) + ((a_bus[2] & 0xffff0000)>>16)/4)-1;
break;
case ELANDORE_CTRL_2_HUMAN: // (human polygons)
ctrl_index = ((0x00000000/4) + ((a_bus[2] & 0xff)<<16) + ((a_bus[2] & 0xffff0000)>>16)/4)-1;
break;
case ELANDORE_CTRL_1_DRAGON://KAIN / THUNDER (dragon polygons)
ctrl_index = ((0x00000000/4) + ((a_bus[2] & 0xff)<<16) + ((a_bus[2] & 0xffff0000)>>16)/4)-1;
break;
case ELANDORE_CTRL_2_DRAGON://REVI CURIO / DARK (dragon polygons)
ctrl_index = ((0x00000000/4) + ((a_bus[2] & 0xff)<<16) + ((a_bus[2] & 0xffff0000)>>16)/4)-1;
break;
case ELANDORE_CTRL_3_DRAGON://RUBONE / POISON (dragon polygons)
ctrl_index = ((0x00000000/4) + ((a_bus[2] & 0xff)<<16) + ((a_bus[2] & 0xffff0000)>>16)/4)-1;
break;
case ELANDORE_CTRL_4_DRAGON://TINA / MAGICAL GIRL (dragon polygons)
ctrl_index = ((0x00000000/4) + ((a_bus[2] & 0xff)<<16) + ((a_bus[2] & 0xffff0000)>>16)/4)-1;
break;
case ELANDORE_CTRL_5_DRAGON://KEYAKI / FIRE (dragon polygons)
ctrl_index = ((0x00000000/4) + ((a_bus[2] & 0xff)<<16) + ((a_bus[2] & 0xffff0000)>>16)/4)-1;
break;
case ELANDORE_CTRL_6_DRAGON://SION / WIND (dragon polygons)
ctrl_index = ((0x00000000/4) + ((a_bus[2] & 0xff)<<16) + ((a_bus[2] & 0xffff0000)>>16)/4)-1;
break;
} }
} }
//popmessage("%04x %04x",data,offset/4); //popmessage("%04x %04x",data,offset/4);

View File

@ -27,26 +27,28 @@ RBG1
-- other crap -- other crap
EXBG (external) EXBG (external)
------------------------------------------------------------------------------------------ -----------------------------------------------------------------------------------------------------------
Video emulation TODO: Video emulation TODO:
-all games: -all games:
\-priorities (check myfairld,thunt) \-priorities (check myfairld,thunt)
\-complete windows effects \-complete windows effects
\-mosaic effect \-mosaic effect
\-ODD bit/H/V Counter not yet emulated. \-ODD bit/H/V Counter not yet emulated properly
\-Missing \-Reduction enable bits
\-Check if there are any remaining video registers that are yet to be macroized & added to the rumble.
-batmanfr: -batmanfr:
\-If you reset the game after the character selection screen,when you get again to it there's garbage \-If you reset the game after the character selection screen,when you get again to it there's garbage
floating behind Batman. floating behind Batman.
-elandore:
\-(BTANB) priorities at the VS. screen apparently is wrong,but it's like this on the Saturn version too.
-hanagumi: -hanagumi:
\-ending screens have corrupt graphics. (*untested*) \-ending screens have corrupt graphics. (*untested*)
-kiwames: -kiwames:
\-incorrect color emulation for the alpha blended flames on the title screen,it's caused by a bit \-incorrect color emulation for the alpha blended flames on the title screen,it's caused by a schizoid
that writes 1 to the NBG1 bitmap color bank.It should be 0 but I don't know what is going on, linescroll emulation quirk.
might be a SH-2 / irq issue.
\-the VDP1 sprites refresh is too slow,causing the "Draw by request" mode to \-the VDP1 sprites refresh is too slow,causing the "Draw by request" mode to
flicker.Moved back to default ATM... flicker.Moved back to default ATM.
-pblbeach: -pblbeach:
\-Sprites are offset, because it doesn't clear vdp1 local coordinates set by bios, \-Sprites are offset, because it doesn't clear vdp1 local coordinates set by bios,
I guess that they are cleared when some vdp1 register is written (kludged for now) I guess that they are cleared when some vdp1 register is written (kludged for now)
@ -56,26 +58,20 @@ Video emulation TODO:
-seabass: -seabass:
\-Player sprite is corrupt/missing during movements,caused by incomplete framebuffer switching. \-Player sprite is corrupt/missing during movements,caused by incomplete framebuffer switching.
Notes of Interest: Notes of Interest & Unclear features:
-the test mode / bios is drawn with layer NBG3; -the test mode / bios is drawn with layer NBG3;
-hanagumi puts a 'RED' dragon logo in tileram (base 0x64000, 4bpp, 8x8 tiles) but
-hanagumi Puts a 'RED' dragon logo in tileram (base 0x64000, 4bpp, 8x8 tiles) but its not displayed because its priority value is 0.Left-over?
its not displayed in gurus video.Update:It's actually not drawn because its
priority value is 0;
-scrolling is screen display wise,meaning that a scrolling value is masked with the -scrolling is screen display wise,meaning that a scrolling value is masked with the
screen resolution size values; screen resolution size values;
-Bitmaps USES transparency pens,examples are: -Bitmaps uses transparency pens,examples are:
elandore's energy bars; \-elandore's energy bars;
mausuke's foreground(the one used on the playfield)(I guess that this is also \-mausuke's foreground(the one used on the playfield)
alpha-blended); \-shanhigw's tile-based sprites;
shanhigw's tile-based sprites; The transparency pen table is like this:
for now I've removed black pixels,it isn't 100% right so there MUST BE a better way
for this...
Update: some games uses transparent windows,others uses a transparency pen table like this:
|------------------|---------------------| |------------------|---------------------|
| Character count | Transparency code | | Character count | Transparency code |
@ -86,8 +82,9 @@ Update: some games uses transparent windows,others uses a transparency pen table
| 32,768 colors |MSB=0 (bit 15) | | 32,768 colors |MSB=0 (bit 15) |
| 16,770,000 colors|MSB=0 (bit 31) | | 16,770,000 colors|MSB=0 (bit 31) |
|------------------|---------------------| |------------------|---------------------|
In other words,the first three types uses the offset and not the color allocated.
In other words,the first three types uses the offset and not the color allocated... -double density interlace setting (LSMD == 3) apparently does a lot of fancy stuff in the graphics sizes.
-Debug key list(only if you enable the debug mode on top of this file): -Debug key list(only if you enable the debug mode on top of this file):
\-T: NBG3 layer toggle \-T: NBG3 layer toggle
@ -5565,6 +5562,9 @@ static int stv_vdp2_window_process(int x,int y)
{ {
UINT16 s_x=0,e_x=0,s_y=0,e_y=0; UINT16 s_x=0,e_x=0,s_y=0,e_y=0;
if ((stv2_current_tilemap.window_control & 6) == 0)
return 0;
stv_vdp2_get_window0_coordinates(&s_x, &e_x, &s_y, &e_y); stv_vdp2_get_window0_coordinates(&s_x, &e_x, &s_y, &e_y);
if(stv2_current_tilemap.window_control & 2) if(stv2_current_tilemap.window_control & 2)