mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
get rid of port_config.h
This commit is contained in:
parent
5609d343e3
commit
9c9cda8c39
21 changed files with 73 additions and 288 deletions
|
@ -10,7 +10,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#ifndef NO_SYNC
|
||||
#ifdef __GP2X__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
@ -28,15 +28,20 @@
|
|||
#include <pico/pico_int.h>
|
||||
#include <pico/patch.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
#define PATH_SEP "/"
|
||||
#define PATH_SEP_C '/'
|
||||
#else
|
||||
#define PATH_SEP "\\"
|
||||
#define PATH_SEP_C '\\'
|
||||
#endif
|
||||
|
||||
#define STATUS_MSG_TIMEOUT 2000
|
||||
|
||||
void *g_screen_ptr;
|
||||
|
||||
#if !SCREEN_SIZE_FIXED
|
||||
int g_screen_width = SCREEN_WIDTH;
|
||||
int g_screen_height = SCREEN_HEIGHT;
|
||||
#endif
|
||||
int g_screen_width = 320;
|
||||
int g_screen_height = 240;
|
||||
|
||||
char *PicoConfigFile = "config.cfg";
|
||||
currentConfig_t currentConfig, defaultConfig;
|
||||
|
@ -649,7 +654,7 @@ int emu_write_config(int is_game)
|
|||
lprintf("emu_write_config: %s ", cfg);
|
||||
ret = config_write(cfg);
|
||||
if (write_lrom) config_writelrom(cfg);
|
||||
#ifndef NO_SYNC
|
||||
#ifdef __GP2X__
|
||||
sync();
|
||||
#endif
|
||||
lprintf((ret == 0) ? "(ok)\n" : "(failed)\n");
|
||||
|
@ -859,7 +864,7 @@ int emu_save_load_game(int load, int sram)
|
|||
ret = fwrite(sram_data, 1, sram_size, sramFile);
|
||||
ret = (ret != sram_size) ? -1 : 0;
|
||||
fclose(sramFile);
|
||||
#ifndef NO_SYNC
|
||||
#ifdef __GP2X__
|
||||
sync();
|
||||
#endif
|
||||
}
|
||||
|
@ -870,7 +875,7 @@ int emu_save_load_game(int load, int sram)
|
|||
{
|
||||
ret = PicoState(saveFname, !load);
|
||||
if (!ret) {
|
||||
#ifndef NO_SYNC
|
||||
#ifdef __GP2X__
|
||||
if (!load) sync();
|
||||
#endif
|
||||
emu_status_msg(load ? "STATE LOADED" : "STATE SAVED");
|
||||
|
@ -1198,7 +1203,7 @@ void emu_finish(void)
|
|||
char cfg[512];
|
||||
make_config_cfg(cfg);
|
||||
config_writelrom(cfg);
|
||||
#ifndef NO_SYNC
|
||||
#ifdef __GP2X__
|
||||
sync();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
* See COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#include "port_config.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -16,14 +14,8 @@ extern "C" {
|
|||
|
||||
extern void *g_screen_ptr;
|
||||
|
||||
#if SCREEN_SIZE_FIXED
|
||||
#define g_screen_width SCREEN_WIDTH
|
||||
#define g_screen_height SCREEN_HEIGHT
|
||||
#else
|
||||
extern int g_screen_width;
|
||||
extern int g_screen_height;
|
||||
#endif
|
||||
|
||||
|
||||
#define EOPT_EN_SRAM (1<<0)
|
||||
#define EOPT_SHOW_FPS (1<<1)
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
// port specific settings
|
||||
|
||||
#ifndef PORT_CONFIG_H
|
||||
#define PORT_CONFIG_H
|
||||
|
||||
#define CASE_SENSITIVE_FS 0
|
||||
#define DONT_OPEN_MANY_FILES 0
|
||||
#define REDUCE_IO_CALLS 0
|
||||
#define SIMPLE_WRITE_SOUND 0
|
||||
|
||||
#define SCREEN_SIZE_FIXED 1
|
||||
#define SCREEN_WIDTH 321
|
||||
#define SCREEN_HEIGHT 240
|
||||
#define MSCREEN_SIZE_FIXED 1
|
||||
#define MSCREEN_WIDTH SCREEN_WIDTH
|
||||
#define MSCREEN_HEIGHT SCREEN_HEIGHT
|
||||
|
||||
// draw2.c
|
||||
#define START_ROW 0 // which row of tiles to start rendering at?
|
||||
#define END_ROW 28 // ..end
|
||||
|
||||
// pico.c
|
||||
#define CAN_HANDLE_240_LINES 1
|
||||
|
||||
// logging emu events
|
||||
#define EL_LOGMASK (EL_STATUS|EL_IDLE) // (EL_STATUS|EL_ANOMALY|EL_UIO|EL_SRAMIO|EL_INTS|EL_CDPOLL) // xffff
|
||||
|
||||
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
|
||||
#define dprintf(x...)
|
||||
|
||||
// platform
|
||||
#define PATH_SEP "/" // because of cegcc
|
||||
#define PATH_SEP_C '/'
|
||||
#define MENU_X2 0
|
||||
|
||||
#endif //PORT_CONFIG_H
|
|
@ -1,37 +0,0 @@
|
|||
// port specific settings
|
||||
|
||||
#ifndef PORT_CONFIG_H
|
||||
#define PORT_CONFIG_H
|
||||
|
||||
#define CASE_SENSITIVE_FS 1 // CS filesystem
|
||||
#define DONT_OPEN_MANY_FILES 0
|
||||
#define REDUCE_IO_CALLS 0
|
||||
#define SIMPLE_WRITE_SOUND 0
|
||||
|
||||
#define SCREEN_SIZE_FIXED 1
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
#define MSCREEN_SIZE_FIXED 1
|
||||
#define MSCREEN_WIDTH SCREEN_WIDTH
|
||||
#define MSCREEN_HEIGHT SCREEN_HEIGHT
|
||||
|
||||
// draw2.c
|
||||
#define START_ROW 0 // which row of tiles to start rendering at?
|
||||
#define END_ROW 28 // ..end
|
||||
|
||||
// pico.c
|
||||
#define CAN_HANDLE_240_LINES 1
|
||||
|
||||
// logging emu events
|
||||
#define EL_LOGMASK (EL_STATUS)
|
||||
// (EL_STATUS|EL_ANOMALY|EL_UIO|EL_SRAMIO|EL_INTS|EL_CDPOLL|EL_IDLE)
|
||||
|
||||
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
|
||||
#define dprintf(x...)
|
||||
|
||||
// platform
|
||||
#define PATH_SEP "/"
|
||||
#define PATH_SEP_C '/'
|
||||
#define MENU_X2 0
|
||||
|
||||
#endif //PORT_CONFIG_H
|
|
@ -1 +1 @@
|
|||
Subproject commit 8ef1ad3218d7677f3dbf279095cd2fc58966547f
|
||||
Subproject commit ebf0e111a84cbd73511cc2b935c7bd688638cf5e
|
|
@ -31,7 +31,7 @@ int current_keys;
|
|||
static int current_bpp = 16;
|
||||
static int current_pal[256];
|
||||
static const char *verstring = "PicoDrive " VERSION;
|
||||
static int scr_changed = 0, scr_w = SCREEN_WIDTH, scr_h = SCREEN_HEIGHT;
|
||||
static int scr_changed = 0, scr_w = 320, scr_h = 240;
|
||||
|
||||
/* faking GP2X pad */
|
||||
enum { GP2X_UP=0x1, GP2X_LEFT=0x4, GP2X_DOWN=0x10, GP2X_RIGHT=0x40,
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
// port specific settings
|
||||
|
||||
#ifndef PORT_CONFIG_H
|
||||
#define PORT_CONFIG_H
|
||||
|
||||
#define NO_SYNC
|
||||
|
||||
#define CASE_SENSITIVE_FS 1 // CS filesystem
|
||||
#define DONT_OPEN_MANY_FILES 0
|
||||
#define REDUCE_IO_CALLS 0
|
||||
|
||||
#define SCREEN_SIZE_FIXED 0
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
#define MSCREEN_SIZE_FIXED 0
|
||||
#define MSCREEN_WIDTH SCREEN_WIDTH
|
||||
#define MSCREEN_HEIGHT SCREEN_HEIGHT
|
||||
|
||||
// draw2.c
|
||||
#define START_ROW 0 // which row of tiles to start rendering at?
|
||||
#define END_ROW 28 // ..end
|
||||
|
||||
// pico.c
|
||||
#define CAN_HANDLE_240_LINES 1
|
||||
|
||||
#define SIMPLE_WRITE_SOUND 0
|
||||
#define mix_32_to_16l_stereo_lvl mix_32_to_16l_stereo
|
||||
|
||||
#define EL_LOGMASK (EL_STATUS|EL_ANOMALY|EL_UIO)
|
||||
// EL_VDPDMA|EL_ASVDP|EL_SR | EL_IDLE | EL_BUSREQ|EL_Z80BNK | EL_32X)
|
||||
|
||||
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
|
||||
#define dprintf(x...)
|
||||
|
||||
// platform
|
||||
#define PATH_SEP "/"
|
||||
#define PATH_SEP_C '/'
|
||||
|
||||
#endif //PORT_CONFIG_H
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
// port specific settings
|
||||
|
||||
#ifndef PORT_CONFIG_H
|
||||
#define PORT_CONFIG_H
|
||||
|
||||
#define CASE_SENSITIVE_FS 1 // CS filesystem
|
||||
#define DONT_OPEN_MANY_FILES 0
|
||||
#define REDUCE_IO_CALLS 0
|
||||
|
||||
#define SCREEN_SIZE_FIXED 1
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
#define MSCREEN_SIZE_FIXED 0
|
||||
#define MSCREEN_WIDTH SCREEN_WIDTH
|
||||
#define MSCREEN_HEIGHT SCREEN_HEIGHT
|
||||
|
||||
// draw2.c
|
||||
#define START_ROW 0 // which row of tiles to start rendering at?
|
||||
#define END_ROW 28 // ..end
|
||||
|
||||
// pico.c
|
||||
#define CAN_HANDLE_240_LINES 1
|
||||
|
||||
#define SIMPLE_WRITE_SOUND 0
|
||||
|
||||
// logging emu events
|
||||
#define EL_LOGMASK (EL_STATUS|EL_IDLE) // (EL_STATUS|EL_ANOMALY|EL_UIO|EL_SRAMIO|EL_INTS|EL_CDPOLL) // xffff
|
||||
|
||||
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
|
||||
#define dprintf(x...)
|
||||
|
||||
// platform
|
||||
#define PATH_SEP "/"
|
||||
#define PATH_SEP_C '/'
|
||||
#define MENU_X2 1
|
||||
|
||||
#endif //PORT_CONFIG_H
|
|
@ -1,42 +0,0 @@
|
|||
// port specific settings
|
||||
|
||||
#ifndef PORT_CONFIG_H
|
||||
#define PORT_CONFIG_H
|
||||
|
||||
#define CASE_SENSITIVE_FS 0
|
||||
#define DONT_OPEN_MANY_FILES 1 // work around the stupid PSP ~10 open file limit
|
||||
#define REDUCE_IO_CALLS 1 // another workaround
|
||||
#define SIMPLE_WRITE_SOUND 0
|
||||
|
||||
#define SCREEN_SIZE_FIXED 1
|
||||
#define SCREEN_WIDTH 512
|
||||
#define SCREEN_HEIGHT 272
|
||||
#define MSCREEN_SIZE_FIXED 1
|
||||
#define MSCREEN_WIDTH SCREEN_WIDTH
|
||||
#define MSCREEN_HEIGHT SCREEN_HEIGHT
|
||||
|
||||
// draw.c
|
||||
#define USE_BGR555 1
|
||||
|
||||
// draw2.c
|
||||
#define START_ROW 0 // which row of tiles to start rendering at?
|
||||
#define END_ROW 28 // ..end
|
||||
#define DRAW2_OVERRIDE_LINE_WIDTH 512
|
||||
|
||||
// pico.c
|
||||
extern void blit1(void);
|
||||
#define DRAW_FINISH_FUNC blit1
|
||||
#define CAN_HANDLE_240_LINES 1
|
||||
|
||||
// logging emu events
|
||||
#define EL_LOGMASK (EL_STATUS|EL_IDLE) // (EL_STATUS|EL_ANOMALY|EL_UIO|EL_SRAMIO) // xffff
|
||||
|
||||
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
|
||||
#define dprintf(x...)
|
||||
|
||||
// platform
|
||||
#define PATH_SEP "/"
|
||||
#define PATH_SEP_C '/'
|
||||
#define MENU_X2 0
|
||||
|
||||
#endif //PORT_CONFIG_H
|
|
@ -1,40 +0,0 @@
|
|||
// port specific settings
|
||||
|
||||
#ifndef PORT_CONFIG_H
|
||||
#define PORT_CONFIG_H
|
||||
|
||||
#define NO_SYNC
|
||||
|
||||
#define CASE_SENSITIVE_FS 0 // CS filesystem
|
||||
#define DONT_OPEN_MANY_FILES 0
|
||||
#define REDUCE_IO_CALLS 0
|
||||
|
||||
#define SCREEN_SIZE_FIXED 0
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
#define MSCREEN_SIZE_FIXED 0
|
||||
#define MSCREEN_WIDTH SCREEN_WIDTH
|
||||
#define MSCREEN_HEIGHT SCREEN_HEIGHT
|
||||
|
||||
// draw2.c
|
||||
#define START_ROW 0 // which row of tiles to start rendering at?
|
||||
#define END_ROW 28 // ..end
|
||||
|
||||
// pico.c
|
||||
#define CAN_HANDLE_240_LINES 1
|
||||
|
||||
#define SIMPLE_WRITE_SOUND 1
|
||||
#define mix_32_to_16l_stereo_lvl mix_32_to_16l_stereo
|
||||
|
||||
#define EL_LOGMASK (EL_STATUS)
|
||||
|
||||
//#define dprintf(f,...) printf("%05i:%03i: " f "\n",Pico.m.frame_count,Pico.m.scanline,##__VA_ARGS__)
|
||||
#define dprintf(x...)
|
||||
|
||||
// platform
|
||||
#define PATH_SEP "\\"
|
||||
#define PATH_SEP_C '\\'
|
||||
#define MENU_X2 0
|
||||
|
||||
#endif //PORT_CONFIG_H
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue