Skip to content

Commit

Permalink
Add fix for Badlands, Road Blaster and Bega's Battle on the RPi
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtBagXon committed Mar 13, 2021
1 parent c0d8a4d commit be31cfb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/cpu/mc6809.cpp
Expand Up @@ -226,7 +226,7 @@ static unsigned char fetch_buffer[MC6809_FETCH_BUFFER_SIZE];

/* le caractère 8-bit du MC6809 impose l'utilisation de char
pour la manipulation des opcodes qui sont des octets signés */
static char *op;
static signed char *op;
static int ad;
static int *regist[4], *exreg[16];
static int illegal_instruction_flag;
Expand Down Expand Up @@ -2004,7 +2004,7 @@ unsigned int mc6809_StepExec(unsigned int ncycles)

/* on remplit le buffer de fetch */
FetchInstr(pc, fetch_buffer);
op=(char*) fetch_buffer;
op=(signed char*) fetch_buffer;

/* on décode l'instruction */
r=(*(op++))&0xFF;
Expand Down Expand Up @@ -2049,7 +2049,7 @@ int mc6809_TimeExec(mc6809_clock_t time_limit)

/* on remplit le buffer de fetch */
FetchInstr(pc, fetch_buffer);
op=(char*) fetch_buffer;
op=(signed char*) fetch_buffer;

/* on décode l'instruction */
r=(*(op++))&0xFF;
Expand Down
4 changes: 2 additions & 2 deletions src/cpu/nes6502.cpp
Expand Up @@ -295,10 +295,10 @@
if (condition) \
{ \
IMMEDIATE_BYTE(btemp); \
if (((int8) btemp + (PC & 0x00FF)) & 0x100) \
if (((int8_t) btemp + (PC & 0x00FF)) & 0x100) \
ADD_CYCLES(1); \
ADD_CYCLES(3); \
PC += ((int8) btemp); \
PC += ((int8_t) btemp); \
} \
else \
{ \
Expand Down

0 comments on commit be31cfb

Please sign in to comment.