Gamecube port

This commit is contained in:
fabio.olimpieri 2015-01-31 12:26:17 +00:00
parent 11464fb81f
commit c74b3281a4
12 changed files with 648 additions and 228 deletions

View File

@ -3,7 +3,7 @@ WHAT EMULATES RIGHT IN FBZX WII?
-Screen timmings in 48K and 128K mode.
-Screen generation, so border efects and even attribute changing efects
should work fine.
-48K sound (included the low-pass filter efect of Tape out).
-48K sound
-128K sound (fully emulation of the AY-3-8912).
-Trash in the bus when reading from a non-existing port. This is right generated
(from the data being displayed in that moment) so games works right (like
@ -11,7 +11,8 @@ WHAT EMULATES RIGHT IN FBZX WII?
-Spectrum 48K Issue 2 and 3 efects in the EAR bit are correctly emulated.
-Priority of joystick over keyboard.
-Snow efect when I register points between 64 and 127.
-Emulation of Interface I and Microdrive (only one drive).
-Emulation of Interface I, Interface II and Microdrive (only one drive).
-Emulation of Currah microspeech and Fuller Box
-Memory contention
-Emulates Spanish 128K from Investronica/Sinclair, the Amstrad Plus 2, the Amstrad Plus 2A and NTSC 48k
-Allows to insert POKE values an files in memory (inmunity, infinite lives...)
@ -23,4 +24,5 @@ WHAT EMULATES RIGHT IN FBZX WII?
-ZIP archive files
-Tape browser
-FTP client for loading games from internet repositories (e.g. WOS).
-SE Basic support

196
Makefile
View File

@ -1,195 +1,17 @@
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
all:
make -f Makefile.wii
include $(DEVKITPPC)/wii_rules
run:
make run -f Makefile.wii
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET := fbzx
BUILD := build
SOURCES := src src/z80free src/minizip src/tinyFTP
DATA :=
INCLUDES :=
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O3 -Wall -Wno-unused-but-set-variable $(MACHDEP) $(INCLUDE) -Wno-pointer-sign
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -lasnd -lSDL_mixer -lsmpeg -lvorbisidec -lSDL_image -lpng -ljpeg -lz -lSDL_ttf -lSDL -lSDL_gfx -lfreetype -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard -ltinysmb
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS)
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CFILES := $(filter-out z80free_tester.c, $(CFILES))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
export LD := $(CXX)
endif
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o)
#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC)
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol dist
#---------------------------------------------------------------------------------
dist: $(BUILD)
rm -fr $@
mkdir -p $@/apps/fbzx-wii
mkdir -p $@/fbzx-wii/fbzx
mkdir -p $@/fbzx-wii/spectrum-roms
mkdir -p $@/fbzx-wii/tapes
mkdir -p $@/fbzx-wii/snapshots
mkdir -p $@/fbzx-wii/snapshots/rom-cartridges
mkdir -p $@/fbzx-wii/microdrives
mkdir -p $@/fbzx-wii/scr
mkdir -p $@/fbzx-wii/scr2
mkdir -p $@/fbzx-wii/configurations
mkdir -p $@/fbzx-wii/poke
mkdir -p $@/apps/fbzx-wii/doc
mkdir -p $@/fbzx-wii/fbzx/allophones
cp fbzx.dol $@/apps/fbzx-wii/boot.dol
cp meta.xml $@/apps/fbzx-wii/meta.xml
cp icon.png $@/apps/fbzx-wii/icon.png
cp spectrum-roms/* $@/fbzx-wii/spectrum-roms
cp images/keymap.bmp $@/fbzx-wii/fbzx
cp images/Spectrum_keyboard.png $@/fbzx-wii/fbzx
cp images/symbol_shift.png $@/fbzx-wii/fbzx
cp images/caps_shift.png $@/fbzx-wii/fbzx
cp images/Spectrum_keyboard_small.png $@/fbzx-wii/fbzx
cp images/symbol_shift_small.png $@/fbzx-wii/fbzx
cp images/caps_shift_small.png $@/fbzx-wii/fbzx
cp images/ZXSpectrum48k.png $@/fbzx-wii/fbzx
cp images/stripes.png $@/fbzx-wii/fbzx
cp images/stripes_small.png $@/fbzx-wii/fbzx
cp images/ZX_Spectrum.ttf $@/fbzx-wii/fbzx
cp images/FreeMono.ttf $@/fbzx-wii/fbzx
cp sound/menu_navigation_BE.raw $@/fbzx-wii/fbzx
cp sound/select_BE.raw $@/fbzx-wii/fbzx
cp sound/unselect_BE.raw $@/fbzx-wii/fbzx
cp fbzx.net $@/fbzx-wii
cp AMSTRAD CAPABILITIES COPYING FAQ README README.TZX VERSIONS VERSIONS.wii $@/apps/fbzx-wii/doc
cp allophones/*.* $@/fbzx-wii/fbzx/allophones
touch $@/fbzx-wii/tapes/dummy
touch $@/fbzx-wii/snapshots/dummy
touch $@/fbzx-wii/snapshots/rom-cartridges/dummy
touch $@/fbzx-wii/microdrives/dummy
touch $@/fbzx-wii/scr/dummy
touch $@/fbzx-wii/scr2/dummy
touch $@/fbzx-wii/configurations/dummy
touch $@/fbzx-wii/poke/dummy
cd $@ && tar -czf ../fbzx-wii-vx-bin.tar.gz *
make clean -f Makefile.wii
dist:
make dist -f Makefile.wii
distsource:
cd .. && cp -r fbzx-wii fbzx-wii-v
cd ../fbzx-wii-v && find . -name ".svn" | xargs rm -rf
cd .. && tar -czf fbzx-wii-v.tar.gz fbzx-wii-v
cd .. && rm -fr fbzx-wii-v
#---------------------------------------------------------------------------------
run:
wiiload $(TARGET).dol
make distsource -f Makefile.wii
#---------------------------------------------------------------------------------
else
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with the .jpg extension
#---------------------------------------------------------------------------------
%.jpg.o : %.jpg
#---------------------------------------------------------------------------------
@echo $(notdir $<)
$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------

192
Makefile.gc Normal file
View File

@ -0,0 +1,192 @@
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
include $(DEVKITPPC)/gamecube_rules
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET := fbzx_gc
BUILD := build
SOURCES := src src/z80free src/minizip
DATA :=
INCLUDES :=
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O3 -Wall -Wno-unused-but-set-variable $(MACHDEP) $(INCLUDE) -Wno-pointer-sign
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -lSDL_mixer -lsmpeg -lvorbisidec -lSDL_image -lpng -ljpeg -lz -lSDL_ttf -lSDL -lSDL_gfx -lasnd -laesnd -lfreetype -lfat -logc -lm
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS)
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CFILES := $(filter-out z80free_tester.c, $(CFILES))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
export LD := $(CXX)
endif
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o)
#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC)
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.gc
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol dist
#---------------------------------------------------------------------------------
dist: $(BUILD)
rm -fr $@
mkdir -p $@/fbzx-gc
mkdir -p $@/fbzx-gc/fbzx
mkdir -p $@/fbzx-gc/spectrum-roms
mkdir -p $@/fbzx-gc/tapes
mkdir -p $@/fbzx-gc/snapshots
mkdir -p $@/fbzx-gc/snapshots/rom-cartridges
mkdir -p $@/fbzx-gc/microdrives
mkdir -p $@/fbzx-gc/scr
mkdir -p $@/fbzx-gc/scr2
mkdir -p $@/fbzx-gc/configurations
mkdir -p $@/fbzx-gc/poke
mkdir -p $@/fbzx-gc/doc
mkdir -p $@/fbzx-gc/fbzx/allophones
cp fbzx_gc.dol $@/fbzx-gc/fbzx_gc.dol
cp spectrum-roms/* $@/fbzx-gc/spectrum-roms
cp images/keymap.bmp $@/fbzx-gc/fbzx
cp images/Spectrum_keyboard.png $@/fbzx-gc/fbzx
cp images/symbol_shift.png $@/fbzx-gc/fbzx
cp images/caps_shift.png $@/fbzx-gc/fbzx
cp images/Spectrum_keyboard_small.png $@/fbzx-gc/fbzx
cp images/symbol_shift_small.png $@/fbzx-gc/fbzx
cp images/caps_shift_small.png $@/fbzx-gc/fbzx
cp images/ZXSpectrum48k.png $@/fbzx-gc/fbzx
cp images/stripes.png $@/fbzx-gc/fbzx
cp images/stripes_small.png $@/fbzx-gc/fbzx
cp images/ZX_Spectrum.ttf $@/fbzx-gc/fbzx
cp images/FreeMono.ttf $@/fbzx-gc/fbzx
cp sound/menu_navigation_BE.raw $@/fbzx-gc/fbzx
cp sound/select_BE.raw $@/fbzx-gc/fbzx
cp sound/unselect_BE.raw $@/fbzx-gc/fbzx
cp AMSTRAD CAPABILITIES COPYING FAQ README README.TZX README_GC.txt VERSIONS VERSIONS.wii $@/fbzx-gc/doc
cp allophones/*.* $@/fbzx-gc/fbzx/allophones
touch $@/fbzx-gc/tapes/dummy
touch $@/fbzx-gc/snapshots/dummy
touch $@/fbzx-gc/snapshots/rom-cartridges/dummy
touch $@/fbzx-gc/microdrives/dummy
touch $@/fbzx-gc/scr/dummy
touch $@/fbzx-gc/scr2/dummy
touch $@/fbzx-gc/configurations/dummy
touch $@/fbzx-gc/poke/dummy
cd $@ && tar -czf ../fbzx-gc-vx-bin.tar.gz *
distsource:
cd .. && cp -r fbzx-gc fbzx-gc-v
cd ../fbzx-gc-v && find . -name ".svn" | xargs rm -rf
cd .. && tar -czf fbzx-gc-v.tar.gz fbzx-gc-v
cd .. && rm -fr fbzx-gc-v
#---------------------------------------------------------------------------------
run:
wiiload $(TARGET).dol
#---------------------------------------------------------------------------------
else
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with the .jpg extension
#---------------------------------------------------------------------------------
%.jpg.o : %.jpg
#---------------------------------------------------------------------------------
@echo $(notdir $<)
$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------

195
Makefile.wii Normal file
View File

@ -0,0 +1,195 @@
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
include $(DEVKITPPC)/wii_rules
#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET := fbzx
BUILD := build
SOURCES := src src/z80free src/minizip src/tinyFTP
DATA :=
INCLUDES :=
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O3 -Wall -Wno-unused-but-set-variable $(MACHDEP) $(INCLUDE) -Wno-pointer-sign
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -lasnd -lSDL_mixer -lsmpeg -lvorbisidec -lSDL_image -lpng -ljpeg -lz -lSDL_ttf -lSDL -lSDL_gfx -lfreetype -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard -ltinysmb
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS)
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CFILES := $(filter-out z80free_tester.c, $(CFILES))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
export LD := $(CXX)
endif
export OFILES := $(addsuffix .o,$(BINFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o)
#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC)
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.wii
#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol dist
#---------------------------------------------------------------------------------
dist: $(BUILD)
rm -fr $@
mkdir -p $@/apps/fbzx-wii
mkdir -p $@/fbzx-wii/fbzx
mkdir -p $@/fbzx-wii/spectrum-roms
mkdir -p $@/fbzx-wii/tapes
mkdir -p $@/fbzx-wii/snapshots
mkdir -p $@/fbzx-wii/snapshots/rom-cartridges
mkdir -p $@/fbzx-wii/microdrives
mkdir -p $@/fbzx-wii/scr
mkdir -p $@/fbzx-wii/scr2
mkdir -p $@/fbzx-wii/configurations
mkdir -p $@/fbzx-wii/poke
mkdir -p $@/apps/fbzx-wii/doc
mkdir -p $@/fbzx-wii/fbzx/allophones
cp fbzx.dol $@/apps/fbzx-wii/boot.dol
cp meta.xml $@/apps/fbzx-wii/meta.xml
cp icon.png $@/apps/fbzx-wii/icon.png
cp spectrum-roms/* $@/fbzx-wii/spectrum-roms
cp images/keymap.bmp $@/fbzx-wii/fbzx
cp images/Spectrum_keyboard.png $@/fbzx-wii/fbzx
cp images/symbol_shift.png $@/fbzx-wii/fbzx
cp images/caps_shift.png $@/fbzx-wii/fbzx
cp images/Spectrum_keyboard_small.png $@/fbzx-wii/fbzx
cp images/symbol_shift_small.png $@/fbzx-wii/fbzx
cp images/caps_shift_small.png $@/fbzx-wii/fbzx
cp images/ZXSpectrum48k.png $@/fbzx-wii/fbzx
cp images/stripes.png $@/fbzx-wii/fbzx
cp images/stripes_small.png $@/fbzx-wii/fbzx
cp images/ZX_Spectrum.ttf $@/fbzx-wii/fbzx
cp images/FreeMono.ttf $@/fbzx-wii/fbzx
cp sound/menu_navigation_BE.raw $@/fbzx-wii/fbzx
cp sound/select_BE.raw $@/fbzx-wii/fbzx
cp sound/unselect_BE.raw $@/fbzx-wii/fbzx
cp fbzx.net $@/fbzx-wii
cp AMSTRAD CAPABILITIES COPYING FAQ README README.TZX VERSIONS VERSIONS.wii $@/apps/fbzx-wii/doc
cp allophones/*.* $@/fbzx-wii/fbzx/allophones
touch $@/fbzx-wii/tapes/dummy
touch $@/fbzx-wii/snapshots/dummy
touch $@/fbzx-wii/snapshots/rom-cartridges/dummy
touch $@/fbzx-wii/microdrives/dummy
touch $@/fbzx-wii/scr/dummy
touch $@/fbzx-wii/scr2/dummy
touch $@/fbzx-wii/configurations/dummy
touch $@/fbzx-wii/poke/dummy
cd $@ && tar -czf ../fbzx-wii-vx-bin.tar.gz *
distsource:
cd .. && cp -r fbzx-wii fbzx-wii-v
cd ../fbzx-wii-v && find . -name ".svn" | xargs rm -rf
cd .. && tar -czf fbzx-wii-v.tar.gz fbzx-wii-v
cd .. && rm -fr fbzx-wii-v
#---------------------------------------------------------------------------------
run:
wiiload $(TARGET).dol
#---------------------------------------------------------------------------------
else
DEPENDS := $(OFILES:.o=.d)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with the .jpg extension
#---------------------------------------------------------------------------------
%.jpg.o : %.jpg
#---------------------------------------------------------------------------------
@echo $(notdir $<)
$(bin2o)
-include $(DEPENDS)
#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------

View File

@ -110,7 +110,7 @@ export OUTPUT := $(CURDIR)/$(TARGET)
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile.win
#---------------------------------------------------------------------------------
clean:

39
README_GC.txt Normal file
View File

@ -0,0 +1,39 @@
FBZX-GC
USAGE
------
Put .z80 and .sna files in /fbzx-gc/snapshots or .tap and .tzx files in /fbzx-gc/tapes on your SD card.
Press the "start" button to access the in-game menu. Press X or A to select an item and Y or B to come back to the previous menu.
Press the "R" button to access the virtual keyboard.
The in-game menu allows you to insert tapes, load them and configure the display, joysticks etc.
The easiest way to play a game is to load a snapshot (.z80 and .sna files).
You can also insert a tape file (.tap and .tzx) and then load the file in the tape menu (it simulates the command Load "").
If you have problems with a file loading, likely the file has a program which uses a custom routine to load the blocks; in this case, try to disable the "Instant load" option.
If you want to speed up the tape file loading (both for .tzx file and .tap file with "tap instant load" disabled), try to enable "auto turbo mode" which speeds up the emulator while loading.
It is possible to set precision emulation required by some demo graphic programs but Gamecube is not enough powerful to support it unless you set 320X240 resolution.
The general preferences are saved (joystick type, machine, buttons bindings, etc.) from the main in-game menu and they are loaded on start-up.
You can also save the game preferences which can be automatically loaded with the tape/snapshot if the related option is set.
If you save the screen shots they will appear on the screen during the menu navigation.
If Rumble is enabled, the controller rumbles each time the fire button is pressed.
See http://wiibrew.org/wiki/FBZX_Wii for more information.
COPYRIGHT
---------
The software is distributed under the terms and conditions of the General Public License Version 3.
Amstrad has kindly given their permission for the redistribution of their copyrighted material (ZX Spectrum ROM files) but retains that copyright.

View File

@ -32,10 +32,14 @@
#include "emulator.h"
#include<SDL/SDL_image.h>
#ifdef GEKKO
#ifdef HW_RVL
#include <wiiuse/wpad.h>
#endif
#ifdef HW_DOL
#include <ogc/pad.h>
#endif
#define K(name, sdl_code) \
{ name, sdl_code, 0 ,0, 0}
#define KNL() \
@ -118,7 +122,7 @@ void VirtualKeyboard_init(SDL_Surface *screen)
if (tmp_surface == NULL) {printf("Impossible to load caps shift small image\n"); return;}
image_caps_small=SDL_DisplayFormat(tmp_surface);
SDL_FreeSurface (tmp_surface);
memset(VirtualKeyboard.buf, 0, sizeof(VirtualKeyboard.buf));
vkb_is_init = 1;
@ -193,12 +197,18 @@ struct virtkey *get_key_internal()
i = y/key_h*KEY_COLS + x/key_w;
#ifdef GEKKO
#ifdef HW_RVL
if (ordenador.vk_rumble) WPAD_Rumble(0, 1);
SDL_Delay(90);
if (ordenador.vk_rumble) WPAD_Rumble(0, 0);
#endif
#ifdef HW_DOL
if (ordenador.vk_rumble) PAD_ControlMotor(0,PAD_MOTOR_RUMBLE);
SDL_Delay(90);
if (ordenador.vk_rumble) PAD_ControlMotor(0,PAD_MOTOR_STOP);
#endif
virtkey_t *key = &keys[i];
if ((key->sdl_code == 304) && !keys[3 * KEY_COLS + 8 ].is_on)
@ -242,17 +252,21 @@ void virtkey_ir_run(void)
static int joy_bottons_last[5];
static char countdown_rumble=0;
#ifdef GEKKO
#ifdef HW_RVL
if (countdown_rumble > 0) {countdown_rumble--; if ((countdown_rumble==0)&&(ordenador.vk_rumble)) WPAD_Rumble(0, 0);}
#endif
#ifdef HW_DOL
if (countdown_rumble > 0) {countdown_rumble--; if ((countdown_rumble==0)&&(ordenador.vk_rumble)) PAD_ControlMotor(0,PAD_MOTOR_STOP);}
#endif
joy = ordenador.joystick_sdl[0];
if ((SDL_JoystickGetButton(joy, 0) && !joy_bottons_last[0]) || /* A */
(SDL_JoystickGetButton(joy, 3) && !joy_bottons_last[1]) || /* 2 */
(SDL_JoystickGetButton(joy, 9) && !joy_bottons_last[2]) || /* CA */
(SDL_JoystickGetButton(joy, 10) && !joy_bottons_last[3]) /* CB */
#ifndef GEKKO
#ifndef GEKKO //Win
||((SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(1))&& !joy_bottons_last[4])//mouse left button
#endif
) key_sel = KEY_SELECT;
@ -262,7 +276,7 @@ void virtkey_ir_run(void)
(!SDL_JoystickGetButton(joy, 3) && joy_bottons_last[1]) || /* 2 */
(!SDL_JoystickGetButton(joy, 9) && joy_bottons_last[2]) || /* CA */
(!SDL_JoystickGetButton(joy, 10) && joy_bottons_last[3]) /* CB */
#ifndef GEKKO
#ifndef GEKKO //Win
||(!(SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(1)) && joy_bottons_last[4]) //mouse left button
#endif
) key_sel = KEY_DESELECT;
@ -273,7 +287,7 @@ void virtkey_ir_run(void)
joy_bottons_last[1] =SDL_JoystickGetButton(joy, 3) ; /* 2 */
joy_bottons_last[2] =SDL_JoystickGetButton(joy, 9) ; /* CA */
joy_bottons_last[3] =SDL_JoystickGetButton(joy, 10) ; /* CB */
#ifndef GEKKO
#ifndef GEKKO //Win
joy_bottons_last[4] =SDL_GetMouseState(NULL, NULL)&SDL_BUTTON(1); //mouse left button
#endif
@ -284,9 +298,14 @@ void virtkey_ir_run(void)
y = (ym-border_y);
if ((x>0)&&(x< KEY_COLS*key_w)&&(y>0)&&(y< KEY_ROWS*key_h))
{
#ifdef GEKKO
#ifdef HW_RVL
if (ordenador.vk_rumble) WPAD_Rumble(0, 1);
#endif
#ifdef HW_DOL
if (ordenador.vk_rumble) PAD_ControlMotor(0,PAD_MOTOR_RUMBLE);
#endif
countdown_rumble=5;
i = y/key_h*KEY_COLS + x/key_w;

View File

@ -35,11 +35,14 @@
#include "Virtualkeyboard.h"
#include "gui_sdl.h"
#include "menu_sdl.h"
#if defined(GEKKO)
# include <ogc/system.h>
#if defined(HW_RVL)
# include <wiiuse/wpad.h>
#endif
#if defined(HW_DOL)
# include <ogc/pad.h>
#endif
#ifdef DEBUG
extern FILE *fdebug;
#define printf(...) fprintf(fdebug,__VA_ARGS__)
@ -102,9 +105,9 @@ void computer_init () { //Called only on start-up
ordenador.joystick[1] = 0; // Cursor
ordenador.joypad_as_joystick[0]= 1;
ordenador.joypad_as_joystick[1]= 1;
#ifdef GEKKO
#ifdef HW_RVL
ordenador.vk_auto = 1; //auto Vk
#else
#else //HW_DOL - WIN
ordenador.vk_auto = 0; //Vk called by +
#endif
ordenador.vk_rumble = 1; //enabled
@ -112,9 +115,13 @@ void computer_init () { //Called only on start-up
ordenador.rumble[1] = 0;
ordenador.turbo = 1; //auto turbo
ordenador.turbo_state = 0;
#ifdef HW_DOL
ordenador.precision = 0; //gamecube not enough powerful
ordenador.precision_old = 0;
#else //HW_RVL - WIN
ordenador.precision = 1; //precision
ordenador.precision_old = 1;
#endif
ordenador.tape_readed = 0;
ordenador.tape_stop = 1; // tape stop
ordenador.tape_stop_fast = 1; // tape stop
@ -169,9 +176,14 @@ void computer_init () { //Called only on start-up
ordenador.kbd_buffer_pointer = 0;
ordenador.vk_is_active=0;
ordenador.key = SDL_GetKeyState(NULL);
#ifdef HW_RVL
ordenador.joybuttonkey[0][3]=SDLK_LALT; //Fire button to wiimote1 button 2
ordenador.joybuttonkey[1][3]=SDLK_LALT; //Fire button to wiimote1 button 2
ordenador.port=0; //PORT SD
#else // HW_DOL - Win
ordenador.joybuttonkey[0][0]=SDLK_LALT; //Fire button to gamepad button A
ordenador.joybuttonkey[1][0]=SDLK_LALT; //Fire button to gamepad button A
#endif
ordenador.port=0; //PORT Default
ordenador.smb_enable=0;
strcpy (ordenador.SmbUser,"User");
strcpy (ordenador.SmbPwd, "Password");
@ -1224,11 +1236,23 @@ inline void read_keyboard () {
SDL_JoystickUpdate();
#ifdef HW_DOL
if (SDL_JoystickGetButton(ordenador.joystick_sdl[0], 7)) //Gamecube button "Start"
{if (ordenador.vk_is_active) virtkey_ir_deactivate();main_menu(); }
#else //HW_RVL - WIN
if (SDL_JoystickGetButton(ordenador.joystick_sdl[0], 6) ||//Wii button "Home"
SDL_JoystickGetButton(ordenador.joystick_sdl[0], 19))
{if (ordenador.vk_is_active) virtkey_ir_deactivate();main_menu(); }
#endif
#ifdef HW_DOL
int SDL_PrivateMouseMotion(Uint8 buttonstate, int relative, Sint16 x, Sint16 y);
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 2) > 16384) SDL_PrivateMouseMotion(0,1,4/RATIO,0); //C-stick Horizontal axix
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 2) < -16384) SDL_PrivateMouseMotion(0,1,-4/RATIO,0); //C-stick Horizontal axix
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 3) > 16384) SDL_PrivateMouseMotion(0,1,0,4/RATIO); //C-stick vertical axix
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 3) < -16384) SDL_PrivateMouseMotion(0,1,0,-4/RATIO); //C-stick vertical axix
#endif
for(joy_n=0;joy_n<ordenador.joystick_number;joy_n++)
{
joy_axis_x[joy_n] = SDL_JoystickGetAxis(ordenador.joystick_sdl[joy_n], 0);
@ -1250,18 +1274,20 @@ inline void read_keyboard () {
SDL_JoystickGetButton(ordenador.joystick_sdl[joy_n], joybutton_n);
}
#ifdef HW_RVL
for(joybutton_n=7;joybutton_n<18;joybutton_n++)
{
joybutton_matrix[joy_n][(ordenador.joybuttonkey[joy_n][joybutton_n])] =
SDL_JoystickGetButton(ordenador.joystick_sdl[joy_n], joybutton_n);
}
if (ordenador.vk_auto) { //Check if it is possible to put in the loop
joybutton_matrix[joy_n][(ordenador.joybuttonkey[joy_n][5])] =
if (ordenador.vk_auto) {
joybutton_matrix[joy_n][(ordenador.joybuttonkey[joy_n][5])] = //"+" Wiimote button
SDL_JoystickGetButton(ordenador.joystick_sdl[joy_n], 5);
joybutton_matrix[joy_n][(ordenador.joybuttonkey[joy_n][18])] =
SDL_JoystickGetButton(ordenador.joystick_sdl[joy_n], 18);
}
}
#endif
}
//JOY HAT
status_hat[joy_n] = SDL_JoystickGetHat(ordenador.joystick_sdl[joy_n], 0);
@ -1578,7 +1604,11 @@ inline void read_keyboard () {
if (fire_on[joy_n] && !rumble_on[joy_n] && !fire_pressed[joy_n])
{
#ifdef HW_RVL
WPAD_Rumble(joy_n, 1);
#else //HW_DOL
PAD_ControlMotor(joy_n,PAD_MOTOR_RUMBLE);
#endif
last_ticks[joy_n]= cur_ticks;
rumble_on[joy_n]=1;
fire_pressed[joy_n]=1;
@ -1592,14 +1622,22 @@ inline void read_keyboard () {
if (((cur_ticks - last_ticks[joy_n] > 90) && rumble_on[joy_n] && !fire_pressed[joy_n]) ||(!fire_on[joy_n] && !rumble_on[joy_n] && fire_pressed[joy_n]))
{
#ifdef HW_RVL
WPAD_Rumble(joy_n, 0);
#else //HW_DOL
PAD_ControlMotor(joy_n,PAD_MOTOR_STOP);
#endif
rumble_on[joy_n]=0;
fire_pressed[joy_n]=0;
}
if ((cur_ticks - last_ticks[joy_n] > 90) && rumble_on[joy_n] && fire_pressed[joy_n])
{
#ifdef HW_RVL
WPAD_Rumble(joy_n, 0);
#else //HW_DOL
PAD_ControlMotor(joy_n,PAD_MOTOR_STOP);
#endif
rumble_on[joy_n]=0;
fire_pressed[joy_n]=1;
}
@ -1692,7 +1730,7 @@ inline void read_keyboard () {
static char old_plus_button;
char plus_button;
plus_button= SDL_JoystickGetButton(ordenador.joystick_sdl[0], 5) || //Wii button "+"
plus_button= SDL_JoystickGetButton(ordenador.joystick_sdl[0], 5) || //Wii button "+" - Gamecube "R"
SDL_JoystickGetButton(ordenador.joystick_sdl[0], 18);
@ -1701,12 +1739,12 @@ inline void read_keyboard () {
if (ordenador.vk_auto)
{
#ifdef GEKKO
#ifdef HW_RVL
WPADData *wd;
wd = WPAD_Data(0); //only wiimote 0
if ((wd->ir.valid)&&(!ordenador.vk_is_active)) virtkey_ir_activate();
if ((!wd->ir.valid)&&(ordenador.vk_is_active)) virtkey_ir_deactivate();
#else
#else //WH_DOL - Win
int x=0,y=0 ;
SDL_GetMouseState(&x,&y);
if ((x>64/RATIO)&&(x<576/RATIO)&&(y>90/RATIO)&&(y<390/RATIO))
@ -1852,11 +1890,19 @@ void ResetComputer () {
switch(ordenador.turbo)
{
case 2: //fast
case 2: //fast
#ifdef HW_DOL
update_frequency(5000000);
#else //HW_RVL - Win
update_frequency(10000000);
#endif
break;
case 3: //ultra fast
#ifdef HW_DOL
update_frequency(7000000);
#else //HW_RVL - Win
update_frequency(14000000);
#endif
break;
}

View File

@ -44,7 +44,7 @@
#include <dirent.h>
#ifdef GEKKO
#ifdef HW_RVL
#include <gccore.h>
#include <fat.h>
#include <ogc/usbstorage.h>
@ -53,6 +53,11 @@
#include "tinyFTP/ftp_devoptab.h"
#endif
#ifdef HW_DOL
#include <gccore.h>
#include <fat.h>
#endif
#ifdef DEBUG
FILE *fdebug;
#define printf(...) fprintf(fdebug,__VA_ARGS__)
@ -107,7 +112,7 @@ extern int RATIO;
#define mkdir(name, mode) mkdir(name)
#endif
#if defined(GEKKO)
#if defined(HW_RVL)
/****************************************************************************
@ -658,10 +663,13 @@ void end_system() {
if (!chdir(path_tmp)) {chdir("/"); remove_dir(path_tmp);} //remove the tmp directory if it exists
#ifdef GEKKO
#ifdef HW_RVL
if (smbismount) CloseShare();
if (ftpismount) CloseFTP();
DeInitUSB();
#endif
#ifdef GEKKO
fatUnmount(0);
#endif
@ -1281,7 +1289,11 @@ int main(int argc,char *argv[])
#ifdef GEKKO
fatInitDefault();
#endif
fdebug = fopen("/fbzx-wii/logfile.txt","w");
#ifdef HW_DOL
fdebug = fopen("/fbzx-gc/logfile.txt","w");
#else //HW_RVL - Win
fdebug = fopen("/fbzx-wii/logfile.txt","w");
#endif
#endif
#ifdef MINGW
@ -1301,7 +1313,12 @@ int main(int argc,char *argv[])
dblbuffer=1;
hwsurface=1;
sound_type=SOUND_ASND; //play_click does not work with ASND double buffer
setenv("HOME", "/fbzx-wii", 1);
#ifdef HW_RVL
setenv("HOME", "/fbzx-wii", 1);
#else //HW_DOL
setenv("HOME", "/fbzx-gc", 1);
#endif
//initialize libfat library
if (fatInitDefault())
@ -1323,7 +1340,9 @@ int main(int argc,char *argv[])
printf("Couldn't initialize SD fat subsytem\n");
if (sdismount) closedir (dp);
#endif
#ifdef HW_RVL
usbismount = InitUSB();
#endif
@ -1496,7 +1515,7 @@ int main(int argc,char *argv[])
//Load the splash screen
if (ordenador.zaurus_mini==0) if (load_zxspectrum_picture()) SDL_FreeSurface (image);
#ifdef GEKKO
#ifdef HW_RVL
load_config_network(&ordenador);
@ -1562,7 +1581,7 @@ int main(int argc,char *argv[])
if ((!write_protection)&&(!mkdir(path_tmp,0777))){printf("Making tmp directory\n"); tmpismade=1;}
else {printf("Can't make tmp directory\n"); tmpismade=0;}
#ifdef GEKKO
#ifdef HW_RVL
switch (ordenador.port)
{
case 1: //SD
@ -1655,7 +1674,9 @@ int main(int argc,char *argv[])
ResetComputer();
#ifndef HW_DOL
SDL_Delay(1000);
#endif
printf("Reset screen\n");
clean_screen();

View File

@ -66,8 +66,13 @@ static const char *main_menu_messages[] = {
/*02*/ "Snapshot",
/*03*/ "^|Load|Save|Delete",
/*04*/ "#1---------------------",
#ifdef HW_RVL
/*05*/ "Wiimote configuration",
/*06*/ "^|Wiimote1|Wiimote2",
#else //HW_DOL - WIN
/*05*/ "Controller configuration",
/*06*/ "^|Controller1|Controller2",
#endif
/*07*/ "Tape settings",
/*08*/ "Emulation settings",
/*09*/ "Screen settings",
@ -149,15 +154,24 @@ static const char *screen_messages[] = {
static const char *input_messages[] = {
/*00*/ "Joystick type",
/*01*/ "^|Curs|Kemps|Sincl1|Sincl2|Fuller|QAOP",
#ifdef HW_RVL
/*02*/ "Bind key to Wiimote",
/*03*/ "^|A|B|1|2|-|+",
/*04*/ "Bind key to Nunchuk",
/*05*/ "^|Z|C",
/*06*/ "Bind key to Classic",
/*07*/ "^|a|b|x|y|L|R|Zl|Zr|-|+",
/*08*/ "Bind key to Pad",
#else //HW_DOL - WIN
/*02*/ "Bind key to Controller",
/*03*/ "^|A|B|X|Y|Z",
/*04*/ "Unused",
/*05*/ "^|----",
/*06*/ "Unused",
/*07*/ "^|----",
#endif
/*08*/ "Bind key to D-pad",
/*09*/ "^|Up|Down|Left|Right",
/*10*/ "Use Joypad as Joystick",
/*10*/ "Use D-pad as Joystick",
/*11*/ "^|On|Off",
/*12*/ "Rumble",
/*13*/ "^|On|Off",
@ -180,11 +194,20 @@ static const char *tools_messages[] = {
/*00*/ "Screen shot",
/*01*/ "^|Save1|Save2|Load|Delete",
/*02*/ "Files source",
#ifdef HW_RVL
/*03*/ "^|default|sd|usb|smb|wos",
#else //HW_DOL - Wii
/*03*/ "^|default",
#endif
/*04*/ "Manage files",
/*05*/ "^|Paste|Copy|Delete",
#ifdef HW_DOL
/*06*/ "Unused",
/*07*/ "^|----",
#else //HW_RVL - Wii
/*06*/ "Auto virtual keyboard",
/*07*/ "^|on|off",
#endif
/*08*/ "Keyboard rumble",
/*09*/ "^|on|off",
/*10*/ " ",
@ -196,6 +219,7 @@ static const char *tools_messages[] = {
NULL
};
#ifdef HW_RVL
static const char *help_messages[] = {
/*00*/ "#2HOME enters the menu system where pad",
/*01*/ "#2and nunchuck are used to navigate.",
@ -214,6 +238,26 @@ static const char *help_messages[] = {
/*14*/ "OK",
NULL
};
#else //HW_DOL - WIN
static const char *help_messages[] = {
/*00*/ "#2Start enters the menu system where pad",
/*01*/ "#2and joysicks are used to navigate.",
/*02*/ "#2You can bind keyboard keys to the ",
/*03*/ "#2controller buttons and change the",
/*04*/ "#2emulation options.",
/*05*/ "#2 ",
/*06*/ "#2The easiest way to play a game is to ",
/*07*/ "#2load a snapshot (.z80 and .sna files).",
/*08*/ "#2You can also insert a tape file",
/*09*/ "#2and load it in the tape menu.",
/*10*/ "#2 ",
/*11*/ "#2More information is available in",
/*12*/ "#2 http://wiibrew.org/wiki/FBZX_Wii",
/*13*/ "#2 ",
/*14*/ "OK",
NULL
};
#endif
static const char *confs_messages[] = {
/*00*/ "General configurations",
@ -688,15 +732,23 @@ static void tape_settings(void)
ordenador.turbo_state=0;
ordenador.precision = ordenador.precision_old;
break;
case 2: //fast
case 2: //fast
#ifdef HW_DOL
update_frequency(5000000);
#else //HW_RVL - Win
update_frequency(10000000);
#endif
jump_frames=4;
ordenador.precision =0;
ordenador.precision_old =0;
ordenador.turbo_state=2;
break;
case 3: //ultra fast
#ifdef HW_DOL
update_frequency(7000000);
#else //HW_RVL - Win
update_frequency(14000000);
#endif
jump_frames=24;
ordenador.precision =0;
ordenador.precision_old =0;
@ -834,8 +886,12 @@ static void input_options(int joy)
submenus[0] = ordenador.joystick[joy];
submenus[5] = !ordenador.joypad_as_joystick[joy];
submenus[6] = !ordenador.rumble[joy];
#ifdef HW_RVL
opt = menu_select_title("Wiimote configuration",
#else //HW_DOL - Win
opt = menu_select_title("Controller configuration",
#endif
input_messages, submenus);
if (opt < 0)
return;
@ -1331,7 +1387,7 @@ static void set_port(int which)
strcat(load_path_poke,"poke");
ordenador.port = which;
break;
#ifdef GEKKO
#ifdef HW_RVL
case 1: //PORT_SD
if (sdismount) {
strcpy(load_path_snaps,"sd:/");
@ -1679,7 +1735,11 @@ static int load_poke_file()
static void help(void)
{
#ifdef HW_DOL
menu_select_title("FBZX-GC help",
#else //HW_RVL - Win
menu_select_title("FBZX-WII help",
#endif
help_messages, NULL);
}
@ -1832,7 +1892,9 @@ static int tools()
return 0;
if (old_port!= submenus[1]) {set_port(submenus[1]);retorno=0;}
#ifndef HW_DOL
ordenador.vk_auto = !submenus[3];
#endif
ordenador.vk_rumble = !submenus[4];
switch(opt)

View File

@ -46,11 +46,16 @@
#include "sound.h"
#if defined(GEKKO)
#if defined(HW_RVL)
#include <wiiuse/wpad.h>
#include <asndlib.h>
#endif
#if defined(HW_DOL)
#include <ogc/pad.h>
#include <asndlib.h>
#endif
#ifdef DEBUG
extern FILE *fdebug;
#define printf(...) fprintf(fdebug,__VA_ARGS__)
@ -931,6 +936,14 @@ uint32_t menu_wait_key_press()
static int joy_bottons_last[2][8];
SDL_JoystickUpdate();
#ifdef HW_DOL
int SDL_PrivateMouseMotion(Uint8 buttonstate, int relative, Sint16 x, Sint16 y);
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 2) > 16384) SDL_PrivateMouseMotion(0,1,4/RATIO,0); //C-stick Horizontal axix
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 2) < -16384) SDL_PrivateMouseMotion(0,1,-4/RATIO,0); //C-stick Horizontal axix
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 3) > 16384) SDL_PrivateMouseMotion(0,1,0,4/RATIO); //C-stick vertical axix
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 3) < -16384) SDL_PrivateMouseMotion(0,1,0,-4/RATIO); //C-stick vertical axix
#endif
/* Wii-specific, sorry */
for (nr = 0; nr < ordenador.joystick_number; nr++) {
joy = ordenador.joystick_sdl[nr];
@ -1052,7 +1065,7 @@ uint32_t menu_wait_key_press()
if (keys != 0)
break;
SDL_Delay(50);
SDL_Delay(20);
}
return keys;
}

View File

@ -57,8 +57,13 @@ inline void tape_read(FILE *fichero, int tstados) {
//Auto ultra fast mode
if ((ordenador.turbo_state != 1)&&(ordenador.turbo==1))
{
#ifdef HW_DOL
if (ordenador.tape_file_type==TAP_TAP) update_frequency(7000000);
else update_frequency(6000000);
#else //HW_RVL - Win
if (ordenador.tape_file_type==TAP_TAP) update_frequency(13000000);
else update_frequency(11000000);
#endif
jump_frames=7;
ordenador.precision_old=ordenador.precision;
ordenador.precision =0;
@ -1307,7 +1312,11 @@ end_fast_load_routine:
//Anticipate auto ultra fast mode
if ((ordenador.turbo_state!= 1)&&(ordenador.turbo==1))
{
#ifdef HW_DOL
update_frequency(5000000); //precision could be on
#else //HW_RVL - Win
update_frequency(10000000); //precision could be on
#endif
jump_frames=3;
//ordenador.turbo_state=4;
}