diff --git a/A7800DS.nds b/A7800DS.nds index be724d1..6c36d7a 100644 Binary files a/A7800DS.nds and b/A7800DS.nds differ diff --git a/Makefile b/Makefile index 3d0a0dc..b26320b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=2.5a +VERSION=2.6 TARGNAME=A7800DS #--------------------------------------------------------------------------------- diff --git a/arm9/gfx/pdev_bg0.png b/arm9/gfx/pdev_bg0.png index d320653..d9f465c 100644 Binary files a/arm9/gfx/pdev_bg0.png and b/arm9/gfx/pdev_bg0.png differ diff --git a/arm9/source/a7800utils.c b/arm9/source/a7800utils.c index 2b7b128..d3954d6 100644 --- a/arm9/source/a7800utils.c +++ b/arm9/source/a7800utils.c @@ -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) @@ -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) @@ -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); } @@ -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--; @@ -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 @@ -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; + } + } diff --git a/arm9/source/emu/Database.c b/arm9/source/emu/Database.c index 3de6af3..38b1961 100644 --- a/arm9/source/emu/Database.c +++ b/arm9/source/emu/Database.c @@ -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 diff --git a/readme.txt b/readme.txt index 00c2ff3..7b387a0 100644 --- a/readme.txt +++ b/readme.txt @@ -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. @@ -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.