diff --git a/src/main.cc b/src/main.cc index 9b60371..315fc59 100644 --- a/src/main.cc +++ b/src/main.cc @@ -402,7 +402,7 @@ int main(void) bool canWeAllocate3Mb = false; - if((!strncmp(osv, "03.", 3) && osv[3] <= '6') && gint[HWCALC] == HWCALC_FXCG50) + if((!strncmp(osv, "03.", 3) && osv[3] <= '6') && gint[HWCALC] == HWCALC_FXCG50) // CG-50 { extended_ram.name = "extram"; extended_ram.is_default = true; @@ -413,7 +413,7 @@ int main(void) kmalloc_add_arena(&extended_ram ); canWeAllocate3Mb = true; } - else if (gint[HWCALC] == HWCALC_PRIZM) + else if (gint[HWCALC] == HWCALC_PRIZM) // CG-10/20 { extended_ram.name = "extram"; @@ -430,6 +430,19 @@ int main(void) kmalloc_add_arena(&extended_ram ); canWeAllocate3Mb = false; + } + else if (gint[HWCALC] == HWCALC_FXCG_MANAGER) // CG-50 EMULATOR + { + + extended_ram.name = "extram"; + extended_ram.is_default = true; + extended_ram.start = (void *)0x88200000; + extended_ram.end = (void *)0x88500000 ; + + kmalloc_init_arena(&extended_ram, true); + kmalloc_add_arena(&extended_ram ); + canWeAllocate3Mb = true; + } else abort(); diff --git a/src/src/menus.cc b/src/src/menus.cc index 6bd417a..9625a3b 100644 --- a/src/src/menus.cc +++ b/src/src/menus.cc @@ -1,6 +1,7 @@ #include "../include/menus.h" #include #include +#include #include "../parameters.h" #include @@ -79,7 +80,8 @@ void drawStartTitle( void ) dfont(&autofont); - dprint_opt(198, 2, C_RGB(255,255,255), C_NONE, DTEXT_CENTER, DTEXT_TOP, "OUTRUN FOR FX-CG50" ); + if (gint[HWCALC] == HWCALC_FXCG50 || gint[HWCALC] == HWCALC_FXCG_MANAGER) dprint_opt(198, 2, C_RGB(255,255,255), C_NONE, DTEXT_CENTER, DTEXT_TOP, "OUTRUN FOR FX-CG50" ); + else if (gint[HWCALC] == HWCALC_PRIZM) dprint_opt(198, 2, C_RGB(255,255,255), C_NONE, DTEXT_CENTER, DTEXT_TOP, "OUTRUN FOR PRIZM" ); dprint_opt(198, 222, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_BOTTOM, "PRESS EXE TO START" ); @@ -437,8 +439,18 @@ void drawCredit( void ) dimage( 0, 0, &mainscreen ); dfont(&autofont); - dprint_opt(202, offset + 4, C_RGB(0,0,0), C_NONE, DTEXT_CENTER, DTEXT_TOP, "OUTRUN FOR GRAPH90" ); - dprint_opt(200, offset + 2, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_TOP, "OUTRUN FOR GRAPH90" ); + if (gint[HWCALC] == HWCALC_FXCG50 || gint[HWCALC] == HWCALC_FXCG_MANAGER) + { + dprint_opt(202, offset + 4, C_RGB(0,0,0), C_NONE, DTEXT_CENTER, DTEXT_TOP, "OUTRUN FOR FX-CG50" ); + dprint_opt(200, offset + 2, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_TOP, "OUTRUN FOR FX-CG50" ); + } + + else if (gint[HWCALC] == HWCALC_PRIZM) + { + dprint_opt(202, offset + 4, C_RGB(0,0,0), C_NONE, DTEXT_CENTER, DTEXT_TOP, "OUTRUN FOR PRIZM" ); + dprint_opt(200, offset + 2, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_CENTER, DTEXT_TOP, "OUTRUN FOR PRIZM" ); + } + dfont(&autofontsmall); dprint_opt(200, offset + 32, C_RGB(255,255,255), C_NONE, DTEXT_CENTER, DTEXT_TOP, "PROUDLY CODED BY" ); dprint_opt(200, offset + 62, C_RGB(255,255,255), C_NONE, DTEXT_CENTER, DTEXT_TOP, "SLYVTT / MARCH 2022" ); @@ -691,71 +703,71 @@ void drawGameOptions( void ) dfont(&autofont); - if (DiffLevel==0) - { - dprint_opt(94, 22, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); - if (GameOptionsSelection!=0) dprint_opt(92, 20, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); - else dprint_opt(92, 20, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); - } - else if (DiffLevel==1) - { - dprint_opt(94, 22, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); - if (GameOptionsSelection!=0) dprint_opt(92, 20, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); - else dprint_opt(92, 20, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); - } - else if (DiffLevel==2) - { - dprint_opt(94, 22, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); - if (GameOptionsSelection!=0) dprint_opt(92, 20, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); - else dprint_opt(92, 20, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); - } + if (DiffLevel==0) + { + dprint_opt(94, 22, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); + if (GameOptionsSelection!=0) dprint_opt(92, 20, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); + else dprint_opt(92, 20, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); + } + else if (DiffLevel==1) + { + dprint_opt(94, 22, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); + if (GameOptionsSelection!=0) dprint_opt(92, 20, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); + else dprint_opt(92, 20, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); + } + else if (DiffLevel==2) + { + dprint_opt(94, 22, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); + if (GameOptionsSelection!=0) dprint_opt(92, 20, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); + else dprint_opt(92, 20, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "LVL " ); + } - if (CarsNumb==0) - { - dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <50>" ); - if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <50>" ); - else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <50>" ); - } - else if (CarsNumb==1) - { - dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <100>" ); - if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <100>" ); - else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <100>" ); - } - else if (CarsNumb==2) - { - dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <200>" ); - if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <200>" ); - else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <200>" ); - } - else if (CarsNumb==3) - { - dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <300>" ); - if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <300>" ); - else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <300>" ); - } + if (CarsNumb==0) + { + dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <50>" ); + if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <50>" ); + else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <50>" ); + } + else if (CarsNumb==1) + { + dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <100>" ); + if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <100>" ); + else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <100>" ); + } + else if (CarsNumb==2) + { + dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <200>" ); + if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <200>" ); + else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <200>" ); + } + else if (CarsNumb==3) + { + dprint_opt(94, 52, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <300>" ); + if (GameOptionsSelection!=1) dprint_opt(92, 50, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <300>" ); + else dprint_opt(92, 50, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "CARS <300>" ); + } - dprint_opt(94, 82, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "PLAYER" ); - dprint_opt(92, 80, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "PLAYER" ); + dprint_opt(94, 82, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "PLAYER" ); + dprint_opt(92, 80, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "PLAYER" ); - dprint_opt(124, 112, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[0] ); - if (GameOptionsSelection!=2 || selectedChar!=0) dprint_opt(122, 110, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[0] ); - else if (GameOptionsSelection==2 && selectedChar==0) dprint_opt(122, 110, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[0] ); + dprint_opt(124, 112, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[0] ); + if (GameOptionsSelection!=2 || selectedChar!=0) dprint_opt(122, 110, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[0] ); + else if (GameOptionsSelection==2 && selectedChar==0) dprint_opt(122, 110, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[0] ); - dprint_opt(154, 112, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[1] ); - if (GameOptionsSelection!=2 || selectedChar!=1) dprint_opt(152, 110, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[1] ); - else if (GameOptionsSelection==2 && selectedChar==1) dprint_opt(152, 110, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[1] ); + dprint_opt(154, 112, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[1] ); + if (GameOptionsSelection!=2 || selectedChar!=1) dprint_opt(152, 110, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[1] ); + else if (GameOptionsSelection==2 && selectedChar==1) dprint_opt(152, 110, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[1] ); - dprint_opt(184, 112, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[2] ); - if (GameOptionsSelection!=2 || selectedChar!=2) dprint_opt(182, 110, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[2] ); - else if (GameOptionsSelection==2 && selectedChar==2) dprint_opt(182, 110, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[2] ); + dprint_opt(184, 112, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[2] ); + if (GameOptionsSelection!=2 || selectedChar!=2) dprint_opt(182, 110, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[2] ); + else if (GameOptionsSelection==2 && selectedChar==2) dprint_opt(182, 110, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "%c", PlayerName[2] ); - dfont(&speedfont); - dprint_opt(214, 112, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "@" ); - if (GameOptionsSelection!=2 || selectedChar!=3) dprint_opt(212, 110, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "@" ); - else if (GameOptionsSelection==2 && selectedChar==3) dprint_opt(212, 110, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "@" ); + dfont(&speedfont); + dprint_opt(214, 112, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "@" ); + if (GameOptionsSelection!=2 || selectedChar!=3) dprint_opt(212, 110, C_RGB(255,255,255), C_NONE, DTEXT_LEFT, DTEXT_TOP, "@" ); + else if (GameOptionsSelection==2 && selectedChar==3) dprint_opt(212, 110, C_RGB(pulse%256,0,pulse%256), C_NONE, DTEXT_LEFT, DTEXT_TOP, "@" ); dfont(&autofont); dprint_opt(94, 172, C_RGB(0,0,0), C_NONE, DTEXT_LEFT, DTEXT_TOP, "BACK TO GAME" ); @@ -1141,19 +1153,19 @@ void getInputCircuitDetails( void ) } -/* - if (key==KEY_UP || key==KEY_LEFT) - { - if (CircuitSelection==0) CircuitSelection=9; - else CircuitSelection--; - } + /* + if (key==KEY_UP || key==KEY_LEFT) + { + if (CircuitSelection==0) CircuitSelection=9; + else CircuitSelection--; + } - if (key==KEY_DOWN || key==KEY_RIGHT) - { - if (CircuitSelection==9) CircuitSelection=0; - else CircuitSelection++; - } -*/ + if (key==KEY_DOWN || key==KEY_RIGHT) + { + if (CircuitSelection==9) CircuitSelection=0; + else CircuitSelection++; + } + */ #if IS_FXLIB==1 if(keydown(KEY_7)) screenshot = true; @@ -1250,19 +1262,19 @@ void getInputBestTime( void ) } -/* - if (key==KEY_UP || key==KEY_LEFT) - { - if (CircuitSelection==0) CircuitSelection=9; - else CircuitSelection--; - } + /* + if (key==KEY_UP || key==KEY_LEFT) + { + if (CircuitSelection==0) CircuitSelection=9; + else CircuitSelection--; + } - if (key==KEY_DOWN || key==KEY_RIGHT) - { - if (CircuitSelection==9) CircuitSelection=0; - else CircuitSelection++; - } -*/ + if (key==KEY_DOWN || key==KEY_RIGHT) + { + if (CircuitSelection==9) CircuitSelection=0; + else CircuitSelection++; + } + */ #if IS_FXLIB==1 if(keydown(KEY_7)) screenshot = true;