#define file_tag_type FILE *
- // The ARM arch uses SDL, and SDL requires you to know what resolution
- // you want. Define the resolution for ARM arch builds here.
- // Placed in common.h for use with video.c and gui.c.
-
- #ifndef PC_BUILD
-
- #define GP2X_SCREEN_WIDTH 320
- #define GP2X_SCREEN_HEIGHT 240
-
- #define GIZ_SCREEN_WIDTH 320
- #define GIZ_SCREEN_HEIGHT 240
-
- #ifdef GP2X_BUILD
- #define SDL_SCREEN_WIDTH GP2X_SCREEN_WIDTH
- #define SDL_SCREEN_HEIGHT GP2X_SCREEN_HEIGHT
-
- #elif defined(GIZ_BUILD)
-
- #define SDL_SCREEN_WIDTH GIZ_SCREEN_WIDTH
- #define SDL_SCREEN_HEIGHT GIZ_SCREEN_HEIGHT
- #endif
-
- #endif
-
#endif
// These must be variables, not constants.
s32 translate_block_thumb(u32 pc, translation_region_type translation_region,
u32 smc_enable);
-#ifdef GP2X_BUILD
-#define ROM_TRANSLATION_CACHE_SIZE (1024 * 512 * 4 * 5)
-#define RAM_TRANSLATION_CACHE_SIZE (1024 * 384 * 2)
-#define BIOS_TRANSLATION_CACHE_SIZE (1024 * 128 * 2)
-#define TRANSLATION_CACHE_LIMIT_THRESHOLD (1024 * 32)
-
-#else
+#ifdef PSP_BUILD
#define ROM_TRANSLATION_CACHE_SIZE (1024 * 512 * 4)
#define RAM_TRANSLATION_CACHE_SIZE (1024 * 384)
#define BIOS_TRANSLATION_CACHE_SIZE (1024 * 128)
#define TRANSLATION_CACHE_LIMIT_THRESHOLD (1024)
+#else
+
+#define ROM_TRANSLATION_CACHE_SIZE (1024 * 512 * 4 * 5)
+#define RAM_TRANSLATION_CACHE_SIZE (1024 * 384 * 2)
+#define BIOS_TRANSLATION_CACHE_SIZE (1024 * 128 * 2)
+#define TRANSLATION_CACHE_LIMIT_THRESHOLD (1024 * 32)
+
#endif
extern u8 rom_translation_cache[ROM_TRANSLATION_CACHE_SIZE];
memset(bios_rom + 0x4000, 0, 0x4000);
}
-#ifdef GP2X_BUILD
- #define cache_dump_prefix "/mnt/nand/"
-#else
- #define cache_dump_prefix ""
-#endif
+#define cache_dump_prefix ""
void dump_translation_cache()
{
#endif
-#ifndef GP2X_BUILD
-#include "gp2x/cpuctrl.h"
-#endif
-
#include "common.h"
#include "font.h"
#ifdef GP2X_BUILD
-#define FILE_LIST_ROWS ((int)((SDL_SCREEN_HEIGHT - 40) / FONT_HEIGHT))
+#define FILE_LIST_ROWS 20
#define FILE_LIST_POSITION 5
#define DIR_LIST_POSITION 260
#ifdef PSP_BUILD
+#define COLOR_BG color16(2, 8, 10)
+
#define color16(red, green, blue) \
(blue << 11) | (green << 5) | red \
#else
-#define color16(red, green, blue) \
- (red << 11) | (green << 5) | blue \
-
-#endif
-
-#ifdef GP2X_BUILD
-
#define COLOR_BG color16(0, 0, 0)
-#else
-
-#define COLOR_BG color16(2, 8, 10)
+#define color16(red, green, blue) \
+ (red << 11) | (green << 5) | blue \
#endif
BUTTON_ID_MENU // Vol middle
};
-extern u32 gp2x_fps_debug;
+extern u32 fps_debug;
extern u32 gpsp_gp2x_joystick_read(void);
gui_action_type get_gui_input()
break;
case BUTTON_ID_FPS:
- gp2x_fps_debug ^= 1;
+ fps_debug ^= 1;
break;
}
frameskip_type current_frameskip_type = auto_frameskip;
u32 global_cycles_per_instruction = 1;
u32 random_skip = 0;
+u32 fps_debug = 0;
#ifdef GP2X_BUILD
u32 frameskip_value = 2;
u64 frame_count_initial_timestamp = 0;
u64 last_frame_interval_timestamp;
-u32 gp2x_fps_debug = 0;
void gp2x_init(void);
void gp2x_quit(void);
sceKernelRegisterSubIntrHandler(PSP_VBLANK_INT, 0,
vblank_interrupt_handler, NULL);
sceKernelEnableSubIntr(PSP_VBLANK_INT, 0);
-#elif !defined(GP2X_BUILD)
- freopen("CON", "wb", stdout);
#endif
extern char *cpu_mode_names[];
update_gbc_sound(cpu_ticks);
- if(gp2x_fps_debug)
+ if(fps_debug)
{
char print_buffer[32];
sprintf(print_buffer, "%d (%d)", fps, frames_drawn);
extern u32 max_frameskip;
extern u32 num_skipped_frames;
+#else
+
+u32 file_length(u8 *dummy, FILE *fp);
+
#endif
#endif
-#ifdef PC_BUILD
-
-u32 file_length(u8 *dummy, FILE *fp);
-
-#endif
-
#define count_timer(timer_number) \
timer[timer_number].reload = 0x10000 - value; \
if(timer_number < 2) \
void bios_region_read_protect()
{
-#ifdef GP2X_BUILD
memory_map_read[0] = NULL;
-#endif
}
direct_sound_struct direct_sound_channel[2];
gbc_sound_struct gbc_sound_channel[4];
-#if defined(GP2X_BUILD) || defined(TAVI_BUILD)
u32 sound_frequency = 44100;
-#else
-u32 sound_frequency = 44100;
-#endif
SDL_AudioSpec sound_settings;
SDL_mutex *sound_mutex;
#endif
+void expand_blend(u32 *screen_src_ptr, u16 *screen_dest_ptr,
+ u32 start, u32 end);
+
#ifndef ARM_ARCH
void expand_blend(u32 *screen_src_ptr, u16 *screen_dest_ptr,