Skip to content

Commit

Permalink
Hack videoram to fix bitmap in radr (#1590)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahoneyt944 committed May 25, 2023
1 parent 471ea5a commit b9966de
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions src/vidhrdw/system32_vidhrdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1559,13 +1559,19 @@ VIDEO_UPDATE( system32 ) {
struct GfxElement *gfx=Machine->gfx[0];

const pen_t *paldata = &gfx->colortable[0];
/*
if ( code_pressed_memory(KEYCODE_C) )
static pen_t palcopy[MAX_COLOURS];
static int copy_videoram[57505];

if (paldata[0] == 16316664 && palcopy[0] != 16316664) /* copy palette and videoram for radr in ready state */
{
ppp++;
int i;
for(i = 0; i < MAX_COLOURS; i++)
palcopy[i] = paldata[i];

for(i = 0; i < 57505; i++)
copy_videoram[i] = sys32_videoram[i];
}
*/
for ( ycnt = 0 ; ycnt < 224 ; ycnt ++ )
{
destline = (UINT32 *)(bitmap->line[ycnt]);
Expand All @@ -1575,11 +1581,18 @@ VIDEO_UPDATE( system32 ) {
{
int data2;

data2 = sys32_videoram[256*ycnt+xcnt];


destline[xcnt*2+1] = paldata[(data2 >> 8)+(0x100*0x1d)]; /* 1d00 */
destline[xcnt*2] = paldata[(data2 &0xff)+(0x100*0x1d)];
if (!strcmp(Machine->gamedrv->name,"radr")) /* replace with copies */
{
data2 = copy_videoram[256*ycnt+xcnt];
destline[xcnt*2+1] = palcopy[(data2 >> 8)+(0x100*0x1d)]; /* 1d00 */
destline[xcnt*2] = palcopy[(data2 &0xff)+(0x100*0x1d)];
}
else if (!strcmp(Machine->gamedrv->name,"radm"))
{
data2 = sys32_videoram[256*ycnt+xcnt];
destline[xcnt*2+1] = paldata[(data2 >> 8)+(0x100*0x1d)]; /* 1d00 */
destline[xcnt*2] = paldata[(data2 &0xff)+(0x100*0x1d)];
}
}

}
Expand Down

0 comments on commit b9966de

Please sign in to comment.