Add makefile for Raspberry Pi 1

This commit is contained in:
Chips-fr 2015-10-04 23:49:14 +02:00
parent 13e8e8322f
commit 3f743e49be
8 changed files with 242 additions and 41 deletions

176
Makefile_rpi1 Normal file
View file

@ -0,0 +1,176 @@
PREFIX =/usr
#SDL_BASE = $(PREFIX)/bin/
SDL_BASE =
NAME = uae4arm
O = o
RM = rm -f
CXX = g++-4.8
STRIP = strip
#AS = as
PROG = $(NAME)
all: $(PROG)
PANDORA=1
DEFAULT_CFLAGS = `$(SDL_BASE)sdl-config --cflags`
LDFLAGS = -lSDL -lpthread -lz -lSDL_image -lpng -lrt
MORE_CFLAGS += -DGP2X -DPANDORA -DDOUBLEBUFFER -DARMV6_ASSEMBLY -DRASPBERRY -DSIX_AXIS_WORKAROUND
MORE_CFLAGS += -DSUPPORT_THREADS -DUAE_FILESYS_THREADS -DNO_MAIN_IN_MAIN_C -DFILESYS -DAUTOCONFIG -DSAVESTATE
MORE_CFLAGS += -DDONT_PARSE_CMDLINE
#MORE_CFLAGS += -DWITH_LOGGING
MORE_CFLAGS += -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads
MORE_CFLAGS += -DJIT -DCPU_arm -DARM_ASSEMBLY
MORE_CFLAGS += -Isrc -Isrc/od-pandora -Isrc/gp2x -Isrc/threaddep -Isrc/menu -Isrc/include -Isrc/gp2x/menu -fomit-frame-pointer -Wno-unused -Wno-format -DUSE_SDL -DGCCCONSTFUNC="__attribute__((const))" -DUSE_UNDERSCORE -DUNALIGNED_PROFITABLE -DOPTIMIZED_FLAGS
LDFLAGS += -lSDL_ttf -lguichan_sdl -lguichan -lbcm_host -L/opt/vc/lib
MORE_CFLAGS += -fexceptions -fpermissive
MORE_CFLAGS += -DROM_PATH_PREFIX=\"./\" -DDATA_PREFIX=\"./data/\" -DSAVE_PREFIX=\"./saves/\"
MORE_CFLAGS += -mhard-float -ffast-math -mfpu=vfp -mfloat-abi=hard -march=armv6j
ifndef DEBUG
MORE_CFLAGS += -O3
MORE_CFLAGS += -fstrict-aliasing
MORE_CFLAGS += -fweb -frename-registers -fomit-frame-pointer
#MORE_CFLAGS += -falign-functions=32 -falign-loops -falign-labels -falign-jumps
MORE_CFLAGS += -finline -finline-functions -fno-builtin
#MORE_CFLAGS += -S
else
MORE_CFLAGS += -ggdb
endif
ASFLAGS += -mfloat-abi=hard -mfpu=vfp
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
CFLAGS+= -DCPUEMU_0 -DCPUEMU_11 -DFPUEMU
OBJS = \
src/audio.o \
src/autoconf.o \
src/blitfunc.o \
src/blittable.o \
src/blitter.o \
src/cfgfile.o \
src/cia.o \
src/crc32.o \
src/custom.o \
src/disk.o \
src/drawing.o \
src/ersatz.o \
src/expansion.o \
src/filesys.o \
src/fpp.o \
src/fsdb.o \
src/fsdb_unix.o \
src/fsusage.o \
src/gfxutil.o \
src/hardfile.o \
src/inputdevice.o \
src/keybuf.o \
src/main.o \
src/memory.o \
src/missing.o \
src/native2amiga.o \
src/savestate.o \
src/scsi-none.o \
src/traps.o \
src/uaelib.o \
src/zfile.o \
src/zfile_archive.o \
src/archivers/7z/7zAlloc.o \
src/archivers/7z/7zBuffer.o \
src/archivers/7z/7zCrc.o \
src/archivers/7z/7zDecode.o \
src/archivers/7z/7zExtract.o \
src/archivers/7z/7zHeader.o \
src/archivers/7z/7zIn.o \
src/archivers/7z/7zItem.o \
src/archivers/7z/7zMethodID.o \
src/archivers/7z/LzmaDecode.o \
src/archivers/dms/crc_csum.o \
src/archivers/dms/getbits.o \
src/archivers/dms/maketbl.o \
src/archivers/dms/pfile.o \
src/archivers/dms/tables.o \
src/archivers/dms/u_deep.o \
src/archivers/dms/u_heavy.o \
src/archivers/dms/u_init.o \
src/archivers/dms/u_medium.o \
src/archivers/dms/u_quick.o \
src/archivers/dms/u_rle.o \
src/archivers/wrp/warp.o \
src/archivers/zip/unzip.o \
src/md-pandora/support.o \
src/od-pandora/fsdb_host.o \
src/od-pandora/joystick.o \
src/od-pandora/keyboard.o \
src/od-pandora/inputmode.o \
src/od-pandora/writelog.o \
src/od-pandora/pandora.o \
src/od-pandora/pandora_filesys.o \
src/od-pandora/pandora_gui.o \
src/od-rasp/rasp_gfx.o \
src/od-pandora/pandora_mem.o \
src/od-pandora/sigsegv_handler.o \
src/od-pandora/menu/menu_config.o \
src/sd-sdl/sound_sdl_new.o \
src/od-pandora/gui/UaeRadioButton.o \
src/od-pandora/gui/UaeDropDown.o \
src/od-pandora/gui/UaeCheckBox.o \
src/od-pandora/gui/UaeListBox.o \
src/od-pandora/gui/InGameMessage.o \
src/od-pandora/gui/SelectorEntry.o \
src/od-pandora/gui/ShowMessage.o \
src/od-pandora/gui/SelectFolder.o \
src/od-pandora/gui/SelectFile.o \
src/od-pandora/gui/EditFilesysVirtual.o \
src/od-pandora/gui/EditFilesysHardfile.o \
src/od-pandora/gui/PanelPaths.o \
src/od-pandora/gui/PanelConfig.o \
src/od-pandora/gui/PanelCPU.o \
src/od-pandora/gui/PanelChipset.o \
src/od-pandora/gui/PanelROM.o \
src/od-pandora/gui/PanelRAM.o \
src/od-pandora/gui/PanelFloppy.o \
src/od-pandora/gui/PanelHD.o \
src/od-pandora/gui/PanelDisplay.o \
src/od-pandora/gui/PanelSound.o \
src/od-pandora/gui/PanelInput.o \
src/od-pandora/gui/PanelMisc.o \
src/od-pandora/gui/PanelSavestate.o \
src/od-pandora/gui/main_window.o \
src/od-pandora/gui/Navigation.o
ifdef PANDORA
OBJS += src/od-pandora/gui/sdltruetypefont.o
endif
OBJS += src/newcpu.o
OBJS += src/readcpu.o
OBJS += src/cpudefs.o
OBJS += src/cpustbl.o
OBJS += src/cpuemu_0.o
OBJS += src/cpuemu_11.o
OBJS += src/compemu.o
OBJS += src/compemu_fpp.o
OBJS += src/compstbl.o
OBJS += src/compemu_support.o
CPPFLAGS = $(CFLAGS)
$(PROG): $(OBJS)
$(CXX) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
ifndef DEBUG
$(STRIP) $(PROG)
endif
clean:
$(RM) $(PROG) $(OBJS)

View file

@ -834,6 +834,15 @@ STATIC_INLINE void reset_data_buffer(void)
********************************************************************/
void emit_trace_pc(uae_u8 i);
#ifndef USE_ARMNEON
extern "C" {
void TRACE_Start(void)
{
// TBD for non neon platform...
}
}
#endif
#if defined(CPU_arm)
#include "codegen_arm.cpp"
#else

View file

@ -2076,6 +2076,7 @@ static void draw_status_line (int line)
int on_rgb, off_rgb, c;
uae_u8 *buf;
#ifdef PICASSO96
if(picasso_on)
{
#ifdef RASPBERRY
@ -2090,6 +2091,7 @@ static void draw_status_line (int line)
#endif
}
else
#endif
{
x = gfxvidinfo.width - TD_PADX - 6 * TD_WIDTH;
y = line - (gfxvidinfo.height - TD_TOTAL_HEIGHT);
@ -2097,7 +2099,7 @@ static void draw_status_line (int line)
}
x+=100 - (TD_WIDTH*(currprefs.nr_floppies-1)) - TD_WIDTH;
#ifdef PICASSO96
if(picasso_on)
#ifdef RASPBERRY
memset (xlinebuffer + (x - 4) * 2, 0, (picasso_vidinfo.width - x + 4) * 2);
@ -2105,6 +2107,7 @@ static void draw_status_line (int line)
memset (xlinebuffer + (x - 4) * 2, 0, (prSDLScreen->w - x + 4) * 2);
#endif
else
#endif
memset (xlinebuffer + (x - 4) * gfxvidinfo.pixbytes, 0, (gfxvidinfo.width - x + 4) * gfxvidinfo.pixbytes);
for (led = -2; led < (currprefs.nr_floppies+1); led++) {
@ -2280,6 +2283,7 @@ void vsync_handle_redraw (int long_frame, int lof_changed)
#endif
finish_drawing_frame ();
}
#ifdef PICASSO96
else if(picasso_on && currprefs.leds_on_screen)
{
int i;
@ -2292,7 +2296,7 @@ void vsync_handle_redraw (int long_frame, int lof_changed)
draw_status_line (line);
}
}
#endif
/* At this point, we have finished both the hardware and the
* drawing frame. Essentially, we are outside of all loops and
* can do some things which would cause confusion if they were

View file

@ -267,10 +267,13 @@ static void REGPARAM2 expamem_wput (uaecptr addr, uae_u32 value)
if (expamem[0] & add_memory) {
// Z3 RAM expansion
value = z3fastmem_start >> 16;
} else {
} else
#ifdef PICASSO96
{
// Z3 P96 RAM
value = p96ram_start >> 16;
}
#endif
put_word (regs.regs[11] + 0x20, value);
put_word (regs.regs[11] + 0x28, value);
// -Bernd Roesch
@ -905,8 +908,10 @@ static void allocate_expamem (void)
z3fastmem_bank.baseaddr = z3fastmem;
fastmem_bank.baseaddr = fastmemory;
#ifdef PICASSO96
gfxmem_bank.baseaddr = NULL;
gfxmem_bankx.baseaddr = gfxmemory;
#endif
#ifdef SAVESTATE
if (savestate_state == STATE_RESTORE) {
@ -989,12 +994,12 @@ void expamem_next(void)
else
expamem_init_clear2 ();
}
#ifdef PICASSO96
void p96memstart(void)
{
p96ram_start = 0x3000000;
}
#endif
void expamem_reset (void)
{
int do_mount = 1;
@ -1048,7 +1053,9 @@ void expamem_reset (void)
}
z3fastmem_start = currprefs.z3fastmem_start;
#ifdef PICASSO96
p96memstart();
#endif
(*card_init[0]) ();
}

View file

@ -4820,7 +4820,9 @@ static uae_u32 REGPARAM2 filesys_init_storeinfo (TrapContext *context)
{
case 1:
mountertask = m68k_areg (&context->regs, 1);
#ifdef PICASSO96
picasso96_alloc (context);
#endif
break;
case 2:
ret = automountunit;

View file

@ -82,57 +82,57 @@ static MemorySliderActionListener* memorySliderActionListener;
void InitPanelRAM(const struct _ConfigCategory& category)
{
memorySliderActionListener = new MemorySliderActionListener();
memorySliderActionListener = new MemorySliderActionListener();
lblChipmem = new gcn::Label("Chip:");
sldChipmem = new gcn::Slider(0, 4);
sldChipmem->setSize(110, SLIDER_HEIGHT);
sldChipmem->setBaseColor(gui_baseCol);
sldChipmem = new gcn::Slider(0, 4);
sldChipmem->setSize(110, SLIDER_HEIGHT);
sldChipmem->setBaseColor(gui_baseCol);
sldChipmem->setMarkerLength(20);
sldChipmem->setStepLength(1);
sldChipmem->setId("Chipmem");
sldChipmem->addActionListener(memorySliderActionListener);
lblChipsize = new gcn::Label("None ");
sldChipmem->addActionListener(memorySliderActionListener);
lblChipsize = new gcn::Label("None ");
lblSlowmem = new gcn::Label("Slow:");
sldSlowmem = new gcn::Slider(0, 4);
sldSlowmem->setSize(110, SLIDER_HEIGHT);
sldSlowmem->setBaseColor(gui_baseCol);
sldSlowmem = new gcn::Slider(0, 4);
sldSlowmem->setSize(110, SLIDER_HEIGHT);
sldSlowmem->setBaseColor(gui_baseCol);
sldSlowmem->setMarkerLength(20);
sldSlowmem->setStepLength(1);
sldSlowmem->setId("Slowmem");
sldSlowmem->addActionListener(memorySliderActionListener);
lblSlowsize = new gcn::Label("None ");
sldSlowmem->addActionListener(memorySliderActionListener);
lblSlowsize = new gcn::Label("None ");
lblFastmem = new gcn::Label("Fast:");
sldFastmem = new gcn::Slider(0, 4);
sldFastmem->setSize(110, SLIDER_HEIGHT);
sldFastmem->setBaseColor(gui_baseCol);
sldFastmem = new gcn::Slider(0, 4);
sldFastmem->setSize(110, SLIDER_HEIGHT);
sldFastmem->setBaseColor(gui_baseCol);
sldFastmem->setMarkerLength(20);
sldFastmem->setStepLength(1);
sldFastmem->setId("Fastmem");
sldFastmem->addActionListener(memorySliderActionListener);
lblFastsize = new gcn::Label("None ");
sldFastmem->addActionListener(memorySliderActionListener);
lblFastsize = new gcn::Label("None ");
lblZ3mem = new gcn::Label("Z3 fast:");
sldZ3mem = new gcn::Slider(0, 7);
sldZ3mem->setSize(110, SLIDER_HEIGHT);
sldZ3mem->setBaseColor(gui_baseCol);
sldZ3mem = new gcn::Slider(0, 7);
sldZ3mem->setSize(110, SLIDER_HEIGHT);
sldZ3mem->setBaseColor(gui_baseCol);
sldZ3mem->setMarkerLength(20);
sldZ3mem->setStepLength(1);
sldZ3mem->setId("Z3mem");
sldZ3mem->addActionListener(memorySliderActionListener);
lblZ3size = new gcn::Label("None ");
sldZ3mem->addActionListener(memorySliderActionListener);
lblZ3size = new gcn::Label("None ");
lblGfxmem = new gcn::Label("RTG:");
sldGfxmem = new gcn::Slider(0, 5);
sldGfxmem->setSize(110, SLIDER_HEIGHT);
sldGfxmem->setBaseColor(gui_baseCol);
sldGfxmem = new gcn::Slider(0, 5);
sldGfxmem->setSize(110, SLIDER_HEIGHT);
sldGfxmem->setBaseColor(gui_baseCol);
sldGfxmem->setMarkerLength(20);
sldGfxmem->setStepLength(1);
sldGfxmem->setId("Gfxmem");
sldGfxmem->addActionListener(memorySliderActionListener);
lblGfxsize = new gcn::Label("None ");
sldGfxmem->addActionListener(memorySliderActionListener);
lblGfxsize = new gcn::Label("None ");
grpRAM = new gcn::Window("Memory Settings");
grpRAM->setPosition(DISTANCE_BORDER, DISTANCE_BORDER);
@ -157,19 +157,19 @@ void InitPanelRAM(const struct _ConfigCategory& category)
grpRAM->add(sldZ3mem, 70, posY);
grpRAM->add(lblZ3size, 70 + sldZ3mem->getWidth() + 12, posY);
posY += sldZ3mem->getHeight() + DISTANCE_NEXT_Y;
#ifdef PICASSO96
grpRAM->add(lblGfxmem, 8, posY);
grpRAM->add(sldGfxmem, 70, posY);
grpRAM->add(lblGfxsize, 70 + sldGfxmem->getWidth() + 12, posY);
posY += sldGfxmem->getHeight() + DISTANCE_NEXT_Y;
#endif
grpRAM->setMovable(false);
grpRAM->setSize(250, posY + DISTANCE_BORDER);
grpRAM->setBaseColor(gui_baseCol);
grpRAM->setBaseColor(gui_baseCol);
category.panel->add(grpRAM);
category.panel->add(grpRAM);
RefreshPanelRAM();
RefreshPanelRAM();
}

View file

@ -125,13 +125,13 @@ uae_u8 *mapped_malloc (size_t s, const char *file)
if(!strcmp(file, "z3"))
return natmem_offset + 0x1000000; //z3fastmem_start;
#ifdef PICASSO96
if(!strcmp(file, "gfx"))
{
p96ram_start = 0x3000000;
return natmem_offset + p96ram_start;
}
#endif
if(!strcmp(file, "rtarea"))
return natmem_offset + rtarea_base;

View file

@ -38,7 +38,7 @@ static int y_size_table[MAX_SCREEN_MODES] = { 400, 480, 480, 768, 864, 960 };
static int red_bits, green_bits, blue_bits;
static int red_shift, green_shift, blue_shift;
int screen_is_picasso;
int screen_is_picasso = 0;
static int picasso_maxw = 0, picasso_maxh = 0;
static int bitdepth, bit_unit;
@ -169,11 +169,13 @@ static void open_screen(struct uae_prefs *p)
int width;
int height;
#ifdef PICASSO96
if (screen_is_picasso)
{
width = picasso_vidinfo.width;
height = picasso_vidinfo.height;
} else
#endif
{
width = p->gfx_size.width;
height = p->gfx_size.height;
@ -194,11 +196,12 @@ static void open_screen(struct uae_prefs *p)
snprintf(layersize, 20, "%dx480", p->gfx_size_fs.width);
}
}
#ifdef PICASSO96
else
{
snprintf(layersize, 20, "%dx%d", picasso_vidinfo.width, picasso_vidinfo.height);
}
#endif
if(Dummy_prSDLScreen == NULL )
{