Skip to content

Commit

Permalink
add (compile-time) option for legacy renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
skyfloogle committed Dec 10, 2023
1 parent 370a590 commit 9a46aa3
Show file tree
Hide file tree
Showing 8 changed files with 713 additions and 737 deletions.
3 changes: 3 additions & 0 deletions include/vb_dsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ void World2Display(int wNum, VB_WORLD WORLD_Buff[], BITMAP *wPlane, int img_n);
bool V810_DSP_Init();
void V810_DSP_Quit();

bool video_hard_init();
void video_hard_quit();

void V810_SetPal(int BRTA, int BRTB, int BRTC);

void V810_Dsp_Frame(int left);
Expand Down
1 change: 1 addition & 0 deletions include/vb_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ int options_frameskip(void);
int options_debug(void);
int options_sound(void);
int options_fastforward(void);
int options_legacyrender(void);
int options_input(void);
int options_saveoptions(void);
int emulation_resume(void);
Expand Down
1 change: 1 addition & 0 deletions include/vb_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ typedef struct VB_OPT {
int SOUND;
int DYNAREC;
int FASTFORWARD;
int HARDRENDER;
char *ROM_NAME; // Path\Name of game to open
char *PROG_NAME; // Path\Name of program
unsigned long CRC32; // CRC32 of ROM
Expand Down
14 changes: 12 additions & 2 deletions source/3ds/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ int main() {
Handle nothingEvent = 0;
svcCreateEvent(&nothingEvent, 0);

gfxInitDefault();
// gfxInit(GSP_RGB565_OES, GSP_RGB565_OES, false); // legacy renderer
gfxInitDefault(); // hardware renderer
fsInit();
archiveMountSdmc();

Expand All @@ -58,6 +59,7 @@ int main() {
#endif

V810_DSP_Init();
video_hard_init();

if (tVBOpt.DSPMODE == DM_3D) {
gfxSet3D(true);
Expand Down Expand Up @@ -139,7 +141,14 @@ int main() {
if((tVIPREG.FRMCYC & 0x00FF) < skip) {
skip = 0;
if (tVIPREG.DPCTRL & 0x0002) {
doAllTheDrawing();
if (tVBOpt.HARDRENDER) {
doAllTheDrawing();
} else {
V810_Dsp_Frame(0);
gfxFlushBuffers();
gfxSwapBuffers();
}

}
}

Expand Down Expand Up @@ -169,6 +178,7 @@ int main() {
v810_exit();
endThreads();
V810_DSP_Quit();
video_hard_quit();
if (tVBOpt.SOUND) sound_close();
drc_exit();

Expand Down
Loading

0 comments on commit 9a46aa3

Please sign in to comment.