Skip to content

Commit

Permalink
pgm_draw: attempt at fixing BE regression with backgrounds
Browse files Browse the repository at this point in the history
  • Loading branch information
barbudreadmon committed Jul 19, 2023
1 parent c09270e commit c09901b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/burn/drv/pgm/pgm_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,8 @@ static void draw_background()
UINT16 *vram = (UINT16*)PGMBgRAM;

UINT16 *rowscroll = PGMRowRAM;
INT32 yscroll = (INT16)BURN_ENDIAN_SWAP_INT16((OldCodeMode) ? PGMVidReg[0x2000 / 2] : pgm_bg_scrolly);
INT32 xscroll = (INT16)BURN_ENDIAN_SWAP_INT16((OldCodeMode) ? PGMVidReg[0x3000 / 2] : pgm_bg_scrollx);
INT32 yscroll = ((OldCodeMode) ? ((INT16)BURN_ENDIAN_SWAP_INT16(PGMVidReg[0x2000 / 2])) : pgm_bg_scrolly);
INT32 xscroll = ((OldCodeMode) ? ((INT16)BURN_ENDIAN_SWAP_INT16(PGMVidReg[0x3000 / 2])) : pgm_bg_scrollx);

// check to see if we need to do line scroll
INT32 t = 0;
Expand Down

2 comments on commit c09901b

@barbudreadmon
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dinkc64 it fixed most issues, but demon front is still somehow missing the terrain, any idea ?

here

@dinkc64
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, try:
top of PgmVideoControllerWriteWord(), adding wordValue = BURN_ENDIAN_SWAP_INT16(wordValue);
note: the ReadWord variant of that function might need to be endianswapped, too. hmmm...

@crystalct Hi, maybe you could help? :)

best regards,

  • dink

Please sign in to comment.