mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 06:47:45 -04:00
major menu unification, minor reorganization
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@639 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
24b24674ae
commit
049a6b3e80
21 changed files with 1638 additions and 500 deletions
|
@ -31,7 +31,7 @@ else
|
|||
use_cyclone = 1
|
||||
endif
|
||||
|
||||
DEFINC = -I../.. -I. -DARM -D__GP2X__ # -DBENCHMARK
|
||||
DEFINC = -I../.. -I. -DARM -D__GP2X__ -DIN_GP2X # -DBENCHMARK
|
||||
COPT_COMMON = -static -Wall -Winline
|
||||
ifeq ($(DEBUG),)
|
||||
COPT_COMMON += -O3 -ftracer -fstrength-reduce -fomit-frame-pointer -fstrict-aliasing -ffast-math
|
||||
|
@ -54,14 +54,15 @@ LD = $(CROSS)ld
|
|||
OBJCOPY = $(CROSS)objcopy
|
||||
|
||||
# frontend
|
||||
OBJS += main.o menu.o gp2x.o emu.o squidgehack.o cpuctrl.o
|
||||
OBJS += main.o gp2x.o emu.o in_gp2x.o squidgehack.o cpuctrl.o
|
||||
# 940 core control
|
||||
OBJS += 940ctl.o
|
||||
|
||||
# common
|
||||
OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \
|
||||
platform/common/arm_utils.o platform/common/arm_linux.o platform/common/readpng.o \
|
||||
platform/common/mp3_helix.o platform/linux/usbjoy.o platform/linux/sndout_oss.o
|
||||
platform/common/mp3_helix.o platform/common/input.o platform/linux/usbjoy.o \
|
||||
platform/linux/sndout_oss.o platform/linux/plat.o
|
||||
|
||||
# Pico
|
||||
ifeq "$(amalgamate)" "1"
|
||||
|
|
25
gp2x/emu.c
25
gp2x/emu.c
|
@ -25,6 +25,7 @@
|
|||
#include "../common/input.h"
|
||||
#include "../linux/sndout_oss.h"
|
||||
#include "cpuctrl.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <pico/pico_int.h>
|
||||
#include <pico/patch.h>
|
||||
|
@ -40,11 +41,8 @@
|
|||
#endif
|
||||
|
||||
|
||||
int engineState;
|
||||
int select_exits = 0;
|
||||
|
||||
char romFileName[PATH_MAX];
|
||||
|
||||
extern int crashed_940;
|
||||
|
||||
static short __attribute__((aligned(4))) sndBuffer[2*44100/50];
|
||||
|
@ -1065,3 +1063,24 @@ void emu_ResetGame(void)
|
|||
reset_timing = 1;
|
||||
}
|
||||
|
||||
const char *plat_get_credits(void)
|
||||
{
|
||||
return "PicoDrive v" VERSION " (c) notaz, 2006-2009\n\n\n"
|
||||
"Credits:\n"
|
||||
"fDave: Cyclone 68000 core,\n"
|
||||
" base code of PicoDrive\n"
|
||||
"Reesy & FluBBa: DrZ80 core\n"
|
||||
"MAME devs: YM2612 and SN76496 cores\n"
|
||||
"rlyeh and others: minimal SDK\n"
|
||||
"Squidge: squidgehack\n"
|
||||
"Dzz: ARM940 sample\n"
|
||||
"GnoStiC / Puck2099: USB joy code\n"
|
||||
"craigix: GP2X hardware\n"
|
||||
"ketchupgun: skin design\n"
|
||||
"\n"
|
||||
"special thanks (for docs, ideas):\n"
|
||||
" Charles MacDonald, Haze,\n"
|
||||
" Stephane Dallongeville,\n"
|
||||
" Lordus, Exophase, Rokas,\n"
|
||||
" Nemesis, Tasco Deluxe";
|
||||
}
|
||||
|
|
|
@ -4,14 +4,9 @@
|
|||
// For commercial use, separate licencing terms must be obtained.
|
||||
|
||||
|
||||
extern char romFileName[];
|
||||
extern int engineState;
|
||||
|
||||
|
||||
void emu_Init(void);
|
||||
void emu_Deinit(void);
|
||||
void emu_Loop(void);
|
||||
void emu_ResetGame(void);
|
||||
|
||||
void osd_text(int x, int y, const char *text);
|
||||
|
||||
|
|
|
@ -103,7 +103,9 @@ static int in_gp2x_menu_translate(int keycode)
|
|||
case BTN_RIGHT: return PBTN_RIGHT;
|
||||
case BTN_B: return PBTN_MOK;
|
||||
case BTN_X: return PBTN_MBACK;
|
||||
case BTN_START: return PBTN_MENU;
|
||||
case BTN_SELECT:return PBTN_MENU;
|
||||
case BTN_L: return PBTN_L;
|
||||
case BTN_R: return PBTN_R;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
|
11
gp2x/main.c
11
gp2x/main.c
|
@ -16,6 +16,7 @@
|
|||
#include "../common/emu.h"
|
||||
#include "../common/config.h"
|
||||
#include "../common/input.h"
|
||||
#include "../common/plat.h"
|
||||
#include "emu.h"
|
||||
#include "940ctl.h"
|
||||
#include "version.h"
|
||||
|
@ -61,9 +62,9 @@ void parse_cmd_line(int argc, char *argv[])
|
|||
} else {
|
||||
/* External Frontend: ROM Name */
|
||||
FILE *f;
|
||||
strncpy(romFileName, argv[x], PATH_MAX);
|
||||
romFileName[PATH_MAX-1] = 0;
|
||||
f = fopen(romFileName, "rb");
|
||||
strncpy(rom_fname_reload, argv[x], PATH_MAX);
|
||||
rom_fname_reload[PATH_MAX-1] = 0;
|
||||
f = fopen(rom_fname_reload, "rb");
|
||||
if (f) fclose(f);
|
||||
else unrecognized = 1;
|
||||
engineState = PGS_ReloadRom;
|
||||
|
@ -122,7 +123,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (engineState == PGS_ReloadRom)
|
||||
{
|
||||
if (emu_ReloadRom(romFileName)) {
|
||||
if (emu_ReloadRom(rom_fname_reload)) {
|
||||
engineState = PGS_Running;
|
||||
if (load_state_slot >= 0) {
|
||||
state_slot = load_state_slot;
|
||||
|
@ -140,7 +141,7 @@ int main(int argc, char *argv[])
|
|||
break;
|
||||
|
||||
case PGS_ReloadRom:
|
||||
if (emu_ReloadRom(romFileName))
|
||||
if (emu_ReloadRom(rom_fname_reload))
|
||||
engineState = PGS_Running;
|
||||
else {
|
||||
printf("PGS_ReloadRom == 0\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue