Skip to content

Commit

Permalink
Merged with coreupdate branch, so now the master branch has improved …
Browse files Browse the repository at this point in the history
…IRQ and SA-1. / Remove i386 asm codes.
  • Loading branch information
zones committed Jan 16, 2011
2 parents f918834 + 52defdc commit 82435ab
Show file tree
Hide file tree
Showing 47 changed files with 645 additions and 16,240 deletions.
11 changes: 0 additions & 11 deletions c4.cpp
Expand Up @@ -328,14 +328,3 @@ uint8 * S9xGetMemPointerC4 (uint16 Address)
return (NULL);
return (Memory.C4RAM - 0x6000 + (Address & 0xffff));
}

#ifdef ZSNES_C4
START_EXTERN_C

void C4LoaDMem (char *C4RAM)
{
memmove(C4RAM + (READ_WORD(C4RAM + 0x1f45) & 0x1fff), C4GetMemPointer(READ_3WORD(C4RAM + 0x1f40)), READ_WORD(C4RAM + 0x1f43));
}

END_EXTERN_C
#endif
13 changes: 0 additions & 13 deletions c4.h
Expand Up @@ -178,10 +178,6 @@
#ifndef _C4_H_
#define _C4_H_

#ifdef ZSNES_C4
START_EXTERN_C
#endif

extern int16 C4WFXVal;
extern int16 C4WFYVal;
extern int16 C4WFZVal;
Expand All @@ -195,10 +191,6 @@ extern int16 C41FAngleRes;
extern int16 C41FDist;
extern int16 C41FDistVal;

#ifdef ZSNES_C4
extern uint8 *C4Ram;
#endif

void C4TransfWireFrame (void);
void C4TransfWireFrame2 (void);
void C4CalcWireFrame (void);
Expand All @@ -208,11 +200,6 @@ void C4Op1F (void);
void S9xInitC4 (void);
void S9xSetC4 (uint8, uint16);
uint8 S9xGetC4 (uint16);

#ifdef ZSNES_C4
END_EXTERN_C
#endif

uint8 * S9xGetBasePointerC4 (uint16);
uint8 * S9xGetMemPointerC4 (uint16);

Expand Down
6 changes: 0 additions & 6 deletions cheats2.cpp
Expand Up @@ -186,12 +186,9 @@ static void S9xSetByteFree (uint8, uint32);
static uint8 S9xGetByteFree (uint32 address)
{
uint32 Cycles = CPU.Cycles;
uint32 WaitAddress = CPU.WaitAddress;
uint8 byte;

byte = S9xGetByte(address);

CPU.WaitAddress = WaitAddress;
CPU.Cycles = Cycles;

return (byte);
Expand All @@ -200,11 +197,8 @@ static uint8 S9xGetByteFree (uint32 address)
static void S9xSetByteFree (uint8 byte, uint32 address)
{
uint32 Cycles = CPU.Cycles;
uint32 WaitAddress = CPU.WaitAddress;

S9xSetByte(byte, address);

CPU.WaitAddress = WaitAddress;
CPU.Cycles = Cycles;
}

Expand Down
6 changes: 0 additions & 6 deletions controls.cpp
Expand Up @@ -425,7 +425,6 @@ static const int ptrspeeds[4] = { 1, 1, 4, 8 };
S(ToggleBG2), \
S(ToggleBG3), \
S(ToggleEmuTurbo), \
S(ToggleHDMA), \
S(ToggleSprites), \
S(ToggleTransparency) \

Expand Down Expand Up @@ -2454,11 +2453,6 @@ void S9xApplyCommand (s9xcommand_t cmd, int16 data1, int16 data2)
DisplayStateChange("Sprites", !(Settings.BG_Forced & 16));
break;

case ToggleHDMA:
Settings.DisableHDMA = !Settings.DisableHDMA;
DisplayStateChange("HDMA emulation", !Settings.DisableHDMA);
break;

case ToggleTransparency:
Settings.Transparency = !Settings.Transparency;
DisplayStateChange("Transparency effects", Settings.Transparency);
Expand Down
14 changes: 7 additions & 7 deletions cpu.cpp
Expand Up @@ -208,12 +208,16 @@ static void S9xResetCPU (void)
static void S9xSoftResetCPU (void)
{
CPU.Cycles = 182; // Or 188. This is the cycle count just after the jump to the Reset Vector.
CPU.PrevCycles = -1;
CPU.PrevCycles = CPU.Cycles;
CPU.V_Counter = 0;
CPU.Flags = CPU.Flags & (DEBUG_MODE_FLAG | TRACE_FLAG);
CPU.PCBase = NULL;
CPU.IRQActive = FALSE;
CPU.IRQPending = 0;
CPU.NMILine = FALSE;
CPU.IRQLine = FALSE;
CPU.IRQTransition = FALSE;
CPU.IRQLastState = FALSE;
CPU.IRQExternal = FALSE;
CPU.IRQPending = Timings.IRQPendCount;
CPU.MemSpeed = SLOW_ONE_CYCLE;
CPU.MemSpeedx2 = SLOW_ONE_CYCLE * 2;
CPU.FastROMSpeed = SLOW_ONE_CYCLE;
Expand All @@ -226,9 +230,6 @@ static void S9xSoftResetCPU (void)
CPU.WhichEvent = HC_RENDER_EVENT;
CPU.NextEvent = Timings.RenderPos;
CPU.WaitingForInterrupt = FALSE;
CPU.WaitAddress = 0xffffffff;
CPU.WaitCounter = 0;
CPU.PBPCAtOpcodeStart = 0xffffffff;
CPU.AutoSaveTimer = 0;
CPU.SRAMModified = FALSE;

Expand Down Expand Up @@ -261,7 +262,6 @@ static void S9xSoftResetCPU (void)

ICPU.S9xOpcodes = S9xOpcodesE1;
ICPU.S9xOpLengths = S9xOpLengthsM1X1;
ICPU.CPUExecuting = TRUE;

S9xUnpackStatus();
}
Expand Down

0 comments on commit 82435ab

Please sign in to comment.