mirror of
https://github.com/libretro/libretro-o2em.git
synced 2024-11-27 02:10:24 +00:00
parent
94b48a0533
commit
3620390ea2
2
Makefile
2
Makefile
@ -128,7 +128,7 @@ include Makefile.common
|
||||
OBJECTS := $(SOURCES_C:.c=.o)
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
FLAGS += -O0 -g -DHAVE_DEBUG
|
||||
FLAGS += -O0 -g
|
||||
else
|
||||
FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
@ -4,6 +4,7 @@ SOURCES_C := $(CORE_DIR)/src/audio.c \
|
||||
$(CORE_DIR)/src/cpu.c \
|
||||
$(CORE_DIR)/src/crc32.c \
|
||||
$(CORE_DIR)/src/cset.c \
|
||||
$(CORE_DIR)/src/debug.c \
|
||||
$(CORE_DIR)/src/keyboard.c \
|
||||
$(CORE_DIR)/src/score.c \
|
||||
$(CORE_DIR)/src/table.c \
|
||||
@ -14,8 +15,3 @@ SOURCES_C := $(CORE_DIR)/src/audio.c \
|
||||
$(CORE_DIR)/src/vpp_cset.c \
|
||||
$(CORE_DIR)/libretro.c \
|
||||
$(CORE_DIR)/allegrowrapper/wrapalleg.c
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
SOURCES_C += \
|
||||
$(CORE_DIR)/src/debug.c
|
||||
endif
|
||||
|
@ -34,6 +34,7 @@ extern int destroy_bitmap(BITMAP *buff);
|
||||
extern void line(BITMAP *buff,int x1,int y1,int x2,int y2,unsigned char color);
|
||||
extern void rect(BITMAP *buff,int x,int y,int x2,int y2,unsigned char color);
|
||||
extern void rectfill(BITMAP *buff,int x,int y,int x2,int y2,unsigned char color);
|
||||
extern void alleg_upcase(char *p);
|
||||
extern void alleg_downcase(char *p);
|
||||
|
||||
extern unsigned char key[256*2];
|
||||
@ -46,6 +47,6 @@ extern void update_joy(void);
|
||||
#define TEX_WIDTH 400
|
||||
#define TEX_HEIGHT 300
|
||||
|
||||
#define RGB565(r, g, b) (((r) << (11)) | ((g) << 6) | (b))
|
||||
#define RGB565(r, g, b) (((r) << (5+6)) | ((g) << 6) | (b))
|
||||
|
||||
#endif
|
||||
|
@ -43,6 +43,7 @@ int sound_IRQ;
|
||||
static double flt_a=0.0, flt_b=0.0;
|
||||
static unsigned char flt_prv = 0;
|
||||
|
||||
|
||||
static void filter(unsigned char *buffer, unsigned long len)
|
||||
{
|
||||
static unsigned char buf[SOUND_BUFFER_LEN];
|
||||
|
@ -23,9 +23,7 @@
|
||||
#include "cpu.h"
|
||||
#include "keyboard.h"
|
||||
#include "config.h"
|
||||
#ifdef HAVE_DEBUG
|
||||
#include "debug.h"
|
||||
#endif
|
||||
#include "vdc.h"
|
||||
#include "vpp.h"
|
||||
#include "voice.h"
|
||||
@ -91,44 +89,38 @@ static unsigned int key_map[6][8]= {
|
||||
static void do_kluges(void);
|
||||
static void setvideomode(int t);
|
||||
|
||||
void run(void)
|
||||
{
|
||||
while(!key_done)
|
||||
{
|
||||
#ifdef HAVE_DEBUG
|
||||
if (key_debug)
|
||||
{
|
||||
app_data.debug=1;
|
||||
set_textmode();
|
||||
mute_audio();
|
||||
mute_voice();
|
||||
debug();
|
||||
grmode();
|
||||
app_data.debug=0;
|
||||
init_keyboard();
|
||||
init_sound_stream();
|
||||
}
|
||||
#endif
|
||||
void run(void){
|
||||
while(!key_done) {
|
||||
|
||||
cpu_exec();
|
||||
if (key_debug) {
|
||||
app_data.debug=1;
|
||||
set_textmode();
|
||||
mute_audio();
|
||||
mute_voice();
|
||||
debug();
|
||||
grmode();
|
||||
app_data.debug=0;
|
||||
init_keyboard();
|
||||
init_sound_stream();
|
||||
}
|
||||
|
||||
}
|
||||
close_audio();
|
||||
close_voice();
|
||||
close_display();
|
||||
cpu_exec();
|
||||
|
||||
}
|
||||
close_audio();
|
||||
close_voice();
|
||||
close_display();
|
||||
}
|
||||
|
||||
|
||||
void handle_vbl(void)
|
||||
{
|
||||
#ifdef HAVE_DEBUG
|
||||
if (!app_data.debug)
|
||||
{
|
||||
update_joy();
|
||||
update_audio();
|
||||
update_voice();
|
||||
}
|
||||
#endif
|
||||
draw_region();
|
||||
ext_IRQ();
|
||||
mstate = 1;
|
||||
@ -146,10 +138,9 @@ void handle_evbl(void)
|
||||
last_line=0;
|
||||
master_clk -= evblclk;
|
||||
frame++;
|
||||
#ifdef HAVE_DEBUG
|
||||
if (!app_data.debug)
|
||||
if (!app_data.debug) {
|
||||
finish_display();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (app_data.crc == 0xA7344D1F)
|
||||
{for (i=0; i<140; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user