Skip to content

Commit

Permalink
V2.6 : 02-Apr-2021 by wavemotion-dave
Browse files Browse the repository at this point in the history
  * Faster directory/file listing.
  * Support for the latest homebrews: Galaxian and Popeye
  * Improved scaling and offset handling using L/R + Arrow Keys to match other emulators.
  • Loading branch information
wavemotion-dave committed Apr 3, 2021
1 parent 123f850 commit 08eb9a4
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 17 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=2.5a
VERSION=2.6
TARGNAME=A7800DS

#---------------------------------------------------------------------------------
Expand Down
Binary file modified arm9/gfx/pdev_bg0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 35 additions & 9 deletions arm9/source/a7800utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,21 @@ void vblankIntr()

if (bRefreshXY)
{
cxBG = (cartridge_xOffset << 8);
cxBG = (cartridge_xOffset << 8);
cyBG = (cartridge_yOffset << 8);
xdxBG = ((320 / cartridge_xScale) << 8) | (320 % cartridge_xScale) ;
ydyBG = ((video_height / cartridge_yScale) << 8) | (video_height % cartridge_yScale);

REG_BG2X = cxBG;
REG_BG2Y = cyBG;
REG_BG3X = cxBG;
REG_BG3Y = cyBG;

REG_BG2PA = xdxBG;
REG_BG2PD = ydyBG;
REG_BG3PA = xdxBG;
REG_BG3PD = ydyBG;

bRefreshXY = false;
}
if (xx++ & 1)
Expand All @@ -190,9 +201,6 @@ void vblankIntr()
REG_BG2X = cxBG+jitter[2];
REG_BG2Y = cyBG+jitter[3];
}

//debug[0] = cartridge_xOffset;
//debug[1] = cartridge_yOffset;
}

void dsInitScreenMain(void)
Expand Down Expand Up @@ -565,6 +573,7 @@ unsigned int dsWaitForRom(void)
if (firstRomDisplay>nbRomPerPage) { firstRomDisplay -= nbRomPerPage; }
else { firstRomDisplay = 0; }
if (ucFicAct == 0) romSelected = 0;
if (romSelected > ucFicAct) romSelected = ucFicAct;
ucSHaut=0x01;
dsDisplayFiles(firstRomDisplay,romSelected);
}
Expand Down Expand Up @@ -862,11 +871,6 @@ void dsMainLoop(void)
if ( (keys_pressed & KEY_R) ) { cartridge_xOffset +=28; bRefreshXY = true; }
if ( (keys_pressed & KEY_L) ) { cartridge_xOffset -=28; bRefreshXY = true; }
}
else
{
if ( (keys_pressed & KEY_R) ) { cartridge_yOffset++; bRefreshXY = true; }
if ( (keys_pressed & KEY_L) ) { cartridge_yOffset--; bRefreshXY = true; }
}
}
dampen = 6;
} else dampen--;
Expand All @@ -891,6 +895,19 @@ void dsMainLoop(void)
if ( (keys_pressed & KEY_B) ) { tchepres(5); } // BUTTON #2
if ( (keys_pressed & KEY_Y) ) { tchepres(4); } // BUTTON #1
}

if ((keys_pressed & KEY_R) || (keys_pressed & KEY_L))
{
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_UP)) { cartridge_yOffset++; bRefreshXY = true; }
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_DOWN)) { cartridge_yOffset--; bRefreshXY = true; }
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_LEFT)) { cartridge_xOffset++; bRefreshXY = true; }
if ((keys_pressed & KEY_R) && (keys_pressed & KEY_RIGHT)) { cartridge_xOffset--; bRefreshXY = true; }

if ((keys_pressed & KEY_L) && (keys_pressed & KEY_UP)) if (cartridge_yScale <= 256) { cartridge_yScale++; bRefreshXY = true; }
if ((keys_pressed & KEY_L) && (keys_pressed & KEY_DOWN)) if (cartridge_yScale >= 192) { cartridge_yScale--; bRefreshXY = true; }
if ((keys_pressed & KEY_L) && (keys_pressed & KEY_RIGHT)) if (cartridge_xScale < 320) { cartridge_xScale++; bRefreshXY = true; }
if ((keys_pressed & KEY_L) && (keys_pressed & KEY_LEFT)) if (cartridge_xScale >= 192) { cartridge_xScale--; bRefreshXY = true; }
}

// -------------------------------------------------------------
// Stuff to do once/second such as FPS display and Debug Data
Expand Down Expand Up @@ -976,5 +993,14 @@ void proFindFiles(void) {
closedir(pdir);
}
if (countpro)
{
qsort (proromlist, countpro, sizeof (FICA7800), a78Filescmp);
}
else // Failsafe... always provide a back directory...
{
proromlist[countpro].directory = true;
strcpy(proromlist[countpro].filename,"..");
countpro = 1;
}

}
1 change: 1 addition & 0 deletions arm9/source/emu/Database.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Database_Entry game_list[] = {
{"e7d89669a7f92ec2cc99d9663a28671c", "Frenzy (w-Berzerk)", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, NO_STEALING, USES_WSYNC, HSC_YES, 30, 15, 320, 205}, // title=Frenzy (with Berzerk) (homebrew)
{"6053233cb59c0b4ca633623fd76c4576", "Froggie", CT_NORMAL, POKEY_AT_4000, JOY, JOY, DIFF_A, DIFF_A, NTSC, STEAL_CYCLE, USES_WSYNC, HSC_YES, 34, 16, 320, 205}, // title=Froggie (homebrew)
{"fb8d803b328b2e442548f7799cfa9a4a", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, STEAL_CYCLE, USES_WSYNC, HSC_YES, 0, 22, 256, 220}, // title=Galaga
{"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz", "Galaxian", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, STEAL_CYCLE, USES_WSYNC, HSC_YES, 0, 13, 256, 200}, // title=Galaxian
{"06204dadc975be5e5e37e7cc66f984cf", "Galaga", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, STEAL_CYCLE, USES_WSYNC, HSC_NO, 0, 22, 256, 220}, // title=Gato
{"e443f7fb5be3283dd44c0f5d80c3a7b3", "GoSub", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, STEAL_CYCLE, USES_WSYNC, HSC_NO, 12, 22, 280, 230}, // title=GoSub
{"fd9e78e201b6baafddfd3e1fbfe6ba31", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", CT_NORMAL, POKEY_NONE, JOY, JOY, DIFF_A, DIFF_A, NTSC, STEAL_CYCLE, USES_WSYNC, HSC_NO, 0, 22, 256, 220}, // title=Hat Trick
Expand Down
19 changes: 12 additions & 7 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ Philosophy :
--------------------------------------------------------------------------------
History :
--------------------------------------------------------------------------------
V2.6 : 02-Apr-2021 by wavemotion-dave
* Faster directory/file listing.
* Support for the latest homebrews: Galaxian and Popeye
* Improved scaling and offset handling using L/R + Arrow Keys to match other emulators.

V2.5 : 15-Jan-2021 by wavemotion-dave
* Added .A78 header naming search and as a backup filename search to help
properly identify the game being loaded so that the right settings can be applied.
Expand Down Expand Up @@ -126,13 +131,13 @@ to select a file, then use A to load it.

Controls :
* Direction pad : the joystick ...
* A : Fire button 1
* B : Fire button 2
* SELECT : SELECT Button
* START : PAUSE Button
* X : FPS Display
* Y : Fire Button 1 (for those that prefer not using A)
* L/R : Shift screen up/down by 1 pixel
* A : Fire button 1
* B : Fire button 2
* SELECT : SELECT Button
* START : PAUSE Button
* X : FPS Display
* Y : Fire Button 1 (for those that prefer not using A)
* L/R + DPAD : Used to Shift Offsets and Scale Screen to desired ratio

Use stylus on buttons for other actions on bottom screen.

Expand Down

0 comments on commit 08eb9a4

Please sign in to comment.