Skip to content

Commit

Permalink
Reversed logic on Cycle Stealing - it was backwards from old ProSyste…
Browse files Browse the repository at this point in the history
…m days.
  • Loading branch information
wavemotion-dave committed Oct 26, 2022
1 parent 8f21c6e commit 2a505dd
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 150 deletions.
Binary file modified A7800DS.nds
Binary file not shown.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=3.8
VERSION=3.8a
TARGNAME=A7800DS

#---------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Compatibility Table (on the faster DSi)
```
GAME MD5SUM HSC FPS NOTES
========================================================================================================================
Ace Of Aces 0be996d25144966d5541c9eb4919b289 NO 60 Minor graphical glitches. Very playable.
Ace Of Aces 0be996d25144966d5541c9eb4919b289 NO 60 Near perfect
Alien Brigade 877dcc97a775ed55081864b2dbf5f1e2 NO 60 Near perfect
Arkanoid Demo 212ee2a6e66d8bb7fbf26f343cc8dc19 NO 60 Playable though paddles would be nice.
Asteroids 07342c78619ba6ffcc61c10e907e3b50 YES 60 Near perfect
Expand Down
2 changes: 1 addition & 1 deletion arm9/source/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// ---------------------------
// Config handling...
// ---------------------------
#define CONFIG_VER 0x0003
#define CONFIG_VER 0x0004

#define MAX_CONFIGS 360

Expand Down
6 changes: 3 additions & 3 deletions arm9/source/emu/Cartridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ static void cartridge_ReadHeader(const byte* header) {
myCartInfo.cardctrl2 = header[56];
myCartInfo.region = header[57] & 1;
myCartInfo.hsc = (header[58]&1 ? HSC_YES:HSC_NO);
myCartInfo.steals_cycles = true; // By default, assume the cart steals cycles
myCartInfo.uses_wsync = true; // By default, assume the cart uses wsync
myCartInfo.steals_cycles = NO_STEALING; // By default, assume the cart does not steal cycles
myCartInfo.uses_wsync = true; // By default, assume the cart uses wsync
last_bank = 255;
}

Expand Down Expand Up @@ -420,7 +420,7 @@ void cartridge_Release( )
myCartInfo.hsc = false;
myCartInfo.cardctrl1 = 0;
myCartInfo.cardctrl2 = 0;
myCartInfo.steals_cycles = false;
myCartInfo.steals_cycles = NO_STEALING;
myCartInfo.uses_wsync = false;
myCartInfo.hasHeader = false;
last_bank = 255;
Expand Down
1 change: 1 addition & 0 deletions arm9/source/emu/Cartridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@

#define STEAL_CYCLE true
#define NO_STEALING false

#define USES_WSYNC true
#define SKIP_WSYNC false

Expand Down
282 changes: 141 additions & 141 deletions arm9/source/emu/Database.c

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions arm9/source/emu/ProSystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ITCM_CODE void prosystem_ExecuteFrame(const byte* input)
framePtr = (word*)(maria_surface);
sally_Execute(34);
maria_RenderScanlineTOP( );
if(myCartInfo.steals_cycles)
if(myCartInfo.steals_cycles == NO_STEALING)
{
prosystem_cycles += maria_cycles;
if(riot_timing) riot_UpdateTimer( maria_cycles >> 2 );
Expand Down Expand Up @@ -131,7 +131,7 @@ ITCM_CODE void prosystem_ExecuteFrame(const byte* input)

maria_RenderScanline( );

if(myCartInfo.steals_cycles)
if(myCartInfo.steals_cycles == NO_STEALING)
{
prosystem_cycles += maria_cycles;
if(riot_timing) riot_UpdateTimer( maria_cycles >> 2 );
Expand Down Expand Up @@ -167,7 +167,7 @@ ITCM_CODE void prosystem_ExecuteFrame(const byte* input)

maria_RenderScanline( );

if(myCartInfo.steals_cycles)
if(myCartInfo.steals_cycles == NO_STEALING)
{
prosystem_cycles += maria_cycles;
if(riot_timing) riot_UpdateTimer( maria_cycles >> 2 );
Expand Down

0 comments on commit 2a505dd

Please sign in to comment.