-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move gbaSwitch function to a new .cpp file
ALSO: Add GBA borders for later use
- Loading branch information
1 parent
3b8632b
commit 080d79d
Showing
8 changed files
with
44 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "gbaswitch.h" | ||
#include "ndsLoaderArm9.h" | ||
|
||
//#include "gbaframe.h" | ||
//#include "gbaframe_srloader.h" | ||
|
||
//int gbaBorder = 0; | ||
|
||
void gbaSwitch(void) { | ||
vramSetBankA(VRAM_A_MAIN_BG); | ||
vramSetBankB(VRAM_B_MAIN_BG); | ||
/*if (gbaBorder == 2) { | ||
int bg3 = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 0,0); | ||
dmaCopy(gbaframe_srloaderBitmap, bgGetGfxPtr(bg3), 256*256); | ||
dmaCopy(gbaframe_srloaderPal, BG_PALETTE, 256*2); | ||
} else if (gbaBorder == 1) { | ||
int bg3 = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 0,0); | ||
dmaCopy(gbaframeBitmap, bgGetGfxPtr(bg3), 256*256); | ||
dmaCopy(gbaframePal, BG_PALETTE, 256*2); | ||
} else {*/ | ||
// Clear VRAM A and B to show black border for GBA mode | ||
for (u32 i = 0; i < 0x80000; i++) { | ||
*(u32*)(0x06000000+i) = 0; | ||
*(u32*)(0x06200000+i) = 0; | ||
} | ||
//} | ||
// Switch to GBA mode | ||
runNdsFile ("/_nds/srloader/gbaswitch.srldr", 0, NULL, false); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#ifndef GBASWITCH_H | ||
#define GBASWITCH_H | ||
|
||
#include <nds.h> | ||
|
||
extern void gbaSwitch(); | ||
|
||
#endif // GBASWITCH_H |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters