Align with latest TomB version 1.0.0
This commit is contained in:
parent
3f743e49be
commit
c5610e7acd
103 changed files with 66138 additions and 15463 deletions
36
Makefile
36
Makefile
|
@ -16,16 +16,17 @@ all: $(PROG)
|
|||
|
||||
PANDORA=1
|
||||
|
||||
#USE_XFD=1
|
||||
|
||||
DEFAULT_CFLAGS = `$(SDL_BASE)sdl-config --cflags`
|
||||
LDFLAGS = -lSDL -lpthread -lz -lSDL_image -lpng -lrt
|
||||
|
||||
MORE_CFLAGS += -DGP2X -DPANDORA -DDOUBLEBUFFER -DARMV6_ASSEMBLY -DUSE_ARMNEON -DRASPBERRY -DSIX_AXIS_WORKAROUND
|
||||
MORE_CFLAGS += -DSUPPORT_THREADS -DUAE_FILESYS_THREADS -DNO_MAIN_IN_MAIN_C -DFILESYS -DAUTOCONFIG -DSAVESTATE -DPICASSO96
|
||||
MORE_CFLAGS += -DDONT_PARSE_CMDLINE
|
||||
#MORE_CFLAGS += -DWITH_LOGGING
|
||||
MORE_CFLAGS += -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
|
||||
|
||||
MORE_CFLAGS += -DGP2X -DPANDORA -DDOUBLEBUFFER -DARMV6_ASSEMBLY -DUSE_ARMNEON -DRASPBERRY -DPICASSO96 -DSIX_AXIS_WORKAROUND
|
||||
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 += -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
|
||||
|
@ -49,7 +50,6 @@ endif
|
|||
ASFLAGS += -mfloat-abi=hard -mfpu=neon
|
||||
|
||||
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
|
||||
CFLAGS+= -DCPUEMU_0 -DCPUEMU_11 -DFPUEMU
|
||||
|
||||
OBJS = \
|
||||
src/audio.o \
|
||||
|
@ -79,7 +79,6 @@ OBJS = \
|
|||
src/missing.o \
|
||||
src/native2amiga.o \
|
||||
src/savestate.o \
|
||||
src/scsi-none.o \
|
||||
src/traps.o \
|
||||
src/uaelib.o \
|
||||
src/zfile.o \
|
||||
|
@ -105,6 +104,18 @@ OBJS = \
|
|||
src/archivers/dms/u_medium.o \
|
||||
src/archivers/dms/u_quick.o \
|
||||
src/archivers/dms/u_rle.o \
|
||||
src/archivers/lha/crcio.o \
|
||||
src/archivers/lha/dhuf.o \
|
||||
src/archivers/lha/header.o \
|
||||
src/archivers/lha/huf.o \
|
||||
src/archivers/lha/larc.o \
|
||||
src/archivers/lha/lhamaketbl.o \
|
||||
src/archivers/lha/lharc.o \
|
||||
src/archivers/lha/shuf.o \
|
||||
src/archivers/lha/slide.o \
|
||||
src/archivers/lha/uae_lha.o \
|
||||
src/archivers/lha/util.o \
|
||||
src/archivers/lzx/unlzx.o \
|
||||
src/archivers/wrp/warp.o \
|
||||
src/archivers/zip/unzip.o \
|
||||
src/md-pandora/support.o \
|
||||
|
@ -132,6 +143,7 @@ OBJS = \
|
|||
src/od-pandora/gui/ShowMessage.o \
|
||||
src/od-pandora/gui/SelectFolder.o \
|
||||
src/od-pandora/gui/SelectFile.o \
|
||||
src/od-pandora/gui/CreateFilesysHardfile.o \
|
||||
src/od-pandora/gui/EditFilesysVirtual.o \
|
||||
src/od-pandora/gui/EditFilesysHardfile.o \
|
||||
src/od-pandora/gui/PanelPaths.o \
|
||||
|
@ -153,11 +165,19 @@ ifdef PANDORA
|
|||
OBJS += src/od-pandora/gui/sdltruetypefont.o
|
||||
endif
|
||||
|
||||
ifdef USE_XFD
|
||||
OBJS += src/cpu_small.o \
|
||||
src/cpuemu_small.o \
|
||||
src/cpustbl_small.o \
|
||||
src/archivers/xfd/xfd.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_4.o
|
||||
OBJS += src/cpuemu_11.o
|
||||
OBJS += src/compemu.o
|
||||
OBJS += src/compemu_fpp.o
|
||||
|
@ -171,11 +191,9 @@ src/osdep/neon_helper.o: src/osdep/neon_helper.s
|
|||
|
||||
$(PROG): $(OBJS)
|
||||
$(CXX) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
|
||||
|
||||
ifndef DEBUG
|
||||
$(STRIP) $(PROG)
|
||||
endif
|
||||
|
||||
|
||||
clean:
|
||||
$(RM) $(PROG) $(OBJS)
|
||||
|
|
|
@ -16,16 +16,17 @@ all: $(PROG)
|
|||
|
||||
PANDORA=1
|
||||
|
||||
#USE_XFD=1
|
||||
|
||||
DEFAULT_CFLAGS = `$(SDL_BASE)sdl-config --cflags`
|
||||
LDFLAGS = -lSDL -lpthread -lz -lSDL_image -lpng -lrt
|
||||
|
||||
MORE_CFLAGS += -mhard-float -ffast-math -mfpu=vfp -mfloat-abi=hard -march=armv6j
|
||||
|
||||
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 += -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
|
||||
|
@ -49,7 +50,6 @@ endif
|
|||
ASFLAGS += -mfloat-abi=hard -mfpu=vfp
|
||||
|
||||
CFLAGS = $(DEFAULT_CFLAGS) $(MORE_CFLAGS)
|
||||
CFLAGS+= -DCPUEMU_0 -DCPUEMU_11 -DFPUEMU
|
||||
|
||||
OBJS = \
|
||||
src/audio.o \
|
||||
|
@ -79,7 +79,6 @@ OBJS = \
|
|||
src/missing.o \
|
||||
src/native2amiga.o \
|
||||
src/savestate.o \
|
||||
src/scsi-none.o \
|
||||
src/traps.o \
|
||||
src/uaelib.o \
|
||||
src/zfile.o \
|
||||
|
@ -105,6 +104,18 @@ OBJS = \
|
|||
src/archivers/dms/u_medium.o \
|
||||
src/archivers/dms/u_quick.o \
|
||||
src/archivers/dms/u_rle.o \
|
||||
src/archivers/lha/crcio.o \
|
||||
src/archivers/lha/dhuf.o \
|
||||
src/archivers/lha/header.o \
|
||||
src/archivers/lha/huf.o \
|
||||
src/archivers/lha/larc.o \
|
||||
src/archivers/lha/lhamaketbl.o \
|
||||
src/archivers/lha/lharc.o \
|
||||
src/archivers/lha/shuf.o \
|
||||
src/archivers/lha/slide.o \
|
||||
src/archivers/lha/uae_lha.o \
|
||||
src/archivers/lha/util.o \
|
||||
src/archivers/lzx/unlzx.o \
|
||||
src/archivers/wrp/warp.o \
|
||||
src/archivers/zip/unzip.o \
|
||||
src/md-pandora/support.o \
|
||||
|
@ -130,6 +141,7 @@ OBJS = \
|
|||
src/od-pandora/gui/ShowMessage.o \
|
||||
src/od-pandora/gui/SelectFolder.o \
|
||||
src/od-pandora/gui/SelectFile.o \
|
||||
src/od-pandora/gui/CreateFilesysHardfile.o \
|
||||
src/od-pandora/gui/EditFilesysVirtual.o \
|
||||
src/od-pandora/gui/EditFilesysHardfile.o \
|
||||
src/od-pandora/gui/PanelPaths.o \
|
||||
|
@ -151,11 +163,19 @@ ifdef PANDORA
|
|||
OBJS += src/od-pandora/gui/sdltruetypefont.o
|
||||
endif
|
||||
|
||||
ifdef USE_XFD
|
||||
OBJS += src/cpu_small.o \
|
||||
src/cpuemu_small.o \
|
||||
src/cpustbl_small.o \
|
||||
src/archivers/xfd/xfd.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_4.o
|
||||
OBJS += src/cpuemu_11.o
|
||||
OBJS += src/compemu.o
|
||||
OBJS += src/compemu_fpp.o
|
||||
|
@ -166,11 +186,9 @@ CPPFLAGS = $(CFLAGS)
|
|||
|
||||
$(PROG): $(OBJS)
|
||||
$(CXX) $(CFLAGS) -o $(PROG) $(OBJS) $(LDFLAGS)
|
||||
|
||||
ifndef DEBUG
|
||||
$(STRIP) $(PROG)
|
||||
endif
|
||||
|
||||
|
||||
clean:
|
||||
$(RM) $(PROG) $(OBJS)
|
||||
|
|
327
Readme_Pandora.txt
Normal file
327
Readme_Pandora.txt
Normal file
|
@ -0,0 +1,327 @@
|
|||
UAE4ARM - Pandora edition
|
||||
|
||||
Version 1.0.0.0
|
||||
|
||||
Thanks to all for working on the different versions of UAE this emulator based on:
|
||||
- Toni Wilen
|
||||
- Chui for the UAE4all emulator
|
||||
- Notaz for the GP2X port
|
||||
- Pickle for the Wiz port
|
||||
- john4p for his work on the Pandora version
|
||||
- tuki_cat for improved keyboard gfx and betatesting
|
||||
- lubomyr for the Android version
|
||||
- all people from aranym project for the ARM JIT
|
||||
|
||||
|
||||
Description
|
||||
|
||||
A fast and optimized Amiga Emulator
|
||||
|
||||
Features: AGA/OCS/ECS, 68000, 68020 and 68040 emulation, harddisk-support, WHDLoad-support, Chip/Slow/Fast-mem settings,
|
||||
savestates, vsync, most games (not AGA) run fullspeed at 600 MHz with no frameskip and lot of AGA games run fullspeed
|
||||
at 1000 MHz, smooth 50Hz scrolling, custom controls, custom screen modes, screen positioning, heavy/medium/light manual
|
||||
autofire, nub mouse input, support for stylus input
|
||||
|
||||
This version based on UAE4ALL for Pandora. Instead of implement the changes in UAE4ALL, I decided to start a new project.
|
||||
UAE4ALL is in a stable state and there are fundamental changes like switching to a new 68000 core for the new version
|
||||
which may cause new bugs, performance losses and breaks compatibility to few games.
|
||||
|
||||
The main differences to UAE4ALL:
|
||||
- Different 68000 core (newcpu instead of FAME/C) with support for 32 bit addressing mode
|
||||
- Support for 68030 and 68040 cpus
|
||||
- FPU (68881, 68882 and internal 68040)
|
||||
- JIT
|
||||
- Autodetect Amiga ROMs
|
||||
- Up to 5 HDDs
|
||||
- Lot of new audio options
|
||||
- Picasso96
|
||||
- GUI
|
||||
|
||||
What's missing compared to WinUAE:
|
||||
- Cycle exact emulation of cpu and blitter
|
||||
- SCSI support
|
||||
- bsdsockets
|
||||
- AHI
|
||||
- CD
|
||||
- Builtin debugger
|
||||
- RDB-harddisks
|
||||
and some more...
|
||||
|
||||
|
||||
Index
|
||||
|
||||
1. Setup
|
||||
|
||||
2. Controls
|
||||
2.1 General and quick keys (outside of GUI)
|
||||
2.2 Joystick mode
|
||||
2.3 Mouse mode
|
||||
2.4 Stylus mode
|
||||
2.5 Specific controls inside GUI
|
||||
|
||||
3. GUI
|
||||
3.1 Paths
|
||||
3.2 Configurations
|
||||
3.3 CPU and FPU
|
||||
3.4 Chipset
|
||||
3.5 ROM
|
||||
3.6 RAM
|
||||
3.7 Floppy drives
|
||||
3.8 Hard drives
|
||||
3.9 Display
|
||||
3.10 Sound
|
||||
3.11 Input
|
||||
3.12 Miscellaneous
|
||||
3.13 Savestates
|
||||
|
||||
|
||||
------------------------------------
|
||||
|
||||
1. Setup
|
||||
|
||||
Place the UAE4ALL PND in the required directory (menu, desktop or apps). Running it for the first time will create the
|
||||
necessary folders in pandora/appdata on you SD card.
|
||||
|
||||
In order to use UAE4ALL you need an Amiga Bios image (kickstart rom). Place all your roms and the keyfiles (if required)
|
||||
in the appdata folder of UAE4ARM and select this folder with the GUI (goto page Paths, choose folder in option "System ROMS"
|
||||
and click on "Rescan ROMs").
|
||||
|
||||
|
||||
------------------------------------
|
||||
|
||||
2. Controls
|
||||
|
||||
2.1 General & Quick Keys (outside of GUI)
|
||||
|
||||
SELECT: Open GUI
|
||||
START: Toggle joystick/mouse/stylus mode
|
||||
Pandora Key: pressing this at any time (inside or outside the GUI) and it will minimise UAE4AALL
|
||||
Hold L+R + D-pad up/down: Move displayed gfx vertically
|
||||
Hold L+R + 1/2/3/4/5/6/7/8: select preset screenmode
|
||||
Hold L+R + 9/0: set number of displayed lines
|
||||
Hold L+R + w: change Amiga displayed width
|
||||
L+c: Toggle custom controls
|
||||
L+d: Toggle status line
|
||||
L+f: Toggle frameskip
|
||||
L+l: Quick load
|
||||
L+s: Quick save
|
||||
R+D-pad: Arrow keys in all control modes
|
||||
|
||||
|
||||
2.2 Joystick Mode
|
||||
|
||||
D-pad: Joystick movement
|
||||
A/X: Joystick fire button (depends which button mode you are in)
|
||||
X/A: Up on joystick (used as jump in platform games, etc. depends which button mode you are in)
|
||||
B: mapped to the space bar
|
||||
Y: Space bar
|
||||
L: Alt
|
||||
L+D-pad: Move mouse pointer
|
||||
L+A: Left mouse click
|
||||
L+B: Right mouse click
|
||||
R+D-pad: Arrow keys
|
||||
R+Y: Toggle auto fire on/off
|
||||
R+A: Ctrl
|
||||
R+X: Help
|
||||
R+B: Num Enter
|
||||
|
||||
|
||||
2.3 Mouse Mode
|
||||
|
||||
D-pad: Move mouse pointer
|
||||
Left Nub: Move mouse pointer (not workng)
|
||||
Right Nub: Flick left for "left mouse button", flick right for "right mouse button" (not working)
|
||||
Y: Space bar
|
||||
A: left mouse click
|
||||
B: right mouse click
|
||||
D-pad left or right: Left flipper (Pinball Dreams/Fantasies)
|
||||
A/B: Right flipper (Pinball Dreams/Fantasies)
|
||||
X: Pull spring (Pinball Dreams/Fantasies)
|
||||
|
||||
|
||||
2.4 Stylus Mode
|
||||
|
||||
Tap screen: left click
|
||||
L/R: Hold and tap with stylus performs right click
|
||||
D-pad: Left operates left mouse button, right operates right mouse button. Hold down on D-pad to prevent mouse from clicking and up on D-pad
|
||||
equals a right and left click together.
|
||||
Recalibration: Hold Stylus against screen, hold left trigger and reposition mouse pointer using d-pad.
|
||||
|
||||
|
||||
2.5 Specific controls inside GUI
|
||||
|
||||
Q: Quits the emulator.
|
||||
R: Reset Amiga
|
||||
SELECT: Continue emulation
|
||||
|
||||
|
||||
------------------------------------
|
||||
|
||||
3. GUI
|
||||
|
||||
You can navigate through the controls with the D-pad and select an option by pressing X.
|
||||
|
||||
There are always three buttons visible:
|
||||
- Reset: Reset the Amiga
|
||||
- Quit: Quit emulator
|
||||
- Start/Resume: Start of emulation / resume emulation
|
||||
|
||||
|
||||
3.1 Paths
|
||||
|
||||
Specify the location of your kickstart roms and the folder where the configurations files should be stored.
|
||||
After changing the location of the kickstart roms, click on "Rescan ROMS" to refresh the list of the available ROMs.
|
||||
|
||||
|
||||
3.2 Configurations
|
||||
|
||||
To load a configuration, select the entry in the list and then click on "Load". If you doubleclick on an entry in the list,
|
||||
the emulation starts with this configuration.
|
||||
If you want to create a new configuration, setup all options, enter a new name in "Name", provide a short description and
|
||||
then click on "Save".
|
||||
"Delete" will delete the selected configuration.
|
||||
|
||||
|
||||
3.3 CPU and FPU
|
||||
|
||||
Select the required Amiga CPU (68000 - 68040).
|
||||
|
||||
If you select 68020, you can choose between 24-bit addressing (68EC020) or 32-bit addressing (68020).
|
||||
|
||||
The option "More compatible" is only available if 68000 is selected and emulates simple prefetch of the 68000. This may
|
||||
improve compatibility in few situations but it's not required for most games and demos.
|
||||
|
||||
JIT enables the Just-in-time compiler. This may breaks compatibility in some games. You will not notice a big performance
|
||||
improvement as long as you didn't select "Fastest" in "CPU Speed".
|
||||
|
||||
What options are available for FPU depends on the selected CPU.
|
||||
|
||||
Note: In current version, you will not see a difference in the performance for 68020, 68030 and 68040. The cpu cycles for
|
||||
the opcodes are based on 68020. The different cycles for 68030 and 68040 will come in a later version.
|
||||
|
||||
|
||||
3.4 Chipset
|
||||
|
||||
If you want to emulate an Amiga 1200, select AGA. For most Amiga 500 games, select "Full ECS". Some older Amiga games
|
||||
requires "OCS" or "ECS Agnus". You have to play with these options if a game won't work as expected.
|
||||
For some games you have to switch to "NTSC" (60 Hz instead of 50 Hz) for correct timing.
|
||||
|
||||
When you see some graphic issues in a game, try "Immediate" for blitter and/or disable "Fast copper".
|
||||
"Fast copper" uses a prediction algorithm instead of checking the copper state on a more regular basis. This may cause
|
||||
issues but brings a big performance improvement. The option was removed in WinUAE in an early state, but for most games,
|
||||
it works fine and the better performance is helpful for 600 MHz Pandoras.
|
||||
|
||||
For "Collision Level", select "Sprites and Sprites vs. Playfield" which is fine for nearly all games.
|
||||
|
||||
|
||||
3.5 ROM
|
||||
|
||||
Select the required kickstart ROM for the Amiga you want to emulate.
|
||||
|
||||
"Extended ROM File" isn't really useful in the current version of UAE4ARM.
|
||||
|
||||
|
||||
3.6 RAM
|
||||
|
||||
Select the amount of RAM for each type you want in your Amiga.
|
||||
"Slow" is the simple memory extension of an Amiga 500.
|
||||
"Z3 fast" and "RTG" are only available when a 32-bit CPU is selected.
|
||||
"RTG" is the graphics memory used by Picasso96.
|
||||
|
||||
|
||||
3.7 Floppy drives
|
||||
|
||||
You can enable/disable each drive by clicking the checkbox next to DFx or select the drive type in the dropdown control.
|
||||
"3.5'' DD" is the right choose for nearly all ADF and ADZ files.
|
||||
The option "Write-protected" indicates if the emulator can write to the ADF.
|
||||
The button "..." opens a dialog to select the required disk file.
|
||||
With the big dropdown control, you can select one of the disks you recently used.
|
||||
|
||||
You can reduce the loading time for lot of games by increasing the floppy drive emulation speed. A few games will not load
|
||||
with higher drive speed and you have to select 100%.
|
||||
|
||||
"Save config for disk" will create a new configuration file with the name of the disk in DF0. This configuration will be
|
||||
loaded each time you select the disk and have the option "Load config with same name as disk" enabled.
|
||||
|
||||
|
||||
3.8 Hard drives
|
||||
|
||||
Use "Add Directory" to add a folder or "Add Hardfile" to add a HDF file as a hard disk.
|
||||
|
||||
To edit the settings of a HDD, click on "..." left to the entry in the list.
|
||||
|
||||
With "Create Hardfile", you can create a new formatted HDF file up to 2 GB. For large files, it will take some time to
|
||||
create the new hard disk. You have to format the new HDD in Amiga via the Workbench.
|
||||
|
||||
|
||||
3.9 Display
|
||||
|
||||
Select the required width and height of the Amiga screen.
|
||||
If you select "NTSC", a value greater than 240 for "Height" makes no sense.
|
||||
When the game, demo or workbench uses Hires mode and you selected a "Width" lower than 640, you will only see half of the
|
||||
pixels.
|
||||
With "Vert. offset" you can adjust the position of the first drawn line of the Amiga screen. You can also change this during
|
||||
emulation with L+R + dpad up/down.
|
||||
When you activate "Frameskip", only every seconds frame is drawn. This will improve performance and some more games are
|
||||
playable.
|
||||
|
||||
|
||||
3.10 Sound
|
||||
|
||||
You can turn on sound emulation with different levels of accuracy and choose between mono and stereo.
|
||||
|
||||
The different types of interpolation have different impact on the performance. Play with the settings to find the type you
|
||||
like most. You may need headphones the really hear the differences between the interpolations.
|
||||
|
||||
With "Filter", you can select the type of the Amiga audio filter.
|
||||
|
||||
With "Stereo separation" and "Stereo delay" you can adjust how the left and right audio channels of the Amiga are mixed to
|
||||
the left and right channels of the Pandora. A value of 70% for separation and no delay is a good start.
|
||||
|
||||
|
||||
3.11 Input
|
||||
|
||||
With "Control config", you can choose one of four preset button configurations.
|
||||
Select the port for which the joystick should be emulated with "Joystick".
|
||||
"Tap Delay" specifies the time between taping the screen and an emulated mouse button click.
|
||||
Set the emulated mouse speed to .25x, .5x, 1x 2x and 4x to slow down or speed up the mouse.
|
||||
With "Stylus Offset", you can set the offset between the screen mouse pointer and the stylus by the following amount of
|
||||
pixels: 0px, 1px, 3px, 5px and 8px.
|
||||
|
||||
When enabling "Custom Control", you can define which Amiga key should be emulated by pressing one of the ABXY- or D-pad
|
||||
buttons. Useful to setup controls for pinball games. During emulation, you can switch between regular behaviour of the
|
||||
buttons and custom settings by pressing left shoulder button and 'c'.
|
||||
|
||||
|
||||
3.12 Miscellaneous
|
||||
|
||||
"Status Line" shows/hides the status line indicator. During emulation, you can show/hide this by pressing left shoulder
|
||||
button and 'd'. The first value in the status line shows the idle time of the Pandora CPU in %, the second value is the
|
||||
current frame rate. When you have a HDD in your Amiga emulation, the HD indicator shows read (blue) and write (red) access
|
||||
to the HDD. The next values are showing the track number for each disk drive and indicated disk access.
|
||||
|
||||
When you deactivate the option "Show GUI on startup" and use this configuration by specifying it with the command line
|
||||
parameter "-config=<file>", the emulations starts directly without showing the GUI.
|
||||
|
||||
Set the speed for the Pandora CPU to overclock it for games which need more power. Be careful with this parameter.
|
||||
|
||||
|
||||
3.13 Savestates
|
||||
|
||||
Savestates are stored with the name of the disk in drive DF0 attached with the selected number.
|
||||
|
||||
Note: Savestates will not work with HDDs.
|
||||
|
||||
|
||||
------------------------------------
|
||||
|
||||
4. Command line options
|
||||
|
||||
-config=<file>
|
||||
or
|
||||
-f <file>
|
||||
Start emulator with specified configuration file instead of the default file.
|
||||
|
||||
-s <option>=<value>
|
||||
Set a specific option to the new value. Look at the configuration files to see the names of the available options and
|
||||
how the value for an option is provided.
|
BIN
data/Thumbs.db
BIN
data/Thumbs.db
Binary file not shown.
|
@ -642,9 +642,9 @@ struct zfile *archive_access_lzx (struct znode *zn)
|
|||
startpos = znlast->offset;
|
||||
compsize = znlast->packedsize;
|
||||
zfile_fseek (zf, startpos, SEEK_SET);
|
||||
buf = xmalloc(compsize);
|
||||
buf = (uae_u8 *)xmalloc(compsize);
|
||||
zfile_fread (buf, compsize, 1, zf);
|
||||
dbuf = xcalloc (unpsize, 1);
|
||||
dbuf = (uae_u8 *)xcalloc (unpsize, 1);
|
||||
|
||||
/* unpack complete block */
|
||||
memset(offset_len, 0, sizeof offset_len);
|
||||
|
@ -768,9 +768,9 @@ struct zvolume *archive_directory_lzx (struct zfile *in_file)
|
|||
second = temp & 63;
|
||||
|
||||
memset(&zai, 0, sizeof zai);
|
||||
zai.name = header_filename;
|
||||
zai.name = (const char *)header_filename;
|
||||
if (header_comment[0])
|
||||
zai.comment = header_comment;
|
||||
zai.comment = (char *)header_comment;
|
||||
zai.flags |= (attributes & 32) ? 0x80 : 0;
|
||||
zai.flags |= (attributes & 64) ? 0x40 : 0;
|
||||
zai.flags |= (attributes & 128) ? 0x20 : 0;
|
|
@ -23,6 +23,9 @@
|
|||
#include "memory.h"
|
||||
#include "newcpu.h"
|
||||
|
||||
#include "cpu_small.h"
|
||||
#include "cputbl_small.h"
|
||||
|
||||
/* memory structure
|
||||
*
|
||||
* 0x000676 execbase
|
||||
|
@ -104,7 +107,7 @@ static int load_xfd(char *path)
|
|||
zfile_fseek(z, 0, SEEK_END);
|
||||
size = zfile_ftell(z);
|
||||
zfile_fseek(z, 0, SEEK_SET);
|
||||
buf = xmalloc(size);
|
||||
buf = (uae_u8*)xmalloc(size);
|
||||
zfile_fread(buf, size, 1, z);
|
||||
zfile_fclose(z);
|
||||
p = buf;
|
||||
|
@ -143,7 +146,7 @@ static int load_xfd(char *path)
|
|||
memcpy (codeptr + haddr, p, hsize);
|
||||
p += hsize;
|
||||
} else if (htype != 0x3eb) {
|
||||
write_log("RELOC: unknown hunk %08X\n", htype);
|
||||
write_log ("RELOC: unknown hunk %08X\n", htype);
|
||||
goto end;
|
||||
}
|
||||
htype = gl(p);
|
||||
|
@ -151,7 +154,7 @@ static int load_xfd(char *path)
|
|||
if (htype == 0x3f2)
|
||||
continue;
|
||||
if (htype != 0x3ec) {
|
||||
write_log("RELOC: expected 000003EC but got %08X\n", htype);
|
||||
write_log ("RELOC: expected 000003EC but got %08X\n", htype);
|
||||
goto end;
|
||||
}
|
||||
relocnum = gl(p);
|
||||
|
@ -165,10 +168,10 @@ static int load_xfd(char *path)
|
|||
pl(codeptr + haddr + off, gl(codeptr + haddr + off) + srchunk);
|
||||
}
|
||||
}
|
||||
write_log("XFD slave '%s' loaded and relocated @%08X (%d bytes) succesfully\n", path, startaddr, codememory - startaddr);
|
||||
write_log ("XFD slave '%s' loaded and relocated @%08X (%d bytes) succesfully\n", path, startaddr, codememory - startaddr);
|
||||
p = codeptr + startaddr + 8;
|
||||
if (gl(p + 4) != 'XFDF') {
|
||||
write_log("XFD header corrupt\n");
|
||||
write_log ("XFD header corrupt\n");
|
||||
goto end;
|
||||
}
|
||||
p = codeptr + gl(p + 20);
|
||||
|
@ -181,10 +184,10 @@ static int load_xfd(char *path)
|
|||
uae_u8 *nameptr = codeptr + name;
|
||||
struct xfdslave *xfds;
|
||||
|
||||
write_log("- '%s' ver %d, master ver %d, minsize %d\n",
|
||||
write_log ("- '%s' ver %d, master ver %d, minsize %d\n",
|
||||
nameptr, version, mversion, minsize);
|
||||
xfds = xcalloc(sizeof(struct xfdslave), 1);
|
||||
xfds->name = nameptr;
|
||||
xfds = (struct xfdslave *)xcalloc(sizeof(struct xfdslave), 1);
|
||||
xfds->name = (char *)nameptr;
|
||||
xfds->start = p - codeptr;
|
||||
if (!xfdslaves) {
|
||||
xfdslaves = xfds;
|
||||
|
@ -234,8 +237,9 @@ int init_xfd(void)
|
|||
return 0;
|
||||
init = -1;
|
||||
|
||||
init_cpu_small();
|
||||
codememory = 0x2000;
|
||||
codeptr = malloc (FAKEMEM_SIZE);
|
||||
codeptr = (uae_u8 *)malloc (FAKEMEM_SIZE);
|
||||
sprintf (tmp, "%splugins%cxfd", start_path_data, FSDB_DIR_SEPARATOR);
|
||||
d = my_opendir(tmp);
|
||||
if (d) {
|
||||
|
@ -247,25 +251,37 @@ int init_xfd(void)
|
|||
my_closedir(d);
|
||||
}
|
||||
initexec();
|
||||
codeptr = realloc(codeptr, codememory);
|
||||
xfdmemory = malloc (FAKEMEM_SIZE);
|
||||
codeptr = (uae_u8 *)realloc(codeptr, codememory);
|
||||
xfdmemory = (uae_u8 *)malloc (FAKEMEM_SIZE);
|
||||
init = 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void execute68k(struct regstruct *r)
|
||||
void xop_illg (uae_u32 opcode)
|
||||
{
|
||||
uaecptr stack = m68k_areg(r, 7);
|
||||
m68k_areg(r, 7) = stack - 4;
|
||||
write_log("minicpu illegal opcode %04.4x\n", opcode);
|
||||
xm68k_setpc(0);
|
||||
}
|
||||
|
||||
static int execute68k(void)
|
||||
{
|
||||
uaecptr stack = xm68k_areg(7);
|
||||
xm68k_areg(7) = stack - 4;
|
||||
for (;;) {
|
||||
uae_u32 opcode = get_iword (r, 0);
|
||||
(*cpufunctbl[opcode])(opcode, r);
|
||||
if (m68k_areg(r, 7) >= stack)
|
||||
break;
|
||||
uae_u32 pc;
|
||||
uae_u32 opcode = xget_iword (0);
|
||||
(*xcpufunctbl[opcode])(opcode);
|
||||
if (xm68k_areg(7) == stack)
|
||||
return 1;
|
||||
pc = xm68k_getpc();
|
||||
if (pc <= 0x100 || pc >= FAKEMEM_SIZE) {
|
||||
write_log("minicpu crash, pc=%x\n", pc);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static struct zfile *decomp(struct zfile *zf, struct xfdslave *xfds, uae_u32 size, struct regstruct *regs)
|
||||
static struct zfile *decomp(struct zfile *zf, struct xfdslave *xfds, uae_u32 size)
|
||||
{
|
||||
uae_u8 *p;
|
||||
uae_u32 decompsize;
|
||||
|
@ -274,13 +290,16 @@ static struct zfile *decomp(struct zfile *zf, struct xfdslave *xfds, uae_u32 siz
|
|||
|
||||
p = xfdmemory + bufferinfo;
|
||||
memset(p, 0, 20 * 4);
|
||||
regs->regs[8] = bufferinfo; // A0
|
||||
xregs.regs[8] = bufferinfo; // A0
|
||||
decompsize = gl (p + 16 * 4);
|
||||
if (decompsize <= 0)
|
||||
return 0;
|
||||
decompaddr = FAKEMEM_SIZE - stacksize - decompsize;
|
||||
pl (p + 6 * 4, decompaddr); // TargetBuffer
|
||||
pl (p + 8 * 4, decompsize);
|
||||
execute68k(regs);
|
||||
if (!regs->regs[0])
|
||||
if (!execute68k())
|
||||
return 0;
|
||||
if (!xregs.regs[0])
|
||||
return 0;
|
||||
decompsize = gl (p + 16 * 4);
|
||||
zfout = zfile_fopen_empty (zfile_getname(zf), decompsize);
|
||||
|
@ -288,128 +307,93 @@ static struct zfile *decomp(struct zfile *zf, struct xfdslave *xfds, uae_u32 siz
|
|||
return zfout;
|
||||
}
|
||||
|
||||
static struct regstruct backregs;
|
||||
static addrbank **back_mem_banks;
|
||||
|
||||
|
||||
static uae_u32 REGPARAM3 xfdmem_lget (uaecptr) REGPARAM;
|
||||
static uae_u32 REGPARAM3 xfdmem_wget (uaecptr) REGPARAM;
|
||||
static uae_u32 REGPARAM3 xfdmem_bget (uaecptr) REGPARAM;
|
||||
static void REGPARAM3 xfdmem_lput (uaecptr, uae_u32) REGPARAM;
|
||||
static void REGPARAM3 xfdmem_wput (uaecptr, uae_u32) REGPARAM;
|
||||
static void REGPARAM3 xfdmem_bput (uaecptr, uae_u32) REGPARAM;
|
||||
|
||||
static uae_u32 REGPARAM2 xfdmem_lget (uaecptr addr)
|
||||
uae_u32 xget_long (uaecptr addr)
|
||||
{
|
||||
uae_u32 *m;
|
||||
addr &= xfdmem_mask;
|
||||
m = (uae_u32 *)(xfdmemory + addr);
|
||||
return do_get_mem_long (m);
|
||||
}
|
||||
static uae_u32 REGPARAM2 xfdmem_wget (uaecptr addr)
|
||||
uae_u32 xget_word (uaecptr addr)
|
||||
{
|
||||
uae_u16 *m;
|
||||
addr &= xfdmem_mask;
|
||||
m = (uae_u16 *)(xfdmemory + addr);
|
||||
return do_get_mem_word (m);
|
||||
}
|
||||
static uae_u32 REGPARAM2 xfdmem_bget (uaecptr addr)
|
||||
uae_u32 xget_byte (uaecptr addr)
|
||||
{
|
||||
addr &= xfdmem_mask;
|
||||
return xfdmemory[addr];
|
||||
}
|
||||
static void REGPARAM2 xfdmem_lput (uaecptr addr, uae_u32 l)
|
||||
void xput_long (uaecptr addr, uae_u32 l)
|
||||
{
|
||||
uae_u32 *m;
|
||||
addr &= xfdmem_mask;
|
||||
m = (uae_u32 *)(xfdmemory + addr);
|
||||
do_put_mem_long (m, l);
|
||||
}
|
||||
static void REGPARAM2 xfdmem_wput (uaecptr addr, uae_u32 w)
|
||||
void xput_word (uaecptr addr, uae_u32 w)
|
||||
{
|
||||
uae_u16 *m;
|
||||
addr &= xfdmem_mask;
|
||||
m = (uae_u16 *)(xfdmemory + addr);
|
||||
do_put_mem_word (m, w);
|
||||
}
|
||||
static void REGPARAM2 xfdmem_bput (uaecptr addr, uae_u32 b)
|
||||
void xput_byte (uaecptr addr, uae_u32 b)
|
||||
{
|
||||
addr &= xfdmem_mask;
|
||||
xfdmemory[addr] = b;
|
||||
}
|
||||
static addrbank xfdmem_bank = {
|
||||
xfdmem_lget, xfdmem_wget, xfdmem_bget,
|
||||
xfdmem_lput, xfdmem_wput, xfdmem_bput,
|
||||
NULL, NULL, NULL, "XFDFAKE",
|
||||
xfdmem_lget, xfdmem_wget, ABFLAG_RAM
|
||||
};
|
||||
|
||||
static void store_state(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
memcpy (&backregs, ®s, sizeof (struct regstruct));
|
||||
back_mem_banks = xmalloc(MEMORY_BANKS * sizeof (addrbank*));
|
||||
memcpy (back_mem_banks, mem_banks, MEMORY_BANKS * sizeof (addrbank*));
|
||||
for (i = 0; i < MEMORY_BANKS; i++)
|
||||
mem_banks[bankindex(i * 65536)] = &xfdmem_bank;
|
||||
}
|
||||
|
||||
static void restore_state(void)
|
||||
{
|
||||
memcpy (mem_banks, back_mem_banks, MEMORY_BANKS * sizeof (addrbank*));
|
||||
xfree(back_mem_banks);
|
||||
memcpy (®s, &backregs, sizeof (struct regstruct));
|
||||
}
|
||||
|
||||
struct zfile *decompress_zfd(struct zfile *z)
|
||||
{
|
||||
unsigned int size;
|
||||
uae_u8 *p;
|
||||
struct xfdslave *xfds;
|
||||
struct zfile *zfout = NULL;
|
||||
struct zfile *zfout = z;
|
||||
|
||||
if (!init_xfd())
|
||||
return z;
|
||||
return zfout;
|
||||
memset (xfdmemory, 0, FAKEMEM_SIZE);
|
||||
memcpy (xfdmemory, codeptr, codememory);
|
||||
xfdmem_mask = FAKEMEM_SIZE - 1;
|
||||
|
||||
p = codeptr + codememory;
|
||||
p = xfdmemory + codememory;
|
||||
zfile_fseek (z, 0, SEEK_END);
|
||||
size = zfile_ftell (z);
|
||||
zfile_fseek (z, 0, SEEK_SET);
|
||||
zfile_fread (p, size, 1, z);
|
||||
|
||||
store_state();
|
||||
|
||||
xfds = xfdslaves;
|
||||
while (xfds) {
|
||||
uaecptr start = xfds->start;
|
||||
memset(®s, 0, sizeof regs);
|
||||
memset(&xregs, 0, sizeof xregs);
|
||||
pl(codeptr + freememaddr, codememory + size); // reset start of "free memory"
|
||||
regs.regs[0] = size; // D0
|
||||
regs.regs[8] = codememory; // A0
|
||||
regs.regs[9] = bufferinfo; // A1
|
||||
regs.regs[15] = FAKEMEM_SIZE; // A7
|
||||
xregs.regs[0] = size; // D0
|
||||
xregs.regs[8] = codememory; // A0
|
||||
xregs.regs[9] = bufferinfo; // A1
|
||||
xregs.regs[15] = FAKEMEM_SIZE; // A7
|
||||
pl(xfdmemory + bufferinfo + 0x00, codememory); // SourceBuffer
|
||||
pl(xfdmemory + bufferinfo + 0x04, size); // SourceBufLen
|
||||
m68k_setpc(®s, gl(xfdmemory + start + 16)); // recog code
|
||||
if (regs.pc) {
|
||||
execute68k(®s);
|
||||
if (regs.regs[0]) {
|
||||
xm68k_setpc(gl(xfdmemory + start + 16)); // recog code
|
||||
if (xregs.pc) {
|
||||
if (execute68k()) {
|
||||
if (xregs.regs[0]) {
|
||||
write_log("XFD slave '%s' recognised the compressed data\n", xfds->name);
|
||||
m68k_setpc(®s, gl(xfdmemory + start + 20)); // decomp code
|
||||
if (regs.pc)
|
||||
zfout = decomp(z, xfds, size, ®s);
|
||||
if (zfout)
|
||||
xm68k_setpc(gl(xfdmemory + start + 20)); // decomp code
|
||||
if (xregs.pc) {
|
||||
struct zfile *zz = decomp(z, xfds, size);
|
||||
if (zz) {
|
||||
zfout = zz;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
xfds = xfds->next;
|
||||
}
|
||||
|
||||
restore_state();
|
||||
|
||||
return zfout;
|
||||
}
|
|
@ -49,6 +49,15 @@ extern "C" {
|
|||
#include "zlib.h"
|
||||
#endif
|
||||
|
||||
typedef int (ZEXPORT *INFLATEINIT2)(z_streamp strm, int windowBits, const char *version, int stream_size);
|
||||
typedef int (ZEXPORT *INFLATEINIT)(z_streamp strm, const char *version, int stream_size);
|
||||
typedef int (ZEXPORT *INFLATEEND)(z_streamp strm);
|
||||
typedef int (ZEXPORT *INFLATE)(z_streamp strm, int flush);
|
||||
typedef int (ZEXPORT *DEFLATEINIT)(z_streamp strm, int level, const char *version, int stream_size);
|
||||
typedef int (ZEXPORT *DEFLATEEND)(z_streamp strm);
|
||||
typedef int (ZEXPORT *DEFLATE)(z_streamp strm, int flush);
|
||||
typedef uLong (ZEXPORT *CRC32)(uLong crc, const Bytef *buf, uInt len);
|
||||
|
||||
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
|
||||
/* like the STRICT of WIN32, we define a pointer that cannot be converted
|
||||
from (void*) without cast */
|
||||
|
|
|
@ -74,7 +74,7 @@ static int sound_table[64][256];
|
|||
void (*sample_handler) (void);
|
||||
static void (*sample_prehandler) (unsigned long best_evtime);
|
||||
|
||||
unsigned long sample_evtime, scaled_sample_evtime;
|
||||
unsigned long scaled_sample_evtime;
|
||||
|
||||
static unsigned long last_cycles, next_sample_evtime;
|
||||
|
||||
|
@ -492,6 +492,7 @@ static void sample16i_crux_handler (void)
|
|||
|
||||
/* This interpolator examines sample points when Paula switches the output
|
||||
* voltage and computes the average of Paula's output */
|
||||
|
||||
static void sample16si_anti_handler (void)
|
||||
{
|
||||
int datas[4], data1, data2;
|
||||
|
@ -506,7 +507,6 @@ static void sample16si_anti_handler (void)
|
|||
check_sound_buffers ();
|
||||
}
|
||||
|
||||
|
||||
static void sample16si_sinc_handler (void)
|
||||
{
|
||||
int datas[4], data1, data2;
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "uae.h"
|
||||
#include "memory.h"
|
||||
|
@ -28,7 +27,7 @@ uaecptr EXPANSION_bootcode, EXPANSION_nullfunc;
|
|||
|
||||
/* ROM tag area memory access */
|
||||
|
||||
uae_u8 *rtarea;
|
||||
uae_u8 *rtarea = 0;
|
||||
uaecptr rtarea_base;
|
||||
|
||||
static uae_u32 REGPARAM3 rtarea_lget (uaecptr) REGPARAM;
|
||||
|
@ -197,6 +196,9 @@ static uae_u32 REGPARAM2 uae_puts (TrapContext *context)
|
|||
|
||||
static void rtarea_init_mem (void)
|
||||
{
|
||||
if(rtarea != 0)
|
||||
mapped_free(rtarea);
|
||||
|
||||
rtarea = mapped_malloc (0x10000, "rtarea");
|
||||
if (!rtarea) {
|
||||
write_log ("virtual memory exhausted (rtarea)!\n");
|
||||
|
@ -260,6 +262,8 @@ void set_uae_int_flag (void)
|
|||
|
||||
void rtarea_setup(void)
|
||||
{
|
||||
rtarea_base = 0;
|
||||
uae_int_requested = 0;
|
||||
uaecptr base = need_uae_boot_rom ();
|
||||
if (base) {
|
||||
write_log ("RTAREA located at %08X\n", base);
|
||||
|
|
357
src/blitfunc.cpp
357
src/blitfunc.cpp
File diff suppressed because it is too large
Load diff
262
src/blitops.c
Normal file
262
src/blitops.c
Normal file
|
@ -0,0 +1,262 @@
|
|||
/* This file generated automatically - do not edit */
|
||||
|
||||
#include "genblitter.h"
|
||||
|
||||
struct blitop blitops[256] = {
|
||||
/* 00 */ { "0", 0 },
|
||||
/* 01 */ { "~(srca | srcb | srcc)", 7 },
|
||||
/* 02 */ { "(srcc & ~(srca | srcb))", 7 },
|
||||
/* 03 */ { "~(srca | srcb)", 3 },
|
||||
/* 04 */ { "(srcb & ~(srca | srcc))", 7 },
|
||||
/* 05 */ { "~(srca | srcc)", 5 },
|
||||
/* 06 */ { "(~srca & (srcb ^ srcc))", 7 },
|
||||
/* 07 */ { "~(srca | (srcb & srcc))", 7 },
|
||||
/* 08 */ { "(~srca & srcb & srcc)", 7 },
|
||||
/* 09 */ { "~(srca | (srcb ^ srcc))", 7 },
|
||||
/* 0a */ { "(~srca & srcc)", 5 },
|
||||
/* 0b */ { "~(srca | (srcb & ~srcc))", 7 },
|
||||
/* 0c */ { "(~srca & srcb)", 3 },
|
||||
/* 0d */ { "~(srca | (~srcb & srcc))", 7 },
|
||||
/* 0e */ { "(~srca & (srcb | srcc))", 7 },
|
||||
/* 0f */ { "~srca", 1 },
|
||||
/* 10 */ { "(srca & ~(srcb | srcc))", 7 },
|
||||
/* 11 */ { "~(srcb | srcc)", 6 },
|
||||
/* 12 */ { "(~srcb & (srca ^ srcc))", 7 },
|
||||
/* 13 */ { "~(srcb | (srca & srcc))", 7 },
|
||||
/* 14 */ { "(~srcc & (srca ^ srcb))", 7 },
|
||||
/* 15 */ { "~(srcc | (srca & srcb))", 7 },
|
||||
/* 16 */ { "(srca ^ ((srca & srcb) | (srcb ^ srcc)))", 7 },
|
||||
/* 17 */ { "~(srca ^ ((srca ^ srcb) & (srca ^ srcc)))", 7 },
|
||||
/* 18 */ { "((srca ^ srcb) & (srca ^ srcc))", 7 },
|
||||
/* 19 */ { "(srcb ^ (~srcc | (srca & srcb)))", 7 },
|
||||
/* 1a */ { "(srca ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* 1b */ { "(srca ^ (srcc | ~(srca ^ srcb)))", 7 },
|
||||
/* 1c */ { "(srca ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* 1d */ { "(srca ^ (srcb | ~(srca ^ srcc)))", 7 },
|
||||
/* 1e */ { "(srca ^ (srcb | srcc))", 7 },
|
||||
/* 1f */ { "~(srca & (srcb | srcc))", 7 },
|
||||
/* 20 */ { "(srca & ~srcb & srcc)", 7 },
|
||||
/* 21 */ { "~(srcb | (srca ^ srcc))", 7 },
|
||||
/* 22 */ { "(~srcb & srcc)", 6 },
|
||||
/* 23 */ { "~(srcb | (srca & ~srcc))", 7 },
|
||||
/* 24 */ { "((srca ^ srcb) & (srcb ^ srcc))", 7 },
|
||||
/* 25 */ { "(srca ^ (~srcc | (srca & srcb)))", 7 },
|
||||
/* 26 */ { "(srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* 27 */ { "~(srca ^ (srcc & (srca ^ srcb)))", 7 },
|
||||
/* 28 */ { "(srcc & (srca ^ srcb))", 7 },
|
||||
/* 29 */ { "~(srca ^ srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* 2a */ { "(srcc & ~(srca & srcb))", 7 },
|
||||
/* 2b */ { "~(srca ^ ((srca ^ srcb) & (srcb ^ srcc)))", 7 },
|
||||
/* 2c */ { "(srcb ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 2d */ { "(srca ^ (srcb | ~srcc))", 7 },
|
||||
/* 2e */ { "(srca ^ (srcb | (srca ^ srcc)))", 7 },
|
||||
/* 2f */ { "~(srca & (srcb | ~srcc))", 7 },
|
||||
/* 30 */ { "(srca & ~srcb)", 3 },
|
||||
/* 31 */ { "~(srcb | (~srca & srcc))", 7 },
|
||||
/* 32 */ { "(~srcb & (srca | srcc))", 7 },
|
||||
/* 33 */ { "~srcb", 2 },
|
||||
/* 34 */ { "(srcb ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 35 */ { "(srcb ^ (srca | ~(srcb ^ srcc)))", 7 },
|
||||
/* 36 */ { "(srcb ^ (srca | srcc))", 7 },
|
||||
/* 37 */ { "~(srcb & (srca | srcc))", 7 },
|
||||
/* 38 */ { "(srca ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 39 */ { "(srcb ^ (srca | ~srcc))", 7 },
|
||||
/* 3a */ { "(srcb ^ (srca | (srcb ^ srcc)))", 7 },
|
||||
/* 3b */ { "~(srcb & (srca | ~srcc))", 7 },
|
||||
/* 3c */ { "(srca ^ srcb)", 3 },
|
||||
/* 3d */ { "(srca ^ (srcb | ~(srca | srcc)))", 7 },
|
||||
/* 3e */ { "(srca ^ (srcb | (srca ^ (srca | srcc))))", 7 },
|
||||
/* 3f */ { "~(srca & srcb)", 3 },
|
||||
/* 40 */ { "(srca & srcb & ~srcc)", 7 },
|
||||
/* 41 */ { "~(srcc | (srca ^ srcb))", 7 },
|
||||
/* 42 */ { "((srca ^ srcc) & (srcb ^ srcc))", 7 },
|
||||
/* 43 */ { "(srca ^ (~srcb | (srca & srcc)))", 7 },
|
||||
/* 44 */ { "(srcb & ~srcc)", 6 },
|
||||
/* 45 */ { "~(srcc | (srca & ~srcb))", 7 },
|
||||
/* 46 */ { "(srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* 47 */ { "~(srca ^ (srcb & (srca ^ srcc)))", 7 },
|
||||
/* 48 */ { "(srcb & (srca ^ srcc))", 7 },
|
||||
/* 49 */ { "~(srca ^ srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* 4a */ { "(srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 4b */ { "(srca ^ (~srcb | srcc))", 7 },
|
||||
/* 4c */ { "(srcb & ~(srca & srcc))", 7 },
|
||||
/* 4d */ { "(srca ^ ((srca ^ srcb) | ~(srca ^ srcc)))", 7 },
|
||||
/* 4e */ { "(srca ^ (srcc | (srca ^ srcb)))", 7 },
|
||||
/* 4f */ { "~(srca & (~srcb | srcc))", 7 },
|
||||
/* 50 */ { "(srca & ~srcc)", 5 },
|
||||
/* 51 */ { "~(srcc | (~srca & srcb))", 7 },
|
||||
/* 52 */ { "(srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 53 */ { "~(srcb ^ (srca & (srcb ^ srcc)))", 7 },
|
||||
/* 54 */ { "(~srcc & (srca | srcb))", 7 },
|
||||
/* 55 */ { "~srcc", 4 },
|
||||
/* 56 */ { "(srcc ^ (srca | srcb))", 7 },
|
||||
/* 57 */ { "~(srcc & (srca | srcb))", 7 },
|
||||
/* 58 */ { "(srca ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 59 */ { "(srcc ^ (srca | ~srcb))", 7 },
|
||||
/* 5a */ { "(srca ^ srcc)", 5 },
|
||||
/* 5b */ { "(srca ^ (srcc | ~(srca | srcb)))", 7 },
|
||||
/* 5c */ { "(srcc ^ (srca | (srcb ^ srcc)))", 7 },
|
||||
/* 5d */ { "~(srcc & (srca | ~srcb))", 7 },
|
||||
/* 5e */ { "(srca ^ (srcc | (srca ^ (srca | srcb))))", 7 },
|
||||
/* 5f */ { "~(srca & srcc)", 5 },
|
||||
/* 60 */ { "(srca & (srcb ^ srcc))", 7 },
|
||||
/* 61 */ { "~(srcb ^ srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 62 */ { "(srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 63 */ { "(srcb ^ (~srca | srcc))", 7 },
|
||||
/* 64 */ { "(srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 65 */ { "(srcc ^ (~srca | srcb))", 7 },
|
||||
/* 66 */ { "(srcb ^ srcc)", 6 },
|
||||
/* 67 */ { "(srcb ^ (srcc | ~(srca | srcb)))", 7 },
|
||||
/* 68 */ { "((srca & srcb) ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 69 */ { "~(srca ^ srcb ^ srcc)", 7 },
|
||||
/* 6a */ { "(srcc ^ (srca & srcb))", 7 },
|
||||
/* 6b */ { "~(srca ^ srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 6c */ { "(srcb ^ (srca & srcc))", 7 },
|
||||
/* 6d */ { "~(srca ^ srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 6e */ { "((~srca & srcb) | (srcb ^ srcc))", 7 },
|
||||
/* 6f */ { "(~srca | (srcb ^ srcc))", 7 },
|
||||
/* 70 */ { "(srca & ~(srcb & srcc))", 7 },
|
||||
/* 71 */ { "~(srca ^ ((srca ^ srcb) | (srca ^ srcc)))", 7 },
|
||||
/* 72 */ { "(srcb ^ (srcc | (srca ^ srcb)))", 7 },
|
||||
/* 73 */ { "~(srcb & (~srca | srcc))", 7 },
|
||||
/* 74 */ { "(srcc ^ (srcb | (srca ^ srcc)))", 7 },
|
||||
/* 75 */ { "~(srcc & (~srca | srcb))", 7 },
|
||||
/* 76 */ { "(srcb ^ (srcc | (srca ^ (srca & srcb))))", 7 },
|
||||
/* 77 */ { "~(srcb & srcc)", 6 },
|
||||
/* 78 */ { "(srca ^ (srcb & srcc))", 7 },
|
||||
/* 79 */ { "~(srcb ^ srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 7a */ { "((srca & ~srcb) | (srca ^ srcc))", 7 },
|
||||
/* 7b */ { "(~srcb | (srca ^ srcc))", 7 },
|
||||
/* 7c */ { "((srca ^ srcb) | (srca & ~srcc))", 7 },
|
||||
/* 7d */ { "(~srcc | (srca ^ srcb))", 7 },
|
||||
/* 7e */ { "((srca ^ srcb) | (srca ^ srcc))", 7 },
|
||||
/* 7f */ { "~(srca & srcb & srcc)", 7 },
|
||||
/* 80 */ { "(srca & srcb & srcc)", 7 },
|
||||
/* 81 */ { "~((srca ^ srcb) | (srca ^ srcc))", 7 },
|
||||
/* 82 */ { "(srcc & ~(srca ^ srcb))", 7 },
|
||||
/* 83 */ { "(srca ^ (~srcb | (srca & ~srcc)))", 7 },
|
||||
/* 84 */ { "(srcb & ~(srca ^ srcc))", 7 },
|
||||
/* 85 */ { "(srca ^ (~srcc | (srca & ~srcb)))", 7 },
|
||||
/* 86 */ { "(srcb ^ srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* 87 */ { "~(srca ^ (srcb & srcc))", 7 },
|
||||
/* 88 */ { "(srcb & srcc)", 6 },
|
||||
/* 89 */ { "(srcb ^ (~srcc & (~srca | srcb)))", 7 },
|
||||
/* 8a */ { "(srcc & (~srca | srcb))", 7 },
|
||||
/* 8b */ { "(srca ^ (~srcb | (srca ^ srcc)))", 7 },
|
||||
/* 8c */ { "(srcb & (~srca | srcc))", 7 },
|
||||
/* 8d */ { "(srca ^ (~srcc | (srca ^ srcb)))", 7 },
|
||||
/* 8e */ { "(srca ^ ((srca ^ srcb) | (srca ^ srcc)))", 7 },
|
||||
/* 8f */ { "(~srca | (srcb & srcc))", 7 },
|
||||
/* 90 */ { "(srca & ~(srcb ^ srcc))", 7 },
|
||||
/* 91 */ { "(srcb ^ (~srcc | (~srca & srcb)))", 7 },
|
||||
/* 92 */ { "(srca ^ srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 93 */ { "~(srcb ^ (srca & srcc))", 7 },
|
||||
/* 94 */ { "(srca ^ srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 95 */ { "~(srcc ^ (srca & srcb))", 7 },
|
||||
/* 96 */ { "(srca ^ srcb ^ srcc)", 7 },
|
||||
/* 97 */ { "(srca ^ srcb ^ (srcc | ~(srca | srcb)))", 7 },
|
||||
/* 98 */ { "(srcb ^ (~srcc & (srca | srcb)))", 7 },
|
||||
/* 99 */ { "~(srcb ^ srcc)", 6 },
|
||||
/* 9a */ { "(srcc ^ (srca & ~srcb))", 7 },
|
||||
/* 9b */ { "~(srcb ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* 9c */ { "(srcb ^ (srca & ~srcc))", 7 },
|
||||
/* 9d */ { "~(srcc ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* 9e */ { "(srcb ^ srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* 9f */ { "~(srca & (srcb ^ srcc))", 7 },
|
||||
/* a0 */ { "(srca & srcc)", 5 },
|
||||
/* a1 */ { "(srca ^ (~srcc & (srca | ~srcb)))", 7 },
|
||||
/* a2 */ { "(srcc & (srca | ~srcb))", 7 },
|
||||
/* a3 */ { "(srcb ^ (~srca | (srcb ^ srcc)))", 7 },
|
||||
/* a4 */ { "(srca ^ (~srcc & (srca | srcb)))", 7 },
|
||||
/* a5 */ { "~(srca ^ srcc)", 5 },
|
||||
/* a6 */ { "(srcc ^ (~srca & srcb))", 7 },
|
||||
/* a7 */ { "~(srca ^ (srcc & (srca | srcb)))", 7 },
|
||||
/* a8 */ { "(srcc & (srca | srcb))", 7 },
|
||||
/* a9 */ { "~(srcc ^ (srca | srcb))", 7 },
|
||||
/* aa */ { "srcc", 4 },
|
||||
/* ab */ { "(srcc | ~(srca | srcb))", 7 },
|
||||
/* ac */ { "(srcb ^ (srca & (srcb ^ srcc)))", 7 },
|
||||
/* ad */ { "~(srcc ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* ae */ { "(srcc | (~srca & srcb))", 7 },
|
||||
/* af */ { "(~srca | srcc)", 5 },
|
||||
/* b0 */ { "(srca & (~srcb | srcc))", 7 },
|
||||
/* b1 */ { "~(srca ^ (srcc | (srca ^ srcb)))", 7 },
|
||||
/* b2 */ { "(srca ^ ((srca ^ srcc) & (srcb ^ srcc)))", 7 },
|
||||
/* b3 */ { "(~srcb | (srca & srcc))", 7 },
|
||||
/* b4 */ { "(srca ^ (srcb & ~srcc))", 7 },
|
||||
/* b5 */ { "~(srcc ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* b6 */ { "(srca ^ srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* b7 */ { "~(srcb & (srca ^ srcc))", 7 },
|
||||
/* b8 */ { "(srca ^ (srcb & (srca ^ srcc)))", 7 },
|
||||
/* b9 */ { "~(srcc ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* ba */ { "(srcc | (srca & ~srcb))", 7 },
|
||||
/* bb */ { "(~srcb | srcc)", 6 },
|
||||
/* bc */ { "((srca ^ srcb) | (srca & srcc))", 7 },
|
||||
/* bd */ { "((srca ^ srcb) | ~(srca ^ srcc))", 7 },
|
||||
/* be */ { "(srcc | (srca ^ srcb))", 7 },
|
||||
/* bf */ { "(srcc | ~(srca & srcb))", 7 },
|
||||
/* c0 */ { "(srca & srcb)", 3 },
|
||||
/* c1 */ { "(srca ^ (~srcb & (srca | ~srcc)))", 7 },
|
||||
/* c2 */ { "(srca ^ (~srcb & (srca | srcc)))", 7 },
|
||||
/* c3 */ { "~(srca ^ srcb)", 3 },
|
||||
/* c4 */ { "(srcb & (srca | ~srcc))", 7 },
|
||||
/* c5 */ { "~(srcb ^ (srca | (srcb ^ srcc)))", 7 },
|
||||
/* c6 */ { "(srcb ^ (~srca & srcc))", 7 },
|
||||
/* c7 */ { "~(srca ^ (srcb & (srca | srcc)))", 7 },
|
||||
/* c8 */ { "(srcb & (srca | srcc))", 7 },
|
||||
/* c9 */ { "~(srcb ^ (srca | srcc))", 7 },
|
||||
/* ca */ { "(srcc ^ (srca & (srcb ^ srcc)))", 7 },
|
||||
/* cb */ { "~(srcb ^ (srca | (srcb & srcc)))", 7 },
|
||||
/* cc */ { "srcb", 2 },
|
||||
/* cd */ { "(srcb | ~(srca | srcc))", 7 },
|
||||
/* ce */ { "(srcb | (~srca & srcc))", 7 },
|
||||
/* cf */ { "(~srca | srcb)", 3 },
|
||||
/* d0 */ { "(srca & (srcb | ~srcc))", 7 },
|
||||
/* d1 */ { "~(srca ^ (srcb | (srca ^ srcc)))", 7 },
|
||||
/* d2 */ { "(srca ^ (~srcb & srcc))", 7 },
|
||||
/* d3 */ { "~(srcb ^ (srca & (srcb | srcc)))", 7 },
|
||||
/* d4 */ { "(srca ^ ((srca ^ srcb) & (srcb ^ srcc)))", 7 },
|
||||
/* d5 */ { "(~srcc | (srca & srcb))", 7 },
|
||||
/* d6 */ { "(srca ^ srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* d7 */ { "~(srcc & (srca ^ srcb))", 7 },
|
||||
/* d8 */ { "(srca ^ (srcc & (srca ^ srcb)))", 7 },
|
||||
/* d9 */ { "~(srcb ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* da */ { "((srca & srcb) | (srca ^ srcc))", 7 },
|
||||
/* db */ { "~((srca ^ srcb) & (srcb ^ srcc))", 7 },
|
||||
/* dc */ { "(srcb | (srca & ~srcc))", 7 },
|
||||
/* dd */ { "(srcb | ~srcc)", 6 },
|
||||
/* de */ { "(srcb | (srca ^ srcc))", 7 },
|
||||
/* df */ { "(srcb | ~(srca & srcc))", 7 },
|
||||
/* e0 */ { "(srca & (srcb | srcc))", 7 },
|
||||
/* e1 */ { "~(srca ^ (srcb | srcc))", 7 },
|
||||
/* e2 */ { "(srcc ^ (srcb & (srca ^ srcc)))", 7 },
|
||||
/* e3 */ { "~(srca ^ (srcb | (srca & srcc)))", 7 },
|
||||
/* e4 */ { "(srcb ^ (srcc & (srca ^ srcb)))", 7 },
|
||||
/* e5 */ { "~(srca ^ (srcc | (srca & srcb)))", 7 },
|
||||
/* e6 */ { "((srca & srcb) | (srcb ^ srcc))", 7 },
|
||||
/* e7 */ { "~((srca ^ srcb) & (srca ^ srcc))", 7 },
|
||||
/* e8 */ { "(srca ^ ((srca ^ srcb) & (srca ^ srcc)))", 7 },
|
||||
/* e9 */ { "(srca ^ srcb ^ (~srcc | (srca & srcb)))", 7 },
|
||||
/* ea */ { "(srcc | (srca & srcb))", 7 },
|
||||
/* eb */ { "(srcc | ~(srca ^ srcb))", 7 },
|
||||
/* ec */ { "(srcb | (srca & srcc))", 7 },
|
||||
/* ed */ { "(srcb | ~(srca ^ srcc))", 7 },
|
||||
/* ee */ { "(srcb | srcc)", 6 },
|
||||
/* ef */ { "(~srca | srcb | srcc)", 7 },
|
||||
/* f0 */ { "srca", 1 },
|
||||
/* f1 */ { "(srca | ~(srcb | srcc))", 7 },
|
||||
/* f2 */ { "(srca | (~srcb & srcc))", 7 },
|
||||
/* f3 */ { "(srca | ~srcb)", 3 },
|
||||
/* f4 */ { "(srca | (srcb & ~srcc))", 7 },
|
||||
/* f5 */ { "(srca | ~srcc)", 5 },
|
||||
/* f6 */ { "(srca | (srcb ^ srcc))", 7 },
|
||||
/* f7 */ { "(srca | ~(srcb & srcc))", 7 },
|
||||
/* f8 */ { "(srca | (srcb & srcc))", 7 },
|
||||
/* f9 */ { "(srca | ~(srcb ^ srcc))", 7 },
|
||||
/* fa */ { "(srca | srcc)", 5 },
|
||||
/* fb */ { "(srca | ~srcb | srcc)", 7 },
|
||||
/* fc */ { "(srca | srcb)", 3 },
|
||||
/* fd */ { "(srca | srcb | ~srcc)", 7 },
|
||||
/* fe */ { "(srca | srcb | srcc)", 7 },
|
||||
/* ff */ { "0xFFFFFFFF", 0 }
|
||||
};
|
|
@ -1,7 +1,5 @@
|
|||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "uae.h"
|
||||
#include "options.h"
|
||||
#include "custom.h"
|
||||
#include "memory.h"
|
||||
|
@ -40,7 +38,7 @@ blitdofast_d8, 0, 0, 0, 0, 0, 0, 0,
|
|||
0, 0, blitdofast_e2, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_ea, 0, 0, 0, 0, 0,
|
||||
blitdofast_f0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, blitdofast_fa, 0, blitdofast_fc, 0, blitdofast_fe, 0
|
||||
0, 0, blitdofast_fa, 0, blitdofast_fc, 0, 0, 0
|
||||
};
|
||||
|
||||
blitter_func * const blitfunc_dofast_desc[256] = {
|
||||
|
|
195
src/blitter.cpp
195
src/blitter.cpp
|
@ -23,12 +23,11 @@
|
|||
|
||||
uae_u16 bltcon0, bltcon1;
|
||||
uae_u32 bltapt, bltbpt, bltcpt, bltdpt;
|
||||
uae_u32 preva = 0, prevb = 0;
|
||||
|
||||
int blinea_shift, blitsign;
|
||||
int blinea_shift;
|
||||
static uae_u16 blinea, blineb;
|
||||
static int blitline, blitfc, blitfill, blitife, blitsing, blitdesc;
|
||||
static int blitonedot;
|
||||
static int blitonedot, blitsign;
|
||||
static int blit_ch;
|
||||
|
||||
struct bltinfo blt_info;
|
||||
|
@ -48,17 +47,6 @@ static int blit_nod;
|
|||
static const int *blit_diag;
|
||||
static int ddat1use;
|
||||
|
||||
// New vars for blitter mode "partial"
|
||||
static int blit_total_required_cycles; // Estimated number of cycles of entire blitter op
|
||||
static int blit_cycles_per_op; // Number of cycles per blitter op
|
||||
static int blit_cycles_per_vsize; // Number of cycles per line
|
||||
static int blit_vblitsize_done; // Number of vblitsize-lines are done
|
||||
static unsigned long blit_cycle_at_start;
|
||||
static unsigned long blit_init_cycles; // Cycles required for blitter initialisation
|
||||
static unsigned long blit_cycle_current;
|
||||
static unsigned long blit_cycle_entered_wait; // At this cycle, blitter entered in wait-state because of disabled DMA
|
||||
|
||||
|
||||
/*
|
||||
Blitter Idle Cycle:
|
||||
|
||||
|
@ -190,9 +178,6 @@ static __inline__ void blitter_done (void)
|
|||
INTREQ(0x8040);
|
||||
event2_remevent(ev2_blitter);
|
||||
unset_special (®s, SPCFLAG_BLTNASTY);
|
||||
#ifdef BLITTER_DEBUG
|
||||
write_log ("vpos=%d, cycles %d\n", vpos, blit_cyclecounter);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void blitter_dofast(void)
|
||||
|
@ -226,6 +211,7 @@ static void blitter_dofast(void)
|
|||
} else
|
||||
{
|
||||
uae_u32 blitbhold = blt_info.bltbhold;
|
||||
uae_u32 preva = 0, prevb = 0;
|
||||
uaecptr dstp = 0;
|
||||
uae_u32 *blit_masktable_p = blit_masktable + BLITTER_MAX_WORDS - blt_info.hblitsize;
|
||||
|
||||
|
@ -316,6 +302,7 @@ static void blitter_dofast_desc(void)
|
|||
} else
|
||||
{
|
||||
uae_u32 blitbhold = blt_info.bltbhold;
|
||||
uae_u32 preva = 0, prevb = 0;
|
||||
uaecptr dstp = 0;
|
||||
uae_u32 *blit_masktable_p = blit_masktable + BLITTER_MAX_WORDS - blt_info.hblitsize;
|
||||
|
||||
|
@ -488,7 +475,6 @@ static void actually_do_blit(void)
|
|||
if (blt_info.vblitsize == 0)
|
||||
bltstate = BLT_done;
|
||||
} while (bltstate != BLT_done);
|
||||
if(!currprefs.pandora_partial_blits)
|
||||
bltdpt = bltcpt;
|
||||
} else {
|
||||
if (blitdesc)
|
||||
|
@ -499,12 +485,6 @@ static void actually_do_blit(void)
|
|||
}
|
||||
}
|
||||
|
||||
static __inline__ void blitter_doit(void)
|
||||
{
|
||||
actually_do_blit ();
|
||||
blitter_done();
|
||||
}
|
||||
|
||||
void blitter_handler(uae_u32 data)
|
||||
{
|
||||
static int blitter_stuck;
|
||||
|
@ -520,12 +500,6 @@ void blitter_handler(uae_u32 data)
|
|||
}
|
||||
blitter_stuck = 0;
|
||||
|
||||
if(currprefs.pandora_partial_blits)
|
||||
{
|
||||
blitter_do_partial(1);
|
||||
return;
|
||||
}
|
||||
|
||||
// blitter_slowdown doesn't work at the moment
|
||||
// if (blit_slowdown > 0 && !currprefs.immediate_blits) {
|
||||
// event2_newevent (ev2_blitter, blit_slowdown);
|
||||
|
@ -533,7 +507,8 @@ void blitter_handler(uae_u32 data)
|
|||
// return;
|
||||
// }
|
||||
|
||||
blitter_doit();
|
||||
actually_do_blit ();
|
||||
blitter_done();
|
||||
}
|
||||
|
||||
static void blitter_force_finish (void)
|
||||
|
@ -602,11 +577,16 @@ static __inline__ void blit_bltset (int con)
|
|||
}
|
||||
}
|
||||
|
||||
void reset_blit (int bltcon)
|
||||
{
|
||||
if (bltstate == BLT_done)
|
||||
return;
|
||||
blit_bltset (bltcon);
|
||||
}
|
||||
|
||||
static void blitter_start_init(void)
|
||||
{
|
||||
blt_info.blitzero = 1;
|
||||
preva = 0;
|
||||
prevb = 0;
|
||||
|
||||
blit_bltset (1 | 2);
|
||||
ddat1use = 0;
|
||||
|
@ -623,48 +603,20 @@ void do_blitter(void)
|
|||
{
|
||||
int cycles;
|
||||
|
||||
bltstate = BLT_done;
|
||||
|
||||
blit_firstline_cycles = blit_first_cycle = get_cycles ();
|
||||
blit_last_cycle = 0;
|
||||
blit_cyclecounter = 0;
|
||||
|
||||
blitter_start_init ();
|
||||
|
||||
if(currprefs.pandora_partial_blits)
|
||||
{
|
||||
blit_cycle_entered_wait = 0;
|
||||
if(blitline)
|
||||
{
|
||||
blit_cycles_per_op = blit_dmacount2 + (blit_nod ? 0 : 1);
|
||||
//blit_cycles_per_op = blit_diag[0];
|
||||
blit_cycles_per_vsize = blit_cycles_per_op;
|
||||
blit_init_cycles = 2; // HRM says nothing about how much cycles required for blitter initialisation
|
||||
}
|
||||
else
|
||||
{
|
||||
blit_cycles_per_op = blit_dmacount2 + (blit_nod ? 0 : 1);
|
||||
//blit_cycles_per_op = blit_diag[0];
|
||||
blit_cycles_per_vsize = blit_cycles_per_op * blt_info.hblitsize;
|
||||
blit_init_cycles = 2; // HRM says nothing about how much cycles required for blitter initialisation
|
||||
// Used from code below so that maybe_blit behaves same as in normal mode
|
||||
blit_firstline_cycles = blit_first_cycle + (blit_diag[0] * blt_info.hblitsize + cpu_cycles) * CYCLE_UNIT;
|
||||
}
|
||||
blit_total_required_cycles = blit_cycles_per_vsize * blt_info.vblitsize;
|
||||
blit_cyclecounter = blit_init_cycles + blit_total_required_cycles;
|
||||
blit_init_cycles *= CYCLE_UNIT;
|
||||
blit_vblitsize_done = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (blitline) {
|
||||
blitsign = bltcon1 & 0x40;
|
||||
cycles = blt_info.vblitsize;
|
||||
} else {
|
||||
cycles = blt_info.vblitsize * blt_info.hblitsize;
|
||||
blit_firstline_cycles = blit_first_cycle + (blit_diag[0] * blt_info.hblitsize + cpu_cycles) * CYCLE_UNIT;
|
||||
}
|
||||
blit_cyclecounter = cycles * (blit_dmacount2 + (blit_nod ? 0 : 1));
|
||||
}
|
||||
|
||||
bltstate = BLT_init;
|
||||
// blitter_slowdown doesn't work at the moment
|
||||
|
@ -685,99 +637,15 @@ void do_blitter(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (currprefs.immediate_blits) {
|
||||
blitter_doit ();
|
||||
return;
|
||||
}
|
||||
|
||||
if(currprefs.pandora_partial_blits)
|
||||
{
|
||||
blit_cycle_at_start = get_cycles();
|
||||
blit_cycle_current = blit_cycle_at_start;
|
||||
}
|
||||
if (currprefs.immediate_blits)
|
||||
blit_cyclecounter = blit_diag[0];
|
||||
|
||||
event2_newevent(ev2_blitter, blit_cyclecounter);
|
||||
}
|
||||
|
||||
void blitter_dma_disabled(void)
|
||||
{
|
||||
if(bltstate != BLT_work || !currprefs.pandora_partial_blits)
|
||||
return;
|
||||
// execute blitter till current cycle
|
||||
blitter_do_partial(0);
|
||||
if(bltstate == BLT_work)
|
||||
{
|
||||
// We still have something to do...
|
||||
bltstate = BLT_waitDMA;
|
||||
blit_cycle_entered_wait = get_cycles();
|
||||
event2_remevent(ev2_blitter);
|
||||
}
|
||||
}
|
||||
|
||||
void blitter_dma_enabled(void)
|
||||
{
|
||||
if(bltstate != BLT_waitDMA || !currprefs.pandora_partial_blits)
|
||||
return;
|
||||
|
||||
bltstate = BLT_work;
|
||||
// Add cycles we waited to current cycles...
|
||||
unsigned long cycles_waited = get_cycles() - blit_cycle_entered_wait;
|
||||
blit_cycle_current += cycles_waited;
|
||||
event2_remevent(ev2_blitter);
|
||||
event2_newevent(ev2_blitter, cycles_waited);
|
||||
blit_cycle_entered_wait = 0;
|
||||
}
|
||||
|
||||
void blitter_do_partial(int do_all)
|
||||
{
|
||||
if(bltstate != BLT_work && bltstate != BLT_waitDMA)
|
||||
return;
|
||||
|
||||
if (!dmaen (DMA_BLITTER) && !do_all)
|
||||
return;
|
||||
|
||||
unsigned long curr_cpu_cycles = get_cycles();
|
||||
if((curr_cpu_cycles < blit_cycle_current + blit_init_cycles) && !do_all)
|
||||
return; // Blitter not finished with initialisation
|
||||
if(blit_init_cycles > 0)
|
||||
{
|
||||
blit_cycle_current += blit_init_cycles;
|
||||
blit_init_cycles = 0;
|
||||
}
|
||||
|
||||
int num_lines = 0;
|
||||
while(curr_cpu_cycles > blit_cycle_current || do_all)
|
||||
{
|
||||
num_lines++;
|
||||
blit_cycle_current += blit_cycles_per_vsize * CYCLE_UNIT;
|
||||
if(num_lines + blit_vblitsize_done >= blt_info.vblitsize)
|
||||
break;
|
||||
}
|
||||
|
||||
if(num_lines > 0)
|
||||
{
|
||||
int tmp_vblitsize = blt_info.vblitsize;
|
||||
blt_info.vblitsize = num_lines;
|
||||
actually_do_blit();
|
||||
blt_info.vblitsize = tmp_vblitsize;
|
||||
blit_vblitsize_done += num_lines;
|
||||
if(blit_vblitsize_done >= blt_info.vblitsize)
|
||||
{
|
||||
if(blitline)
|
||||
bltdpt = bltcpt;
|
||||
blitter_done();
|
||||
}
|
||||
else
|
||||
bltstate = BLT_work; // still not finished
|
||||
}
|
||||
}
|
||||
|
||||
// Called only from custom.cpp if blitter DMA is now enabled
|
||||
// Called only from custom.cpp if blitter DMA is now enabled and bltstate is BLT_init
|
||||
void blitter_check_start (void)
|
||||
{
|
||||
if (bltstate != BLT_init)
|
||||
return;
|
||||
|
||||
// do the same as in do_blitter after dmaen check
|
||||
bltstate = BLT_work;
|
||||
|
||||
|
@ -787,14 +655,7 @@ void blitter_check_start (void)
|
|||
}
|
||||
|
||||
if (currprefs.immediate_blits) {
|
||||
blitter_doit ();
|
||||
return;
|
||||
}
|
||||
|
||||
if(currprefs.pandora_partial_blits)
|
||||
{
|
||||
blit_cycle_at_start = get_cycles();
|
||||
blit_cycle_current = blit_cycle_at_start;
|
||||
blit_cyclecounter = blit_diag[0];
|
||||
}
|
||||
|
||||
event2_newevent(ev2_blitter, blit_cyclecounter);
|
||||
|
@ -842,6 +703,26 @@ int blitnasty (void)
|
|||
/*
|
||||
void blitter_slowdown (int ddfstrt, int ddfstop, int totalcycles, int freecycles)
|
||||
{
|
||||
static int oddfstrt, oddfstop, ototal, ofree;
|
||||
static int slow;
|
||||
|
||||
if (!totalcycles || ddfstrt < 0 || ddfstop < 0)
|
||||
return;
|
||||
if (ddfstrt != oddfstrt || ddfstop != oddfstop || totalcycles != ototal || ofree != freecycles) {
|
||||
int linecycles = ((ddfstop - ddfstrt + totalcycles - 1) / totalcycles) * totalcycles;
|
||||
int freelinecycles = ((ddfstop - ddfstrt + totalcycles - 1) / totalcycles) * freecycles;
|
||||
int dmacycles = (linecycles * blit_dmacount) / blit_diag[1];
|
||||
oddfstrt = ddfstrt;
|
||||
oddfstop = ddfstop;
|
||||
ototal = totalcycles;
|
||||
ofree = freecycles;
|
||||
slow = 0;
|
||||
if (dmacycles > freelinecycles)
|
||||
slow = dmacycles - freelinecycles;
|
||||
}
|
||||
if (blit_slowdown < 0 || blitline)
|
||||
return;
|
||||
blit_slowdown += slow;
|
||||
}
|
||||
*/
|
||||
|
||||
|
|
625
src/cfgfile.cpp
625
src/cfgfile.cpp
|
@ -143,6 +143,14 @@ static const char *filtermode1[] = { "no_16", "bilinear_16", "no_32", "bilinear_
|
|||
static const char *filtermode2[] = { "0x", "1x", "2x", "3x", "4x", 0 };
|
||||
#endif
|
||||
static const char *cartsmode[] = { "none", "hrtmon", 0 };
|
||||
static const char *idemode[] = { "none", "a600/a1200", "a4000", 0 };
|
||||
static const char *rtctype[] = { "none", "MSM6242B", "RP5C01A", 0 };
|
||||
static const char *ciaatodmode[] = { "vblank", "50hz", "60hz", 0 };
|
||||
static const char *ksmirrortype[] = { "none", "e0", "a8+e0", 0 };
|
||||
static const char *cscompa[] = {
|
||||
"-", "Generic", "CDTV", "CD32", "A500", "A500+", "A600",
|
||||
"A1000", "A1200", "A2000", "A3000", "A3000T", "A4000", "A4000T", 0
|
||||
};
|
||||
/* 3-state boolean! */
|
||||
static const char *fullmodes[] = { "false", "true", /* "FILE_NOT_FOUND", */ "fullwindow", 0 };
|
||||
/* bleh for compatibility */
|
||||
|
@ -341,8 +349,6 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
|
|||
if (p->info[0])
|
||||
cfgfile_write (f, "config_info=%s\n", p->info);
|
||||
cfgfile_write (f, "config_version=%d.%d.%d\n", UAEMAJOR, UAEMINOR, UAESUBREV);
|
||||
// cfgfile_write (f, "config_hardware_path=%s\n", p->config_hardware_path);
|
||||
// cfgfile_write (f, "config_host_path=%s\n", p->config_host_path);
|
||||
|
||||
for (sl = p->all_lines; sl; sl = sl->next) {
|
||||
if (sl->unknown)
|
||||
|
@ -360,33 +366,12 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
|
|||
cfgfile_write (f, "; common\n");
|
||||
|
||||
cfgfile_write (f, "use_gui=%s\n", guimode1[p->start_gui]);
|
||||
cfgfile_write (f, "use_debugger=%s\n", p->start_debugger ? "true" : "false");
|
||||
str = cfgfile_subst_path (p->path_rom, UNEXPANDED, p->romfile);
|
||||
cfgfile_write (f, "kickstart_rom_file=%s\n", str);
|
||||
free (str);
|
||||
// if (p->romident[0])
|
||||
// cfgfile_dwrite (f, "kickstart_rom=%s\n", p->romident);
|
||||
str = cfgfile_subst_path (p->path_rom, UNEXPANDED, p->romextfile);
|
||||
cfgfile_write (f, "kickstart_ext_rom_file=%s\n", str);
|
||||
free (str);
|
||||
// if (p->romextident[0])
|
||||
// cfgfile_write (f, "kickstart_ext_rom=%s\n", p->romextident);
|
||||
// str = cfgfile_subst_path (p->path_rom, UNEXPANDED, p->flashfile);
|
||||
// cfgfile_write (f, "flash_file=%s\n", str);
|
||||
// free (str);
|
||||
// str = cfgfile_subst_path (p->path_rom, UNEXPANDED, p->cartfile);
|
||||
// cfgfile_write (f, "cart_file=%s\n", str);
|
||||
// free (str);
|
||||
// if (p->cartident[0])
|
||||
// cfgfile_write (f, "cart=%s\n", p->cartident);
|
||||
// cfgfile_write (f, "cart_internal=%s\n", cartsmode[p->cart_internal]);
|
||||
// if (p->amaxromfile[0]) {
|
||||
// str = cfgfile_subst_path (p->path_rom, UNEXPANDED, p->amaxromfile);
|
||||
// cfgfile_write (f, "amax_rom_file=%s\n", str);
|
||||
// free (str);
|
||||
// }
|
||||
|
||||
// cfgfile_write (f, "kickshifter=%s\n", p->kickshifter ? "true" : "false");
|
||||
|
||||
p->nr_floppies = 4;
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
@ -394,102 +379,27 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
|
|||
cfgfile_write (f, "floppy%d=%s\n", i, str);
|
||||
free (str);
|
||||
cfgfile_dwrite (f, "floppy%dtype=%d\n", i, p->dfxtype[i]);
|
||||
cfgfile_dwrite (f, "floppy%dsound=%d\n", i, p->dfxclick[i]);
|
||||
if (p->dfxclick[i] < 0 && p->dfxclickexternal[i][0])
|
||||
cfgfile_dwrite (f, "floppy%dsoundext=%s\n", i, p->dfxclickexternal[i]);
|
||||
if (p->dfxtype[i] < 0 && p->nr_floppies > i)
|
||||
p->nr_floppies = i;
|
||||
}
|
||||
// for (i = 0; i < MAX_SPARE_DRIVES; i++) {
|
||||
// if (p->dfxlist[i][0])
|
||||
// cfgfile_dwrite (f, "diskimage%d=%s\n", i, p->dfxlist[i]);
|
||||
// }
|
||||
|
||||
cfgfile_write (f, "nr_floppies=%d\n", p->nr_floppies);
|
||||
cfgfile_write (f, "floppy_speed=%d\n", p->floppy_speed);
|
||||
cfgfile_write (f, "floppy_volume=%d\n", p->dfxclickvolume);
|
||||
// cfgfile_write (f, "parallel_on_demand=%s\n", p->parallel_demand ? "true" : "false");
|
||||
// cfgfile_write (f, "serial_on_demand=%s\n", p->serial_demand ? "true" : "false");
|
||||
// cfgfile_write (f, "serial_hardware_ctsrts=%s\n", p->serial_hwctsrts ? "true" : "false");
|
||||
// cfgfile_write (f, "serial_direct=%s\n", p->serial_direct ? "true" : "false");
|
||||
cfgfile_write (f, "scsi=%s\n", scsimode[p->scsi]);
|
||||
// cfgfile_write (f, "uaeserial=%s\n", p->uaeserial ? "true" : "false");
|
||||
// cfgfile_write (f, "sana2=%s\n", p->sana2 ? "true" : "false");
|
||||
|
||||
cfgfile_write (f, "sound_output=%s\n", soundmode1[p->produce_sound]);
|
||||
cfgfile_write (f, "sound_bits=%d\n", p->sound_bits);
|
||||
cfgfile_write (f, "sound_channels=%s\n", stereomode[p->sound_stereo]);
|
||||
cfgfile_write (f, "sound_stereo_separation=%d\n", p->sound_stereo_separation);
|
||||
cfgfile_write (f, "sound_stereo_mixing_delay=%d\n", p->sound_mixed_stereo_delay >= 0 ? p->sound_mixed_stereo_delay : 0);
|
||||
// cfgfile_write (f, "sound_max_buff=%d\n", p->sound_maxbsiz);
|
||||
cfgfile_write (f, "sound_frequency=%d\n", p->sound_freq);
|
||||
// cfgfile_write (f, "sound_latency=%d\n", p->sound_latency);
|
||||
cfgfile_write (f, "sound_interpol=%s\n", interpolmode[p->sound_interpol]);
|
||||
cfgfile_write (f, "sound_filter=%s\n", soundfiltermode1[p->sound_filter]);
|
||||
cfgfile_write (f, "sound_filter_type=%s\n", soundfiltermode2[p->sound_filter_type]);
|
||||
cfgfile_write (f, "sound_volume=%d\n", p->sound_volume);
|
||||
cfgfile_write (f, "sound_auto=%s\n", p->sound_auto ? "yes" : "no");
|
||||
// cfgfile_write (f, "sound_stereo_swap_paula=%s\n", p->sound_stereo_swap_paula ? "yes" : "no");
|
||||
// cfgfile_write (f, "sound_stereo_swap_ahi=%s\n", p->sound_stereo_swap_ahi ? "yes" : "no");
|
||||
|
||||
// cfgfile_write (f, "comp_trustbyte=%s\n", compmode[p->comptrustbyte]);
|
||||
// cfgfile_write (f, "comp_trustword=%s\n", compmode[p->comptrustword]);
|
||||
// cfgfile_write (f, "comp_trustlong=%s\n", compmode[p->comptrustlong]);
|
||||
// cfgfile_write (f, "comp_trustnaddr=%s\n", compmode[p->comptrustnaddr]);
|
||||
// cfgfile_write (f, "comp_nf=%s\n", p->compnf ? "true" : "false");
|
||||
// cfgfile_write (f, "comp_constjump=%s\n", p->comp_constjump ? "true" : "false");
|
||||
// cfgfile_write (f, "comp_oldsegv=%s\n", p->comp_oldsegv ? "true" : "false");
|
||||
|
||||
// cfgfile_write (f, "comp_flushmode=%s\n", flushmode[p->comp_hardflush]);
|
||||
// cfgfile_write (f, "compforcesettings=%s\n", p->compforcesettings ? "true" : "false");
|
||||
// cfgfile_write (f, "compfpu=%s\n", p->compfpu ? "true" : "false");
|
||||
// cfgfile_write (f, "fpu_strict=%s\n", p->fpu_strict ? "true" : "false");
|
||||
// cfgfile_write (f, "comp_midopt=%s\n", p->comp_midopt ? "true" : "false");
|
||||
// cfgfile_write (f, "comp_lowopt=%s\n", p->comp_lowopt ? "true" : "false");
|
||||
// cfgfile_write (f, "avoid_cmov=%s\n", p->avoid_cmov ? "true" : "false" );
|
||||
// cfgfile_write (f, "avoid_dga=%s\n", p->avoid_dga ? "true" : "false" );
|
||||
// cfgfile_write (f, "avoid_vid=%s\n", p->avoid_vid ? "true" : "false" );
|
||||
cfgfile_write (f, "cachesize=%d\n", p->cachesize);
|
||||
// if (p->override_dga_address)
|
||||
// cfgfile_write (f, "override_dga_address=0x%08x\n", p->override_dga_address);
|
||||
|
||||
// for (i = 0; i < 2; i++) {
|
||||
// struct jport *jp = &p->jports[i];
|
||||
// int v = jp->id;
|
||||
// char tmp1[100], tmp2[50];
|
||||
// if (v < 0) {
|
||||
// strcpy (tmp2, "none");
|
||||
// } else if (v < JSEM_JOYS) {
|
||||
// sprintf (tmp2, "kbd%d", v + 1);
|
||||
// } else if (v < JSEM_MICE) {
|
||||
// sprintf (tmp2, "joy%d", v - JSEM_JOYS);
|
||||
// } else {
|
||||
// strcpy (tmp2, "mouse");
|
||||
// if (v - JSEM_MICE > 0)
|
||||
// sprintf (tmp2, "mouse%d", v - JSEM_MICE);
|
||||
// }
|
||||
// sprintf (tmp1, "joyport%d=%s\n", i, tmp2);
|
||||
// cfgfile_write (f, tmp1);
|
||||
// if (jp->name) {
|
||||
// sprintf (tmp1, "joyportfriendlyname%d=%s\n", i, jp->name);
|
||||
// cfgfile_write (f, tmp1);
|
||||
// }
|
||||
// if (jp->configname) {
|
||||
// sprintf (tmp1, "joyportname%d=%s\n", i, jp->configname);
|
||||
// cfgfile_write (f, tmp1);
|
||||
// }
|
||||
// }
|
||||
|
||||
// cfgfile_write (f, "bsdsocket_emu=%s\n", p->socket_emu ? "true" : "false");
|
||||
|
||||
cfgfile_write (f, "synchronize_clock=%s\n", p->tod_hack ? "yes" : "no");
|
||||
// cfgfile_write (f, "maprom=0x%x\n", p->maprom);
|
||||
// cfgfile_write (f, "parallel_postscript_emulation=%s\n", p->parallel_postscript_emulation ? "yes" : "no");
|
||||
// cfgfile_write (f, "parallel_postscript_detection=%s\n", p->parallel_postscript_detection ? "yes" : "no");
|
||||
// cfgfile_write (f, "ghostscript_parameters=%s\n", p->ghostscript_parameters);
|
||||
// cfgfile_write (f, "parallel_autoflush=%d\n", p->parallel_autoflush_time);
|
||||
|
||||
// cfgfile_dwrite (f, "gfx_display=%d\n", p->gfx_display);
|
||||
cfgfile_dwrite (f, "gfx_framerate=%d\n", p->gfx_framerate);
|
||||
cfgfile_dwrite (f, "gfx_width=%d\n", p->gfx_size.width);
|
||||
cfgfile_dwrite (f, "gfx_height=%d\n", p->gfx_size.height);
|
||||
|
@ -497,77 +407,11 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
|
|||
cfgfile_dwrite (f, "gfx_height_windowed=%d\n", p->gfx_size_win.height);
|
||||
cfgfile_dwrite (f, "gfx_width_fullscreen=%d\n", p->gfx_size_fs.width);
|
||||
cfgfile_dwrite (f, "gfx_height_fullscreen=%d\n", p->gfx_size_fs.height);
|
||||
cfgfile_dwrite (f, "gfx_refreshrate=%d\n", p->gfx_refreshrate);
|
||||
// cfgfile_dwrite (f, "gfx_autoresolution=%d\n", p->gfx_autoresolution);
|
||||
cfgfile_dwrite (f, "gfx_vsync=%s\n", p->gfx_avsync ? "true" : "false");
|
||||
// cfgfile_dwrite (f, "gfx_vsync_picasso=%s\n", p->gfx_pvsync ? "true" : "false");
|
||||
cfgfile_dwrite (f, "gfx_lores=%s\n", p->gfx_resolution == 0 ? "true" : "false");
|
||||
cfgfile_dwrite (f, "gfx_resolution=%s\n", lorestype1[p->gfx_resolution]);
|
||||
// cfgfile_dwrite (f, "gfx_lores_mode=%s\n", loresmode[p->gfx_lores_mode]);
|
||||
// cfgfile_dwrite (f, "gfx_linemode=%s\n", linemode1[p->gfx_linedbl]);
|
||||
cfgfile_dwrite (f, "gfx_correct_aspect=%s\n", p->gfx_correct_aspect ? "true" : "false");
|
||||
// cfgfile_dwrite (f, "gfx_fullscreen_amiga=%s\n", fullmodes[p->gfx_afullscreen]);
|
||||
// cfgfile_dwrite (f, "gfx_fullscreen_picasso=%s\n", fullmodes[p->gfx_pfullscreen]);
|
||||
cfgfile_dwrite (f, "gfx_center_horizontal=%s\n", centermode1[p->gfx_xcenter]);
|
||||
cfgfile_dwrite (f, "gfx_center_vertical=%s\n", centermode1[p->gfx_ycenter]);
|
||||
// cfgfile_dwrite (f, "gfx_colour_mode=%s\n", colormode1[p->color_mode]);
|
||||
|
||||
#ifdef GFXFILTER
|
||||
if (p->gfx_filter > 0) {
|
||||
int i = 0;
|
||||
struct uae_filter *uf;
|
||||
while (uaefilters[i].name) {
|
||||
uf = &uaefilters[i];
|
||||
if (uf->type == p->gfx_filter) {
|
||||
cfgfile_dwrite (f, "gfx_filter=%s\n", uf->cfgname);
|
||||
if (uf->type == p->gfx_filter) {
|
||||
if (uf->x[0]) {
|
||||
cfgfile_dwrite (f, "gfx_filter_mode=%s\n", filtermode1[p->gfx_filter_filtermode]);
|
||||
} else {
|
||||
int mt[4], i = 0;
|
||||
if (uf->x[1]) mt[i++] = 1;
|
||||
if (uf->x[2]) mt[i++] = 2;
|
||||
if (uf->x[3]) mt[i++] = 3;
|
||||
if (uf->x[4]) mt[i++] = 4;
|
||||
cfgfile_dwrite (f, "gfx_filter_mode=%dx\n", mt[p->gfx_filter_filtermode]);
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
cfgfile_dwrite (f, "gfx_filter=no\n");
|
||||
}
|
||||
|
||||
cfgfile_dwrite (f, "gfx_filter_vert_zoom=%d\n", p->gfx_filter_vert_zoom);
|
||||
cfgfile_dwrite (f, "gfx_filter_horiz_zoom=%d\n", p->gfx_filter_horiz_zoom);
|
||||
cfgfile_dwrite (f, "gfx_filter_vert_zoom_mult=%d\n", p->gfx_filter_vert_zoom_mult);
|
||||
cfgfile_dwrite (f, "gfx_filter_horiz_zoom_mult=%d\n", p->gfx_filter_horiz_zoom_mult);
|
||||
cfgfile_dwrite (f, "gfx_filter_vert_offset=%d\n", p->gfx_filter_vert_offset);
|
||||
cfgfile_dwrite (f, "gfx_filter_horiz_offset=%d\n", p->gfx_filter_horiz_offset);
|
||||
cfgfile_dwrite (f, "gfx_filter_scanlines=%d\n", p->gfx_filter_scanlines);
|
||||
cfgfile_dwrite (f, "gfx_filter_scanlinelevel=%d\n", p->gfx_filter_scanlinelevel);
|
||||
cfgfile_dwrite (f, "gfx_filter_scanlineratio=%d\n", p->gfx_filter_scanlineratio);
|
||||
cfgfile_dwrite (f, "gfx_filter_luminance=%d\n", p->gfx_filter_luminance);
|
||||
cfgfile_dwrite (f, "gfx_filter_contrast=%d\n", p->gfx_filter_contrast);
|
||||
cfgfile_dwrite (f, "gfx_filter_saturation=%d\n", p->gfx_filter_saturation);
|
||||
cfgfile_dwrite (f, "gfx_filter_gamma=%d\n", p->gfx_filter_gamma);
|
||||
cfgfile_dwrite (f, "gfx_filter_blur=%d\n", p->gfx_filter_blur);
|
||||
cfgfile_dwrite (f, "gfx_filter_noise=%d\n", p->gfx_filter_noise);
|
||||
cfgfile_dwrite (f, "gfx_filter_upscale=%s\n", p->gfx_filter_upscale ? "true" : "false");
|
||||
|
||||
cfgfile_dwrite (f, "gfx_luminance=%d\n", p->gfx_luminance);
|
||||
cfgfile_dwrite (f, "gfx_contrast=%d\n", p->gfx_contrast);
|
||||
cfgfile_dwrite (f, "gfx_gamma=%d\n", p->gfx_gamma);
|
||||
#endif
|
||||
|
||||
cfgfile_write (f, "immediate_blits=%s\n", p->immediate_blits ? "true" : "false");
|
||||
cfgfile_write (f, "fast_copper=%s\n", p->fast_copper ? "true" : "false");
|
||||
cfgfile_write (f, "ntsc=%s\n", p->ntscmode ? "true" : "false");
|
||||
// cfgfile_write (f, "genlock=%s\n", p->genlock ? "true" : "false");
|
||||
cfgfile_dwrite (f, "show_leds=%s\n", p->leds_on_screen ? "true" : "false");
|
||||
// cfgfile_dwrite (f, "keyboard_leds=numlock:%s,capslock:%s,scrolllock:%s\n",
|
||||
// kbleds[p->keyboard_leds[0]], kbleds[p->keyboard_leds[1]], kbleds[p->keyboard_leds[2]]);
|
||||
if (p->chipset_mask & CSMASK_AGA)
|
||||
cfgfile_dwrite (f, "chipset=aga\n");
|
||||
else if ((p->chipset_mask & CSMASK_ECS_AGNUS) && (p->chipset_mask & CSMASK_ECS_DENISE))
|
||||
|
@ -578,14 +422,11 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
|
|||
cfgfile_dwrite (f, "chipset=ecs_denise\n");
|
||||
else
|
||||
cfgfile_dwrite (f, "chipset=ocs\n");
|
||||
// cfgfile_write (f, "chipset_refreshrate=%d\n", p->chipset_refreshrate);
|
||||
cfgfile_write (f, "collision_level=%s\n", collmode[p->collision_level]);
|
||||
|
||||
cfgfile_dwrite (f, "a1000ram=%s\n", p->cs_a1000ram ? "true" : "false");
|
||||
|
||||
cfgfile_write (f, "fastmem_size=%d\n", p->fastmem_size / 0x100000);
|
||||
// cfgfile_write (f, "a3000mem_size=%d\n", p->mbresmem_low_size / 0x100000);
|
||||
// cfgfile_write (f, "mbresmem_size=%d\n", p->mbresmem_high_size / 0x100000);
|
||||
cfgfile_write (f, "z3mem_size=%d\n", p->z3fastmem_size / 0x100000);
|
||||
cfgfile_write (f, "z3mem_start=0x%x\n", p->z3fastmem_start);
|
||||
cfgfile_write (f, "bogomem_size=%d\n", p->bogomem_size / 0x40000);
|
||||
|
@ -605,33 +446,10 @@ void cfgfile_save_options (struct zfile *f, struct uae_prefs *p, int type)
|
|||
cfgfile_write (f, "cpu_compatible=%s\n", p->cpu_compatible ? "true" : "false");
|
||||
cfgfile_write (f, "cpu_24bit_addressing=%s\n", p->address_space_24 ? "true" : "false");
|
||||
/* do not reorder end */
|
||||
// cfgfile_write (f, "cpu_cycle_exact=%s\n", p->cpu_cycle_exact ? "true" : "false");
|
||||
// cfgfile_write (f, "blitter_cycle_exact=%s\n", p->blitter_cycle_exact ? "true" : "false");
|
||||
cfgfile_write (f, "rtg_nocustom=%s\n", p->picasso96_nocustom ? "true" : "false");
|
||||
|
||||
// cfgfile_write (f, "log_illegal_mem=%s\n", p->illegal_mem ? "true" : "false");
|
||||
// if (p->catweasel >= 100)
|
||||
// cfgfile_dwrite (f, "catweasel=0x%x\n", p->catweasel);
|
||||
// else
|
||||
// cfgfile_dwrite (f, "catweasel=%d\n", p->catweasel);
|
||||
|
||||
// cfgfile_write (f, "kbd_lang=%s\n", (p->keyboard_lang == KBD_LANG_DE ? "de"
|
||||
// : p->keyboard_lang == KBD_LANG_DK ? "dk"
|
||||
// : p->keyboard_lang == KBD_LANG_ES ? "es"
|
||||
// : p->keyboard_lang == KBD_LANG_US ? "us"
|
||||
// : p->keyboard_lang == KBD_LANG_SE ? "se"
|
||||
// : p->keyboard_lang == KBD_LANG_FR ? "fr"
|
||||
// : p->keyboard_lang == KBD_LANG_IT ? "it"
|
||||
// : "FOO"));
|
||||
|
||||
// cfgfile_dwrite (f, "state_replay=%s\n", p->statecapture ? "yes" : "no");
|
||||
// cfgfile_dwrite (f, "state_replay_rate=%d\n", p->statecapturerate);
|
||||
// cfgfile_dwrite (f, "state_replay_buffer=%d\n", p->statecapturebuffersize);
|
||||
|
||||
#ifdef FILESYS
|
||||
write_filesys_config (p, UNEXPANDED, p->path_hardfile, f);
|
||||
// if (p->filesys_no_uaefsdb)
|
||||
// cfgfile_write (f, "filesys_no_fsdb=%s\n", p->filesys_no_uaefsdb ? "true" : "false");
|
||||
#endif
|
||||
write_inputdevice_config (p, f);
|
||||
|
||||
|
@ -791,100 +609,26 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
// for (i = 0; i < MAX_SPARE_DRIVES; i++) {
|
||||
// sprintf (tmpbuf, "diskimage%d", i);
|
||||
// if (cfgfile_string (option, value, tmpbuf, p->dfxlist[i], sizeof p->dfxlist[i])) {
|
||||
#if 0
|
||||
if (i < 4 && !p->df[i][0])
|
||||
strcpy (p->df[i], p->dfxlist[i]);
|
||||
#endif
|
||||
// return 1;
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1)) {
|
||||
// /* backwards compatibility */
|
||||
// p->sound_latency = 1000 * (p->sound_maxbsiz >> 1) / p->sound_freq;
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
if (/*cfgfile_intval (option, value, "sound_latency", &p->sound_latency, 1)
|
||||
|| cfgfile_intval (option, value, "sound_max_buff", &p->sound_maxbsiz, 1)
|
||||
||*/ cfgfile_intval (option, value, "sound_bits", &p->sound_bits, 1)
|
||||
// || cfgfile_intval (option, value, "state_replay_rate", &p->statecapturerate, 1)
|
||||
// || cfgfile_intval (option, value, "state_replay_buffer", &p->statecapturebuffersize, 1)
|
||||
|| cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1)
|
||||
|| cfgfile_intval (option, value, "sound_volume", &p->sound_volume, 1)
|
||||
if (cfgfile_intval (option, value, "sound_frequency", &p->sound_freq, 1)
|
||||
|| cfgfile_intval (option, value, "sound_stereo_separation", &p->sound_stereo_separation, 1)
|
||||
|| cfgfile_intval (option, value, "sound_stereo_mixing_delay", &p->sound_mixed_stereo_delay, 1)
|
||||
|
||||
// || cfgfile_intval (option, value, "gfx_display", &p->gfx_display, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_framerate", &p->gfx_framerate, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_width_windowed", &p->gfx_size_win.width, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_height_windowed", &p->gfx_size_win.height, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_width_fullscreen", &p->gfx_size_fs.width, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_height_fullscreen", &p->gfx_size_fs.height, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_refreshrate", &p->gfx_refreshrate, 1)
|
||||
// || cfgfile_intval (option, value, "gfx_autoresolution", &p->gfx_autoresolution, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_height_fullscreen", &p->gfx_size_fs.height, 1))
|
||||
|
||||
// || cfgfile_intval (option, value, "gfx_center_horizontal_position", &p->gfx_xcenter_pos, 1)
|
||||
// || cfgfile_intval (option, value, "gfx_center_vertical_position", &p->gfx_ycenter_pos, 1)
|
||||
// || cfgfile_intval (option, value, "gfx_center_horizontal_size", &p->gfx_xcenter_size, 1)
|
||||
// || cfgfile_intval (option, value, "gfx_center_vertical_size", &p->gfx_ycenter_size, 1)
|
||||
|
||||
#ifdef GFXFILTER
|
||||
|| cfgfile_intval (option, value, "gfx_filter_vert_zoom", &p->gfx_filter_vert_zoom, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_horiz_zoom", &p->gfx_filter_horiz_zoom, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_vert_zoom_mult", &p->gfx_filter_vert_zoom_mult, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_horiz_zoom_mult", &p->gfx_filter_horiz_zoom_mult, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_vert_offset", &p->gfx_filter_vert_offset, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_horiz_offset", &p->gfx_filter_horiz_offset, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_scanlines", &p->gfx_filter_scanlines, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_scanlinelevel", &p->gfx_filter_scanlinelevel, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_scanlineratio", &p->gfx_filter_scanlineratio, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_luminance", &p->gfx_filter_luminance, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_contrast", &p->gfx_filter_contrast, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_saturation", &p->gfx_filter_saturation, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_gamma", &p->gfx_filter_gamma, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_blur", &p->gfx_filter_blur, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_filter_noise", &p->gfx_filter_noise, 1)
|
||||
|| cfgfile_yesno (option, value, "gfx_filter_upscale", &p->gfx_filter_upscale)
|
||||
|| cfgfile_intval (option, value, "gfx_luminance", &p->gfx_luminance, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_contrast", &p->gfx_contrast, 1)
|
||||
|| cfgfile_intval (option, value, "gfx_gamma", &p->gfx_gamma, 1)
|
||||
#endif
|
||||
|| cfgfile_intval (option, value, "floppy0sound", &p->dfxclick[0], 1)
|
||||
|| cfgfile_intval (option, value, "floppy1sound", &p->dfxclick[1], 1)
|
||||
|| cfgfile_intval (option, value, "floppy2sound", &p->dfxclick[2], 1)
|
||||
|| cfgfile_intval (option, value, "floppy3sound", &p->dfxclick[3], 1)
|
||||
|| cfgfile_intval (option, value, "floppy_volume", &p->dfxclickvolume, 1)
|
||||
/* || cfgfile_intval (option, value, "override_dga_address", &p->override_dga_address, 1)*/)
|
||||
return 1;
|
||||
|
||||
if (cfgfile_string (option, value, "floppy0soundext", p->dfxclickexternal[0], sizeof p->dfxclickexternal[0])
|
||||
|| cfgfile_string (option, value, "floppy1soundext", p->dfxclickexternal[1], sizeof p->dfxclickexternal[1])
|
||||
|| cfgfile_string (option, value, "floppy2soundext", p->dfxclickexternal[2], sizeof p->dfxclickexternal[2])
|
||||
|| cfgfile_string (option, value, "floppy3soundext", p->dfxclickexternal[3], sizeof p->dfxclickexternal[3])
|
||||
|| cfgfile_string (option, value, "config_info", p->info, sizeof p->info)
|
||||
if (cfgfile_string (option, value, "config_info", p->info, sizeof p->info)
|
||||
|| cfgfile_string (option, value, "config_description", p->description, sizeof p->description))
|
||||
return 1;
|
||||
|
||||
if (cfgfile_yesno (option, value, "use_debugger", &p->start_debugger)
|
||||
|| cfgfile_yesno (option, value, "sound_auto", &p->sound_auto)
|
||||
// || cfgfile_yesno (option, value, "sound_stereo_swap_paula", &p->sound_stereo_swap_paula)
|
||||
// || cfgfile_yesno (option, value, "sound_stereo_swap_ahi", &p->sound_stereo_swap_ahi)
|
||||
// || cfgfile_yesno (option, value, "state_replay", &p->statecapture)
|
||||
// || cfgfile_yesno (option, value, "avoid_cmov", &p->avoid_cmov)
|
||||
// || cfgfile_yesno (option, value, "avoid_dga", &p->avoid_dga)
|
||||
// || cfgfile_yesno (option, value, "avoid_vid", &p->avoid_vid)
|
||||
// || cfgfile_yesno (option, value, "log_illegal_mem", &p->illegal_mem)
|
||||
// || cfgfile_yesno (option, value, "filesys_no_fsdb", &p->filesys_no_uaefsdb)
|
||||
|| cfgfile_yesno (option, value, "gfx_vsync", &p->gfx_avsync)
|
||||
// || cfgfile_yesno (option, value, "gfx_vsync_picasso", &p->gfx_pvsync)
|
||||
|| cfgfile_yesno (option, value, "gfx_correct_aspect", &p->gfx_correct_aspect)
|
||||
if (cfgfile_yesno (option, value, "sound_auto", &p->sound_auto)
|
||||
|| cfgfile_yesno (option, value, "show_leds", &p->leds_on_screen)
|
||||
|| cfgfile_yesno (option, value, "synchronize_clock", &p->tod_hack)
|
||||
/* || cfgfile_yesno (option, value, "bsdsocket_emu", &p->socket_emu)*/)
|
||||
|| cfgfile_yesno (option, value, "synchronize_clock", &p->tod_hack))
|
||||
return 1;
|
||||
|
||||
if (cfgfile_strval (option, value, "sound_output", &p->produce_sound, soundmode1, 1)
|
||||
|
@ -894,111 +638,16 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
|
|||
|| cfgfile_strval (option, value, "sound_filter_type", &p->sound_filter_type, soundfiltermode2, 0)
|
||||
|| cfgfile_strval (option, value, "use_gui", &p->start_gui, guimode1, 1)
|
||||
|| cfgfile_strval (option, value, "use_gui", &p->start_gui, guimode2, 1)
|
||||
|| cfgfile_strval (option, value, "use_gui", &p->start_gui, guimode3, 0)
|
||||
|| cfgfile_strval (option, value, "gfx_resolution", &p->gfx_resolution, lorestype1, 0)
|
||||
|| cfgfile_strval (option, value, "gfx_lores", &p->gfx_resolution, lorestype2, 0)
|
||||
// || cfgfile_strval (option, value, "gfx_lores_mode", &p->gfx_lores_mode, loresmode, 0)
|
||||
// || cfgfile_strval (option, value, "gfx_fullscreen_amiga", &p->gfx_afullscreen, fullmodes, 0)
|
||||
// || cfgfile_strval (option, value, "gfx_fullscreen_picasso", &p->gfx_pfullscreen, fullmodes, 0)
|
||||
// || cfgfile_strval (option, value, "gfx_linemode", &p->gfx_linedbl, linemode1, 1)
|
||||
// || cfgfile_strval (option, value, "gfx_linemode", &p->gfx_linedbl, linemode2, 0)
|
||||
|| cfgfile_strval (option, value, "gfx_center_horizontal", &p->gfx_xcenter, centermode1, 1)
|
||||
|| cfgfile_strval (option, value, "gfx_center_vertical", &p->gfx_ycenter, centermode1, 1)
|
||||
|| cfgfile_strval (option, value, "gfx_center_horizontal", &p->gfx_xcenter, centermode2, 0)
|
||||
|| cfgfile_strval (option, value, "gfx_center_vertical", &p->gfx_ycenter, centermode2, 0)
|
||||
// || cfgfile_strval (option, value, "gfx_colour_mode", &p->color_mode, colormode1, 1)
|
||||
// || cfgfile_strval (option, value, "gfx_colour_mode", &p->color_mode, colormode2, 0)
|
||||
// || cfgfile_strval (option, value, "gfx_color_mode", &p->color_mode, colormode1, 1)
|
||||
/* || cfgfile_strval (option, value, "gfx_color_mode", &p->color_mode, colormode2, 0)*/)
|
||||
|| cfgfile_strval (option, value, "use_gui", &p->start_gui, guimode3, 0))
|
||||
return 1;
|
||||
|
||||
|
||||
#ifdef GFXFILTER
|
||||
if (strcmp (option,"gfx_filter") == 0) {
|
||||
int i = 0;
|
||||
p->gfx_filter = 0;
|
||||
while(uaefilters[i].name) {
|
||||
if (!strcmp (uaefilters[i].cfgname, value)) {
|
||||
p->gfx_filter = uaefilters[i].type;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (strcmp (option,"gfx_filter_mode") == 0) {
|
||||
p->gfx_filter_filtermode = 0;
|
||||
if (p->gfx_filter > 0) {
|
||||
struct uae_filter *uf;
|
||||
int i = 0;
|
||||
while(uaefilters[i].name) {
|
||||
uf = &uaefilters[i];
|
||||
if (uf->type == p->gfx_filter) {
|
||||
if (uf->x[0]) {
|
||||
cfgfile_strval (option, value, "gfx_filter_mode", &p->gfx_filter_filtermode, filtermode1, 0);
|
||||
} else {
|
||||
int mt[4], j;
|
||||
i = 0;
|
||||
if (uf->x[1]) mt[i++] = 1;
|
||||
if (uf->x[2]) mt[i++] = 2;
|
||||
if (uf->x[3]) mt[i++] = 3;
|
||||
if (uf->x[4]) mt[i++] = 4;
|
||||
cfgfile_strval (option, value, "gfx_filter_mode", &i, filtermode2, 0);
|
||||
for (j = 0; j < i; j++) {
|
||||
if (mt[j] == i)
|
||||
p->gfx_filter_filtermode = j;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (strcmp (option, "gfx_width") == 0 || strcmp (option, "gfx_height") == 0) {
|
||||
cfgfile_intval (option, value, "gfx_width", &p->gfx_size.width, 1);
|
||||
cfgfile_intval (option, value, "gfx_height", &p->gfx_size.height, 1);
|
||||
// p->gfx_size_fs.width = p->gfx_size_win.width;
|
||||
// p->gfx_size_fs.height = p->gfx_size_win.height;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// if (strcmp (option, "gfx_fullscreen_multi") == 0 || strcmp (option, "gfx_windowed_multi") == 0) {
|
||||
// char tmp[256], *tmpp, *tmpp2;
|
||||
// struct wh *wh = p->gfx_size_win_xtra;
|
||||
// if (strcmp (option, "gfx_fullscreen_multi") == 0)
|
||||
// wh = p->gfx_size_fs_xtra;
|
||||
// sprintf (tmp, ",%s,", value);
|
||||
// tmpp2 = tmp;
|
||||
// for (i = 0; i < 4; i++) {
|
||||
// tmpp = strchr (tmpp2, ',');
|
||||
// tmpp++;
|
||||
// wh[i].width = atol (tmpp);
|
||||
// while (*tmpp != ',' && *tmpp != 'x')
|
||||
// tmpp++;
|
||||
// wh[i].height = atol (tmpp + 1);
|
||||
// tmpp2 = tmpp;
|
||||
// }
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// if (strcmp (option, "joyportfriendlyname0") == 0 || strcmp (option, "joyportfriendlyname1") == 0) {
|
||||
// inputdevice_joyport_config (p, value, strcmp (option, "joyportfriendlyname0") == 0 ? 0 : 1, 2);
|
||||
// return 1;
|
||||
// }
|
||||
// if (strcmp (option, "joyportname0") == 0 || strcmp (option, "joyportname1") == 0) {
|
||||
// inputdevice_joyport_config (p, value, strcmp (option, "joyportname0") == 0 ? 0 : 1, 1);
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// if (strcmp (option, "joyport0") == 0 || strcmp (option, "joyport1") == 0) {
|
||||
// inputdevice_joyport_config (p, value, strcmp (option, "joyport0") == 0 ? 0 : 1, 0);
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
if (cfgfile_string (option, value, "statefile", tmpbuf, sizeof (tmpbuf))) {
|
||||
savestate_state = STATE_DORESTORE;
|
||||
strcpy (savestate_fname, tmpbuf);
|
||||
|
@ -1014,21 +663,6 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
|
|||
return 1;
|
||||
}
|
||||
|
||||
// if (strcmp (option, "kbd_lang") == 0) {
|
||||
// KbdLang l;
|
||||
// if ((l = KBD_LANG_DE, strcasecmp (value, "de") == 0)
|
||||
// || (l = KBD_LANG_DK, strcasecmp (value, "dk") == 0)
|
||||
// || (l = KBD_LANG_SE, strcasecmp (value, "se") == 0)
|
||||
// || (l = KBD_LANG_US, strcasecmp (value, "us") == 0)
|
||||
// || (l = KBD_LANG_FR, strcasecmp (value, "fr") == 0)
|
||||
// || (l = KBD_LANG_IT, strcasecmp (value, "it") == 0)
|
||||
// || (l = KBD_LANG_ES, strcasecmp (value, "es") == 0))
|
||||
// p->keyboard_lang = l;
|
||||
// else
|
||||
// write_log ("Unknown keyboard language\n");
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
if (cfgfile_string (option, value, "config_version", tmpbuf, sizeof (tmpbuf))) {
|
||||
char *tmpp2;
|
||||
tmpp = strchr (value, '.');
|
||||
|
@ -1046,35 +680,6 @@ static int cfgfile_parse_host (struct uae_prefs *p, char *option, char *value)
|
|||
return 1;
|
||||
}
|
||||
|
||||
// if (cfgfile_string (option, value, "keyboard_leds", tmpbuf, sizeof (tmpbuf))) {
|
||||
// char *tmpp2 = tmpbuf;
|
||||
// int i, num;
|
||||
// p->keyboard_leds[0] = p->keyboard_leds[1] = p->keyboard_leds[2] = 0;
|
||||
// p->keyboard_leds_in_use = 0;
|
||||
// strcat (tmpbuf, ",");
|
||||
// for (i = 0; i < 3; i++) {
|
||||
// tmpp = strchr (tmpp2, ':');
|
||||
// if (!tmpp)
|
||||
// break;
|
||||
// *tmpp++= 0;
|
||||
// num = -1;
|
||||
// if (!strcasecmp (tmpp2, "numlock")) num = 0;
|
||||
// if (!strcasecmp (tmpp2, "capslock")) num = 1;
|
||||
// if (!strcasecmp (tmpp2, "scrolllock")) num = 2;
|
||||
// tmpp2 = tmpp;
|
||||
// tmpp = strchr (tmpp2, ',');
|
||||
// if (!tmpp)
|
||||
// break;
|
||||
// *tmpp++= 0;
|
||||
// if (num >= 0) {
|
||||
// p->keyboard_leds[num] = match_string (kbleds, tmpp2);
|
||||
// if (p->keyboard_leds[num]) p->keyboard_leds_in_use = 1;
|
||||
// }
|
||||
// tmpp2 = tmpp;
|
||||
// }
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1151,86 +756,34 @@ static int cfgfile_parse_hardware (struct uae_prefs *p, char *option, char *valu
|
|||
char *section = 0;
|
||||
char tmpbuf[CONFIG_BLEN];
|
||||
|
||||
// if (cfgfile_yesno (option, value, "cpu_cycle_exact", &p->cpu_cycle_exact)
|
||||
// || cfgfile_yesno (option, value, "blitter_cycle_exact", &p->blitter_cycle_exact)) {
|
||||
// if (p->cpu_model >= 68020 && p->cachesize > 0)
|
||||
// p->cpu_cycle_exact = p->blitter_cycle_exact = 0;
|
||||
// /* we don't want cycle-exact in 68020/40+JIT modes */
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
if (cfgfile_yesno (option, value, "immediate_blits", &p->immediate_blits)
|
||||
|
||||
|| cfgfile_yesno (option, value, "a1000ram", &p->cs_a1000ram)
|
||||
|
||||
|| cfgfile_yesno (option, value, "fast_copper", &p->fast_copper)
|
||||
// || cfgfile_yesno (option, value, "kickshifter", &p->kickshifter)
|
||||
|| cfgfile_yesno (option, value, "ntsc", &p->ntscmode)
|
||||
// || cfgfile_yesno (option, value, "sana2", &p->sana2)
|
||||
// || cfgfile_yesno (option, value, "genlock", &p->genlock)
|
||||
|| cfgfile_yesno (option, value, "cpu_compatible", &p->cpu_compatible)
|
||||
|| cfgfile_yesno (option, value, "cpu_24bit_addressing", &p->address_space_24)
|
||||
// || cfgfile_yesno (option, value, "parallel_on_demand", &p->parallel_demand)
|
||||
// || cfgfile_yesno (option, value, "parallel_postscript_emulation", &p->parallel_postscript_emulation)
|
||||
// || cfgfile_yesno (option, value, "parallel_postscript_detection", &p->parallel_postscript_detection)
|
||||
// || cfgfile_yesno (option, value, "serial_on_demand", &p->serial_demand)
|
||||
// || cfgfile_yesno (option, value, "serial_hardware_ctsrts", &p->serial_hwctsrts)
|
||||
// || cfgfile_yesno (option, value, "serial_direct", &p->serial_direct)
|
||||
// || cfgfile_yesno (option, value, "comp_nf", &p->compnf)
|
||||
// || cfgfile_yesno (option, value, "comp_constjump", &p->comp_constjump)
|
||||
// || cfgfile_yesno (option, value, "comp_oldsegv", &p->comp_oldsegv)
|
||||
// || cfgfile_yesno (option, value, "compforcesettings", &p->compforcesettings)
|
||||
// || cfgfile_yesno (option, value, "compfpu", &p->compfpu)
|
||||
// || cfgfile_yesno (option, value, "fpu_strict", &p->fpu_strict)
|
||||
// || cfgfile_yesno (option, value, "comp_midopt", &p->comp_midopt)
|
||||
// || cfgfile_yesno (option, value, "comp_lowopt", &p->comp_lowopt)
|
||||
|| cfgfile_yesno (option, value, "rtg_nocustom", &p->picasso96_nocustom)
|
||||
/* || cfgfile_yesno (option, value, "uaeserial", &p->uaeserial)*/)
|
||||
|| cfgfile_yesno (option, value, "rtg_nocustom", &p->picasso96_nocustom))
|
||||
return 1;
|
||||
if (cfgfile_intval (option, value, "cachesize", &p->cachesize, 1)
|
||||
|| cfgfile_intval (option, value, "chipset_refreshrate", &p->chipset_refreshrate, 1)
|
||||
|| cfgfile_intval (option, value, "fastmem_size", (int *) &p->fastmem_size, 0x100000)
|
||||
// || cfgfile_intval (option, value, "a3000mem_size", (int *) &p->mbresmem_low_size, 0x100000)
|
||||
// || cfgfile_intval (option, value, "mbresmem_size", (int *) &p->mbresmem_high_size, 0x100000)
|
||||
|| cfgfile_intval (option, value, "z3mem_size", (int *) &p->z3fastmem_size, 0x100000)
|
||||
|| cfgfile_intval (option, value, "z3mem_start", (int *) &p->z3fastmem_start, 1)
|
||||
|| cfgfile_intval (option, value, "bogomem_size", (int *) &p->bogomem_size, 0x40000)
|
||||
|| cfgfile_intval (option, value, "gfxcard_size", (int *) &p->gfxmem_size, 0x100000)
|
||||
// || cfgfile_intval (option, value, "fpu_model", &p->fpu_model, 1)
|
||||
|| cfgfile_intval (option, value, "floppy_speed", &p->floppy_speed, 1)
|
||||
|| cfgfile_intval (option, value, "nr_floppies", &p->nr_floppies, 1)
|
||||
|| cfgfile_intval (option, value, "floppy0type", &p->dfxtype[0], 1)
|
||||
|| cfgfile_intval (option, value, "floppy1type", &p->dfxtype[1], 1)
|
||||
|| cfgfile_intval (option, value, "floppy2type", &p->dfxtype[2], 1)
|
||||
|| cfgfile_intval (option, value, "floppy3type", &p->dfxtype[3], 1)
|
||||
// || cfgfile_intval (option, value, "maprom", &p->maprom, 1)
|
||||
// || cfgfile_intval (option, value, "parallel_autoflush", &p->parallel_autoflush_time, 1)
|
||||
/* || cfgfile_intval (option, value, "catweasel", &p->catweasel, 1)*/)
|
||||
|| cfgfile_intval (option, value, "floppy3type", &p->dfxtype[3], 1))
|
||||
return 1;
|
||||
if (//cfgfile_strval (option, value, "comp_trustbyte", &p->comptrustbyte, compmode, 0)
|
||||
// || cfgfile_strval (option, value, "comp_trustword", &p->comptrustword, compmode, 0)
|
||||
// || cfgfile_strval (option, value, "comp_trustlong", &p->comptrustlong, compmode, 0)
|
||||
// || cfgfile_strval (option, value, "comp_trustnaddr", &p->comptrustnaddr, compmode, 0)
|
||||
/* ||*/ cfgfile_strval (option, value, "collision_level", &p->collision_level, collmode, 0)
|
||||
/* || cfgfile_strval (option, value, "comp_flushmode", &p->comp_hardflush, flushmode, 0)*/)
|
||||
if (cfgfile_strval (option, value, "collision_level", &p->collision_level, collmode, 0))
|
||||
return 1;
|
||||
if (cfgfile_string (option, value, "kickstart_rom_file", p->romfile, sizeof p->romfile)
|
||||
|| cfgfile_string (option, value, "kickstart_ext_rom_file", p->romextfile, sizeof p->romextfile)
|
||||
// || cfgfile_string (option, value, "amax_rom_file", p->amaxromfile, sizeof p->amaxromfile)
|
||||
// || cfgfile_string (option, value, "flash_file", p->flashfile, sizeof p->flashfile)
|
||||
// || cfgfile_string (option, value, "cart_file", p->cartfile, sizeof p->cartfile)
|
||||
// || cfgfile_string (option, value, "pci_devices", p->pci_devices, sizeof p->pci_devices)
|
||||
/* || cfgfile_string (option, value, "ghostscript_parameters", p->ghostscript_parameters, sizeof p->ghostscript_parameters)*/)
|
||||
|| cfgfile_string (option, value, "kickstart_ext_rom_file", p->romextfile, sizeof p->romextfile))
|
||||
return 1;
|
||||
|
||||
// if (cfgfile_strval (option, value, "cart_internal", &p->cart_internal, cartsmode, 0)) {
|
||||
// if (p->cart_internal) {
|
||||
// struct romdata *rd = getromdatabyid(63);
|
||||
// if (rd)
|
||||
// sprintf(p->cartfile, ":%s", rd->configname);
|
||||
// }
|
||||
// return 1;
|
||||
// }
|
||||
for (i = 0; i < 4; i++) {
|
||||
sprintf (tmpbuf, "floppy%d", i);
|
||||
if (cfgfile_string (option, value, tmpbuf, p->df[i], sizeof p->df[i]))
|
||||
|
@ -1484,10 +1037,6 @@ int cfgfile_parse_option (struct uae_prefs *p, char *option, char *value, int ty
|
|||
return 1;
|
||||
if (!strcmp (option, "config_host"))
|
||||
return 1;
|
||||
// if (cfgfile_string (option, value, "config_hardware_path", p->config_hardware_path, sizeof p->config_hardware_path))
|
||||
// return 1;
|
||||
// if (cfgfile_string (option, value, "config_host_path", p->config_host_path, sizeof p->config_host_path))
|
||||
// return 1;
|
||||
if (type == 0 || (type & CONFIG_TYPE_HARDWARE)) {
|
||||
if (cfgfile_parse_hardware (p, option, value))
|
||||
return 1;
|
||||
|
@ -1677,8 +1226,6 @@ static int cfgfile_load_2 (struct uae_prefs *p, const char *filename, int real,
|
|||
cfgfile_parse_separated_line (p, line1b, line2b, askedtype);
|
||||
} else {
|
||||
cfgfile_string (line1b, line2b, "config_description", p->description, 128);
|
||||
// cfgfile_string (line1b, line2b, "config_hardware_path", p->config_hardware_path, 128);
|
||||
// cfgfile_string (line1b, line2b, "config_host_path", p->config_host_path, 128);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1722,20 +1269,6 @@ int cfgfile_load (struct uae_prefs *p, const char *filename, int *type, int igno
|
|||
write_log ("load failed\n");
|
||||
goto end;
|
||||
}
|
||||
if (!ignorelink) {
|
||||
// if (p->config_hardware_path[0]) {
|
||||
// fetch_configurationpath (tmp, sizeof (tmp));
|
||||
// strncat (tmp, p->config_hardware_path, sizeof (tmp));
|
||||
// type2 = CONFIG_TYPE_HARDWARE;
|
||||
// cfgfile_load (p, tmp, &type2, 1);
|
||||
// }
|
||||
// if (p->config_host_path[0]) {
|
||||
// fetch_configurationpath (tmp, sizeof (tmp));
|
||||
// strncat (tmp, p->config_host_path, sizeof (tmp));
|
||||
// type2 = CONFIG_TYPE_HOST;
|
||||
// cfgfile_load (p, tmp, &type2, 1);
|
||||
// }
|
||||
}
|
||||
end:
|
||||
recursive--;
|
||||
fixup_prefs (p);
|
||||
|
@ -1793,38 +1326,6 @@ int cfgfile_configuration_change(int v)
|
|||
return mode;
|
||||
}
|
||||
|
||||
char * make_hard_dir_cfg_line (char *src, char *dst) {
|
||||
char buffer[256];
|
||||
int i;
|
||||
|
||||
if (src[0] != '\0') {
|
||||
for (i = strlen(src); i > 0; i--)
|
||||
if ((src[i] == '/') || (src[i] == '\\'))
|
||||
break;
|
||||
if (i > 0) {
|
||||
strncpy(buffer, &src[i+1], 256);
|
||||
strcat(buffer, ":");
|
||||
strncat(buffer, src, 256 - strlen(buffer));
|
||||
strcpy(dst, buffer);
|
||||
} else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
char * make_hard_file_cfg_line (char *src, char *dst) {
|
||||
char buffer[256];
|
||||
|
||||
if (src[0] != 0) {
|
||||
strcpy(buffer, "32:1:2:512:");
|
||||
strncat(buffer, src, 256 - strlen(buffer));
|
||||
strcpy(dst, buffer);
|
||||
}
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
static void parse_sound_spec (struct uae_prefs *p, char *spec)
|
||||
{
|
||||
char *x0 = my_strdup (spec);
|
||||
|
@ -1858,20 +1359,13 @@ static void parse_sound_spec (struct uae_prefs *p, char *spec)
|
|||
else
|
||||
p->sound_stereo = SND_MONO;
|
||||
}
|
||||
if (x2)
|
||||
p->sound_bits = atoi (x2);
|
||||
if (x3)
|
||||
p->sound_freq = atoi (x3);
|
||||
// if (x4)
|
||||
// p->sound_maxbsiz = atoi (x4);
|
||||
free (x0);
|
||||
}
|
||||
|
||||
void parse_filesys_spec (struct uae_prefs *p, int readonly, char *spec)
|
||||
static void parse_filesys_spec (struct uae_prefs *p, int readonly, char *spec)
|
||||
{
|
||||
/* spec example (<UAE name>:<dir>):
|
||||
* rw,AmigaHD:AmigaHD
|
||||
*/
|
||||
char buf[256];
|
||||
char *s2;
|
||||
|
||||
|
@ -1895,7 +1389,7 @@ void parse_filesys_spec (struct uae_prefs *p, int readonly, char *spec)
|
|||
}
|
||||
}
|
||||
|
||||
void parse_hardfile_spec (struct uae_prefs *p, char *spec)
|
||||
static void parse_hardfile_spec (struct uae_prefs *p, char *spec)
|
||||
{
|
||||
char *x0 = my_strdup (spec);
|
||||
char *x1, *x2, *x3, *x4;
|
||||
|
@ -1983,34 +1477,22 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
|
|||
p->all_lines = u;
|
||||
|
||||
switch (c) {
|
||||
// case 'h': usage (); exit (0);
|
||||
|
||||
case '0': strncpy (p->df[0], arg, 255); p->df[0][255] = 0; break;
|
||||
case '1': strncpy (p->df[1], arg, 255); p->df[1][255] = 0; break;
|
||||
case '2': strncpy (p->df[2], arg, 255); p->df[2][255] = 0; break;
|
||||
case '3': strncpy (p->df[3], arg, 255); p->df[3][255] = 0; break;
|
||||
case 'r': strncpy (p->romfile, arg, 255); p->romfile[255] = 0; break;
|
||||
case 'K': strncpy (p->romextfile, arg, 255); p->romextfile[255] = 0; break;
|
||||
// case 'p': strncpy (p->prtname, arg, 255); p->prtname[255] = 0; break;
|
||||
/* case 'I': strncpy (p->sername, arg, 255); p->sername[255] = 0; currprefs.use_serial = 1; break; */
|
||||
case 'm': case 'M': parse_filesys_spec (p, c == 'M', arg); break;
|
||||
case 'W': parse_hardfile_spec (p, arg); break;
|
||||
case 'S': parse_sound_spec (p, arg); break;
|
||||
case 'R': p->gfx_framerate = atoi (arg); break;
|
||||
// case 'x': p->no_xhair = 1; break;
|
||||
// case 'i': p->illegal_mem = 1; break;
|
||||
// case 'J': parse_joy_spec (p, arg); break;
|
||||
|
||||
// case 't': p->test_drawing_speed = 1; break;
|
||||
#ifdef USE_X11_GFX
|
||||
case 'L': p->x11_use_low_bandwidth = 1; break;
|
||||
case 'T': p->x11_use_mitshm = 1; break;
|
||||
#endif
|
||||
case 'w': p->m68k_speed = atoi (arg); break;
|
||||
|
||||
/* case 'g': p->use_gfxlib = 1; break; */
|
||||
case 'G': p->start_gui = 0; break;
|
||||
// case 'D': p->start_debugger = 1; break;
|
||||
|
||||
case 'n':
|
||||
if (strchr (arg, 'i') != 0)
|
||||
|
@ -2045,43 +1527,6 @@ int parse_cmdline_option (struct uae_prefs *p, char c, char *arg)
|
|||
p->chipmem_size = atoi (arg) * 0x80000;
|
||||
break;
|
||||
|
||||
// case 'l':
|
||||
// if (0 == strcasecmp(arg, "de"))
|
||||
// p->keyboard_lang = KBD_LANG_DE;
|
||||
// else if (0 == strcasecmp(arg, "dk"))
|
||||
// p->keyboard_lang = KBD_LANG_DK;
|
||||
// else if (0 == strcasecmp(arg, "us"))
|
||||
// p->keyboard_lang = KBD_LANG_US;
|
||||
// else if (0 == strcasecmp(arg, "se"))
|
||||
// p->keyboard_lang = KBD_LANG_SE;
|
||||
// else if (0 == strcasecmp(arg, "fr"))
|
||||
// p->keyboard_lang = KBD_LANG_FR;
|
||||
// else if (0 == strcasecmp(arg, "it"))
|
||||
// p->keyboard_lang = KBD_LANG_IT;
|
||||
// else if (0 == strcasecmp(arg, "es"))
|
||||
// p->keyboard_lang = KBD_LANG_ES;
|
||||
// break;
|
||||
|
||||
// case 'O': parse_gfx_specs (p, arg); break;
|
||||
// case 'd':
|
||||
// if (strchr (arg, 'S') != NULL || strchr (arg, 's')) {
|
||||
// write_log (" Serial on demand.\n");
|
||||
// p->serial_demand = 1;
|
||||
// }
|
||||
// if (strchr (arg, 'P') != NULL || strchr (arg, 'p')) {
|
||||
// write_log (" Parallel on demand.\n");
|
||||
// p->parallel_demand = 1;
|
||||
// }
|
||||
|
||||
// break;
|
||||
|
||||
// case 'H':
|
||||
// p->color_mode = atoi (arg);
|
||||
// if (p->color_mode < 0) {
|
||||
// write_log ("Bad color mode selected. Using default.\n");
|
||||
// p->color_mode = 0;
|
||||
// }
|
||||
// break;
|
||||
default:
|
||||
write_log ("Unknown option `-%c'!\n", c);
|
||||
break;
|
||||
|
@ -2125,14 +1570,12 @@ void default_prefs (struct uae_prefs *p, int type)
|
|||
strcpy (p->description, "UAE default configuration");
|
||||
|
||||
p->start_gui = 1;
|
||||
p->start_debugger = 0;
|
||||
|
||||
p->all_lines = 0;
|
||||
p->produce_sound = 3;
|
||||
p->sound_stereo = SND_STEREO;
|
||||
p->sound_stereo_separation = 7;
|
||||
p->sound_mixed_stereo_delay = 0;
|
||||
p->sound_bits = DEFAULT_SOUND_BITS;
|
||||
p->sound_freq = DEFAULT_SOUND_FREQ;
|
||||
p->sound_interpol = 0;
|
||||
p->sound_filter = FILTER_SOUND_OFF;
|
||||
|
@ -2162,31 +1605,26 @@ void default_prefs (struct uae_prefs *p, int type)
|
|||
p->gfx_size_win.height = 240;
|
||||
p->gfx_size_fs.width = 640;
|
||||
p->gfx_size_fs.height = 480;
|
||||
p->gfx_avsync = 1;
|
||||
p->gfx_resolution = 0;
|
||||
#ifdef RASPBERRY
|
||||
p->gfx_correct_aspect = 1;
|
||||
#else
|
||||
p->gfx_correct_aspect = 0;
|
||||
#endif
|
||||
p->gfx_xcenter = 0;
|
||||
p->gfx_ycenter = 0;
|
||||
|
||||
p->immediate_blits = 0;
|
||||
p->chipset_refreshrate = 50;
|
||||
p->collision_level = 2;
|
||||
p->leds_on_screen = 0;
|
||||
p->fast_copper = 1;
|
||||
p->scsi = 0;
|
||||
p->cpu_idle = 0;
|
||||
p->floppy_speed = 100;
|
||||
p->tod_hack = 1;
|
||||
p->picasso96_nocustom = 1;
|
||||
|
||||
strcpy (p->df[0], "df0.adf");
|
||||
strcpy (p->df[1], "df1.adf");
|
||||
strcpy (p->df[2], "df2.adf");
|
||||
strcpy (p->df[3], "df3.adf");
|
||||
p->cs_df0idhw = 0;
|
||||
|
||||
strcpy (p->df[0], "");
|
||||
strcpy (p->df[1], "");
|
||||
strcpy (p->df[2], "");
|
||||
strcpy (p->df[3], "");
|
||||
|
||||
#ifdef RASPBERRY
|
||||
// Choose automatically first rom.
|
||||
|
@ -2230,15 +1668,4 @@ void default_prefs (struct uae_prefs *p, int type)
|
|||
target_default_options (p, type);
|
||||
|
||||
inputdevice_default_prefs (p);
|
||||
|
||||
/*
|
||||
zfile_fclose (default_file);
|
||||
default_file = NULL;
|
||||
f = zfile_fopen_empty ("configstore", 50000);
|
||||
if (f) {
|
||||
cfgfile_save_options (f, p, 0);
|
||||
zfile_fwrite (&zero, 1, 1, f);
|
||||
default_file = f;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "memory.h"
|
||||
#include "custom.h"
|
||||
#include "cia.h"
|
||||
#include "serial.h"
|
||||
#include "disk.h"
|
||||
#include "xwin.h"
|
||||
#include "keybuf.h"
|
||||
|
@ -374,7 +373,7 @@ void CIA_hsync_handler (void)
|
|||
static void tod_hack_reset (void)
|
||||
{
|
||||
struct timeval tv;
|
||||
uae_u32 rate = currprefs.chipset_refreshrate;
|
||||
uae_u32 rate = currprefs.ntscmode ? 60 : 50;
|
||||
gettimeofday (&tv, NULL);
|
||||
tod_hack = (uae_u32)(((uae_u64)tv.tv_sec) * rate + tv.tv_usec / (1000000 / rate));
|
||||
tod_hack -= ciaatod;
|
||||
|
@ -387,7 +386,7 @@ void CIA_vsync_handler ()
|
|||
#ifdef TOD_HACK
|
||||
if (currprefs.tod_hack && ciaatodon) {
|
||||
struct timeval tv;
|
||||
uae_u32 t, nt, rate = currprefs.chipset_refreshrate;
|
||||
uae_u32 t, nt, rate = currprefs.ntscmode ? 60 : 50;
|
||||
if (tod_hack_delay > 0) {
|
||||
tod_hack_delay--;
|
||||
if (tod_hack_delay == 0) {
|
||||
|
@ -835,6 +834,7 @@ void CIA_reset (void)
|
|||
ciaasdr_cnt = 0; ciaasdr = 0;
|
||||
ciabsdr_cnt = 0; ciabsdr = 0;
|
||||
ciaata_passed = ciaatb_passed = ciabta_passed = ciabtb_passed = 0;
|
||||
ciaatol = ciabtol = ciaaprb = ciaadrb = ciabprb = ciabdrb = sleepyhead = 0;
|
||||
}
|
||||
|
||||
CIA_calctimers ();
|
||||
|
@ -874,6 +874,7 @@ addrbank cia_bank = {
|
|||
|
||||
static void cia_wait_pre (void)
|
||||
{
|
||||
#ifndef CUSTOM_SIMPLE
|
||||
int div10 = (get_cycles () - eventtab[ev_cia].oldcycles) % DIV10;
|
||||
int cycles;
|
||||
|
||||
|
@ -885,6 +886,7 @@ static void cia_wait_pre (void)
|
|||
cycles += DIV10 * ECLOCK_DATA_CYCLE / 10 - div10;
|
||||
}
|
||||
do_cycles (cycles);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void cia_wait_post (void)
|
||||
|
|
|
@ -19913,7 +19913,7 @@ unsigned long REGPARAM2 op_4c90_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=dodgy?scratchie++:dstreg+8;
|
||||
if (dodgy)
|
||||
mov_l_rr(srca,dstreg+8);
|
||||
|
@ -19952,7 +19952,7 @@ unsigned long REGPARAM2 op_4c98_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
mov_l_rr(srca,dstreg+8);
|
||||
if (1 && !special_mem) {
|
||||
|
@ -19992,7 +19992,7 @@ unsigned long REGPARAM2 op_4ca8_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
mov_l_rr(srca,8+dstreg);
|
||||
lea_l_brr(srca,srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2));
|
||||
|
@ -20031,7 +20031,7 @@ unsigned long REGPARAM2 op_4cb0_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca,scratchie);
|
||||
if (1 && !special_mem) {
|
||||
|
@ -20064,7 +20064,7 @@ unsigned long REGPARAM2 op_4cb8_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca = scratchie++;
|
||||
mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2));
|
||||
if (1 && !special_mem) {
|
||||
|
@ -20097,7 +20097,7 @@ unsigned long REGPARAM2 op_4cb9_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca = scratchie++;
|
||||
mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */
|
||||
if (1 && !special_mem) {
|
||||
|
@ -20131,7 +20131,7 @@ unsigned long REGPARAM2 op_4cba_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset;
|
||||
uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
|
@ -20167,7 +20167,7 @@ unsigned long REGPARAM2 op_4cbb_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int pctmp=scratchie++;
|
||||
int srca=scratchie++;
|
||||
uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset;
|
||||
|
@ -20208,7 +20208,7 @@ unsigned long REGPARAM2 op_4cd0_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=dodgy?scratchie++:dstreg+8;
|
||||
if (dodgy)
|
||||
mov_l_rr(srca,dstreg+8);
|
||||
|
@ -20246,7 +20246,7 @@ unsigned long REGPARAM2 op_4cd8_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
mov_l_rr(srca,dstreg+8);
|
||||
if (1 && !special_mem) {
|
||||
|
@ -20285,7 +20285,7 @@ unsigned long REGPARAM2 op_4ce8_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
mov_l_rr(srca,8+dstreg);
|
||||
lea_l_brr(srca,srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2));
|
||||
|
@ -20323,7 +20323,7 @@ unsigned long REGPARAM2 op_4cf0_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca,scratchie);
|
||||
if (1 && !special_mem) {
|
||||
|
@ -20355,7 +20355,7 @@ unsigned long REGPARAM2 op_4cf8_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca = scratchie++;
|
||||
mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2));
|
||||
if (1 && !special_mem) {
|
||||
|
@ -20387,7 +20387,7 @@ unsigned long REGPARAM2 op_4cf9_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca = scratchie++;
|
||||
mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */
|
||||
if (1 && !special_mem) {
|
||||
|
@ -20420,7 +20420,7 @@ unsigned long REGPARAM2 op_4cfa_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset;
|
||||
uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
|
@ -20455,7 +20455,7 @@ unsigned long REGPARAM2 op_4cfb_0_comp_ff(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int pctmp=scratchie++;
|
||||
int srca=scratchie++;
|
||||
uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset;
|
||||
|
@ -57536,7 +57536,7 @@ unsigned long REGPARAM2 op_4c90_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=dodgy?scratchie++:dstreg+8;
|
||||
if (dodgy)
|
||||
mov_l_rr(srca,dstreg+8);
|
||||
|
@ -57575,7 +57575,7 @@ unsigned long REGPARAM2 op_4c98_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
mov_l_rr(srca,dstreg+8);
|
||||
if (1 && !special_mem) {
|
||||
|
@ -57615,7 +57615,7 @@ unsigned long REGPARAM2 op_4ca8_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
mov_l_rr(srca,8+dstreg);
|
||||
lea_l_brr(srca,srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2));
|
||||
|
@ -57654,7 +57654,7 @@ unsigned long REGPARAM2 op_4cb0_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca,scratchie);
|
||||
if (1 && !special_mem) {
|
||||
|
@ -57687,7 +57687,7 @@ unsigned long REGPARAM2 op_4cb8_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca = scratchie++;
|
||||
mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2));
|
||||
if (1 && !special_mem) {
|
||||
|
@ -57720,7 +57720,7 @@ unsigned long REGPARAM2 op_4cb9_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca = scratchie++;
|
||||
mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */
|
||||
if (1 && !special_mem) {
|
||||
|
@ -57754,7 +57754,7 @@ unsigned long REGPARAM2 op_4cba_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset;
|
||||
uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
|
@ -57790,7 +57790,7 @@ unsigned long REGPARAM2 op_4cbb_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int pctmp=scratchie++;
|
||||
int srca=scratchie++;
|
||||
uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset;
|
||||
|
@ -57831,7 +57831,7 @@ unsigned long REGPARAM2 op_4cd0_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=dodgy?scratchie++:dstreg+8;
|
||||
if (dodgy)
|
||||
mov_l_rr(srca,dstreg+8);
|
||||
|
@ -57869,7 +57869,7 @@ unsigned long REGPARAM2 op_4cd8_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
mov_l_rr(srca,dstreg+8);
|
||||
if (1 && !special_mem) {
|
||||
|
@ -57908,7 +57908,7 @@ unsigned long REGPARAM2 op_4ce8_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
mov_l_rr(srca,8+dstreg);
|
||||
lea_l_brr(srca,srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2));
|
||||
|
@ -57946,7 +57946,7 @@ unsigned long REGPARAM2 op_4cf0_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
calc_disp_ea_020(dstreg+8,comp_get_iword((m68k_pc_offset+=2)-2),srca,scratchie);
|
||||
if (1 && !special_mem) {
|
||||
|
@ -57978,7 +57978,7 @@ unsigned long REGPARAM2 op_4cf8_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca = scratchie++;
|
||||
mov_l_ri(srca,(uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2));
|
||||
if (1 && !special_mem) {
|
||||
|
@ -58010,7 +58010,7 @@ unsigned long REGPARAM2 op_4cf9_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca = scratchie++;
|
||||
mov_l_ri(srca,comp_get_ilong((m68k_pc_offset+=4)-4)); /* absl */
|
||||
if (1 && !special_mem) {
|
||||
|
@ -58043,7 +58043,7 @@ unsigned long REGPARAM2 op_4cfa_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int srca=scratchie++;
|
||||
uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset;
|
||||
uae_s32 PC16off = (uae_s32)(uae_s16)comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
|
@ -58078,7 +58078,7 @@ unsigned long REGPARAM2 op_4cfb_0_comp_nf(uae_u32 opcode) /* MVMEL */
|
|||
uae_u16 mask = comp_get_iword((m68k_pc_offset+=2)-2);
|
||||
int native=scratchie++;
|
||||
int i;
|
||||
signed char offset=0;
|
||||
int offset=0;
|
||||
{ int pctmp=scratchie++;
|
||||
int srca=scratchie++;
|
||||
uae_u32 address=start_pc+((char *)comp_pc_p-(char *)start_pc_p)+m68k_pc_offset;
|
||||
|
|
|
@ -55,8 +55,6 @@
|
|||
* - 8th unlock2 all registers that were locked
|
||||
*/
|
||||
|
||||
static bool inverted_carry = false;
|
||||
|
||||
MIDFUNC(0,live_flags,(void))
|
||||
{
|
||||
live.flags_on_stack=TRASH;
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define USE_MATCH 0
|
||||
|
||||
#define writemem_special writemem
|
||||
#define readmem_special readmem
|
||||
|
@ -988,39 +987,6 @@ static uae_s8 nstate[N_REGS];
|
|||
#define L_NEEDED -2
|
||||
#define L_UNNEEDED -3
|
||||
|
||||
STATIC_INLINE void big_to_small_state(bigstate* b, smallstate* s)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < VREGS; i++)
|
||||
s->virt[i] = vstate[i];
|
||||
for (i = 0; i < N_REGS; i++)
|
||||
s->nat[i] = nstate[i];
|
||||
}
|
||||
|
||||
STATIC_INLINE int callers_need_recompile(bigstate * b, smallstate * s)
|
||||
{
|
||||
int i;
|
||||
int reverse = 0;
|
||||
|
||||
for (i = 0; i < VREGS; i++) {
|
||||
if (vstate[i] != L_UNNEEDED && s->virt[i] == L_UNNEEDED)
|
||||
return 1;
|
||||
if (vstate[i] == L_UNNEEDED && s->virt[i] != L_UNNEEDED)
|
||||
reverse++;
|
||||
}
|
||||
for (i = 0; i < N_REGS; i++) {
|
||||
if (nstate[i] >= 0 && nstate[i] != s->nat[i])
|
||||
return 1;
|
||||
if (nstate[i] < 0 && s->nat[i] >= 0)
|
||||
reverse++;
|
||||
}
|
||||
if (reverse >= 2 && USE_MATCH)
|
||||
return 1; /* In this case, it might be worth recompiling the
|
||||
* callers */
|
||||
return 0;
|
||||
}
|
||||
|
||||
STATIC_INLINE void log_startblock(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -1069,13 +1035,10 @@ STATIC_INLINE void log_vwrite(int r)
|
|||
/* Using an n-reg to hold a v-reg */
|
||||
STATIC_INLINE void log_isreg(int n, int r)
|
||||
{
|
||||
if (nstate[n] == L_UNKNOWN && r < 16 && !vwritten[r] && USE_MATCH)
|
||||
nstate[n] = r;
|
||||
else {
|
||||
do_load_reg(n, r);
|
||||
if (nstate[n]==L_UNKNOWN)
|
||||
nstate[n] = L_UNAVAIL;
|
||||
}
|
||||
|
||||
if (vstate[r]==L_UNKNOWN)
|
||||
vstate[r]=L_NEEDED;
|
||||
}
|
||||
|
@ -1100,11 +1063,6 @@ STATIC_INLINE void log_flush(void)
|
|||
nstate[i]=L_UNAVAIL;
|
||||
}
|
||||
|
||||
STATIC_INLINE void log_dump(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* register status handling. EMIT TIME! *
|
||||
********************************************************************/
|
||||
|
@ -2895,8 +2853,6 @@ void alloc_cache(void)
|
|||
}
|
||||
}
|
||||
|
||||
extern void op_illg_1 (uae_u32 opcode) REGPARAM;
|
||||
|
||||
static void calc_checksum(blockinfo* bi, uae_u32* c1, uae_u32* c2)
|
||||
{
|
||||
uae_u32 k1=0;
|
||||
|
@ -2936,33 +2892,6 @@ static void calc_checksum(blockinfo* bi, uae_u32* c1, uae_u32* c2)
|
|||
*c2=k2;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void show_checksum(CSI_TYPE* csi)
|
||||
{
|
||||
uae_u32 k1=0;
|
||||
uae_u32 k2=0;
|
||||
uae_s32 len=CSI_LENGTH(csi);
|
||||
uae_u32 tmp=(uintptr)CSI_START_P(csi);
|
||||
uae_u32* pos;
|
||||
|
||||
len+=(tmp&3);
|
||||
tmp&=(~3);
|
||||
pos=(uae_u32*)tmp;
|
||||
|
||||
if (len<0 || len>MAX_CHECKSUM_LEN) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
while (len>0) {
|
||||
D(panicbug("%08x ",*pos));
|
||||
pos++;
|
||||
len-=4;
|
||||
}
|
||||
D(panicbug(" bla"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int check_for_cache_miss(void)
|
||||
{
|
||||
|
@ -3313,9 +3242,6 @@ void build_comp(void)
|
|||
|
||||
for (opcode = 0; opcode < 65536; opcode++) {
|
||||
reset_compop(opcode);
|
||||
#ifdef NOFLAGS_SUPPORT
|
||||
nfcpufunctbl[opcode] = op_illg_1;
|
||||
#endif
|
||||
prop[opcode].use_flags = 0x1f;
|
||||
prop[opcode].set_flags = 0x1f;
|
||||
prop[opcode].cflow = fl_trap; // ILLEGAL instructions do trap
|
||||
|
@ -3523,13 +3449,6 @@ STATIC_INLINE void flush_icache_lazy(int n)
|
|||
active=NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
static void catastrophe(void)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
*/
|
||||
|
||||
int failure;
|
||||
|
||||
#ifdef JIT_DEBUG
|
||||
|
@ -3937,14 +3856,6 @@ void compile_block(cpu_history* pc_hist, int blocklen, int totcycles)
|
|||
}
|
||||
}
|
||||
|
||||
#if USE_MATCH
|
||||
if (callers_need_recompile(&live,&(bi->env))) {
|
||||
mark_callers_recompile(bi);
|
||||
}
|
||||
|
||||
big_to_small_state(&live,&(bi->env));
|
||||
#endif
|
||||
|
||||
#if USE_CHECKSUM_INFO
|
||||
remove_from_list(bi);
|
||||
if (trace_in_rom) {
|
||||
|
@ -3986,7 +3897,6 @@ void compile_block(cpu_history* pc_hist, int blocklen, int totcycles)
|
|||
bi->direct_handler_size = get_target() - (uae_u8 *)current_block_start_target;
|
||||
#endif
|
||||
|
||||
log_dump();
|
||||
#ifndef ALIGN_NOT_NEEDED
|
||||
align_target(align_jumps);
|
||||
#endif
|
||||
|
|
151
src/cpu_small.cpp
Normal file
151
src/cpu_small.cpp
Normal file
|
@ -0,0 +1,151 @@
|
|||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
|
||||
#include "cpu_small.h"
|
||||
|
||||
#include "readcpu.h"
|
||||
|
||||
int xmovem_index1[256];
|
||||
int xmovem_index2[256];
|
||||
int xmovem_next[256];
|
||||
|
||||
struct xcpu xregs;
|
||||
|
||||
const int xareg_byteinc[] = { 1,1,1,1,1,1,1,2 };
|
||||
const int ximm8_table[] = { 8,1,2,3,4,5,6,7 };
|
||||
|
||||
uae_u32 xnext_iword (void)
|
||||
{
|
||||
uae_u32 r = xget_iword (0);
|
||||
xm68k_incpc (2);
|
||||
return r;
|
||||
}
|
||||
uae_u32 xnext_ilong (void)
|
||||
{
|
||||
uae_u32 r = xget_ilong (0);
|
||||
xm68k_incpc (4);
|
||||
return r;
|
||||
}
|
||||
|
||||
uae_u32 xget_ibyte (int offset)
|
||||
{
|
||||
return xget_byte (xm68k_getpc() + offset);
|
||||
}
|
||||
uae_u32 xget_iword (int offset)
|
||||
{
|
||||
return xget_word (xm68k_getpc() + offset);
|
||||
}
|
||||
uae_u32 xget_ilong (int offset)
|
||||
{
|
||||
return xget_long (xm68k_getpc() + offset);
|
||||
}
|
||||
|
||||
void xm68k_incpc (int offset)
|
||||
{
|
||||
xregs.pc += offset;
|
||||
}
|
||||
uaecptr xm68k_getpc(void)
|
||||
{
|
||||
return xregs.pc;
|
||||
}
|
||||
void xm68k_setpc (uaecptr pc)
|
||||
{
|
||||
xregs.pc = pc;
|
||||
}
|
||||
|
||||
uae_u32 xget_disp_ea_020 (uae_u32 base, uae_u32 dp)
|
||||
{
|
||||
int reg = (dp >> 12) & 15;
|
||||
uae_s32 regd = xregs.regs[reg];
|
||||
if ((dp & 0x800) == 0)
|
||||
regd = (uae_s32)(uae_s16)regd;
|
||||
regd <<= (dp >> 9) & 3;
|
||||
if (dp & 0x100) {
|
||||
uae_s32 outer = 0;
|
||||
if (dp & 0x80) base = 0;
|
||||
if (dp & 0x40) regd = 0;
|
||||
|
||||
if ((dp & 0x30) == 0x20) base += (uae_s32)(uae_s16)xnext_iword();
|
||||
if ((dp & 0x30) == 0x30) base += xnext_ilong();
|
||||
|
||||
if ((dp & 0x3) == 0x2) outer = (uae_s32)(uae_s16)xnext_iword();
|
||||
if ((dp & 0x3) == 0x3) outer = xnext_ilong();
|
||||
|
||||
if ((dp & 0x4) == 0) base += regd;
|
||||
if (dp & 0x3) base = xget_long (base);
|
||||
if (dp & 0x4) base += regd;
|
||||
|
||||
return base + outer;
|
||||
} else {
|
||||
return base + (uae_s32)((uae_s8)dp) + regd;
|
||||
}
|
||||
}
|
||||
|
||||
uae_u32 xget_disp_ea_000 (uae_u32 base, uae_u32 dp)
|
||||
{
|
||||
int reg = (dp >> 12) & 15;
|
||||
uae_s32 regd = xregs.regs[reg];
|
||||
if ((dp & 0x800) == 0)
|
||||
regd = (uae_s32)(uae_s16)regd;
|
||||
return base + (uae_s8)dp + regd;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Test CCR condition
|
||||
*/
|
||||
int xcctrue (int cc)
|
||||
{
|
||||
uae_u32 cznv = xregs.cznv;
|
||||
|
||||
switch (cc) {
|
||||
case 0: return 1; /* T */
|
||||
case 1: return 0; /* F */
|
||||
case 2: return (cznv & (XFLAGVAL_C | XFLAGVAL_Z)) == 0; /* !CFLG && !ZFLG HI */
|
||||
case 3: return (cznv & (XFLAGVAL_C | XFLAGVAL_Z)) != 0; /* CFLG || ZFLG LS */
|
||||
case 4: return (cznv & XFLAGVAL_C) == 0; /* !CFLG CC */
|
||||
case 5: return (cznv & XFLAGVAL_C) != 0; /* CFLG CS */
|
||||
case 6: return (cznv & XFLAGVAL_Z) == 0; /* !ZFLG NE */
|
||||
case 7: return (cznv & XFLAGVAL_Z) != 0; /* ZFLG EQ */
|
||||
case 8: return (cznv & XFLAGVAL_V) == 0; /* !VFLG VC */
|
||||
case 9: return (cznv & XFLAGVAL_V) != 0; /* VFLG VS */
|
||||
case 10: return (cznv & XFLAGVAL_N) == 0; /* !NFLG PL */
|
||||
case 11: return (cznv & XFLAGVAL_N) != 0; /* NFLG MI */
|
||||
case 12: return (((cznv << (XFLAGBIT_N - XFLAGBIT_V)) ^ cznv) & XFLAGVAL_N) == 0; /* NFLG == VFLG GE */
|
||||
case 13: return (((cznv << (XFLAGBIT_N - XFLAGBIT_V)) ^ cznv) & XFLAGVAL_N) != 0; /* NFLG != VFLG LT */
|
||||
case 14: cznv &= (XFLAGVAL_N | XFLAGVAL_Z | XFLAGVAL_V); /* ZFLG && (NFLG == VFLG) GT */
|
||||
return (((cznv << (XFLAGBIT_N - XFLAGBIT_V)) ^ cznv) & (XFLAGVAL_N | XFLAGVAL_Z)) == 0;
|
||||
case 15: cznv &= (XFLAGVAL_N | XFLAGVAL_Z | XFLAGVAL_V); /* ZFLG && (NFLG != VFLG) LE */
|
||||
return (((cznv << (XFLAGBIT_N - XFLAGBIT_V)) ^ cznv) & (XFLAGVAL_N | XFLAGVAL_Z)) != 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
xcpuop_func *xcpufunctbl[65536];
|
||||
|
||||
void init_cpu_small(void)
|
||||
{
|
||||
struct xcputbl *tbl = xop_smalltbl_0;
|
||||
int opcode, i;
|
||||
int lvl = 5, opcnt;
|
||||
|
||||
for (opcode = 0; opcode < 65536; opcode++)
|
||||
xcpufunctbl[opcode] = xop_illg;
|
||||
for (i = 0; tbl[i].handler != NULL; i++)
|
||||
xcpufunctbl[tbl[i].opcode] = tbl[i].handler;
|
||||
|
||||
opcnt = 0;
|
||||
for (opcode = 0; opcode < 65536; opcode++) {
|
||||
xcpuop_func *f;
|
||||
|
||||
if (table68k[opcode].mnemo == i_ILLG || table68k[opcode].clev > lvl)
|
||||
continue;
|
||||
|
||||
if (table68k[opcode].handler != -1) {
|
||||
f = xcpufunctbl[table68k[opcode].handler];
|
||||
xcpufunctbl[opcode] = f;
|
||||
opcnt++;
|
||||
}
|
||||
}
|
||||
write_log ("MiniCPU initialized, %d opcodes\n", opcnt);
|
||||
}
|
9259
src/cpuemu_0.cpp
9259
src/cpuemu_0.cpp
File diff suppressed because it is too large
Load diff
2287
src/cpuemu_11.cpp
2287
src/cpuemu_11.cpp
File diff suppressed because it is too large
Load diff
26002
src/cpuemu_4.cpp
Normal file
26002
src/cpuemu_4.cpp
Normal file
File diff suppressed because it is too large
Load diff
22303
src/cpuemu_small.cpp
Normal file
22303
src/cpuemu_small.cpp
Normal file
File diff suppressed because it is too large
Load diff
5256
src/cpustbl.cpp
5256
src/cpustbl.cpp
File diff suppressed because it is too large
Load diff
1892
src/cpustbl_small.cpp
Normal file
1892
src/cpustbl_small.cpp
Normal file
File diff suppressed because it is too large
Load diff
1888
src/cputbl_small.h
Normal file
1888
src/cputbl_small.h
Normal file
File diff suppressed because it is too large
Load diff
405
src/custom.cpp
405
src/custom.cpp
File diff suppressed because it is too large
Load diff
272
src/disk.cpp
272
src/disk.cpp
|
@ -11,8 +11,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
|
||||
|
@ -30,13 +28,9 @@
|
|||
#include "execlib.h"
|
||||
#include "savestate.h"
|
||||
#include "cia.h"
|
||||
#ifdef FDI2RAW
|
||||
#include "fdi2raw.h"
|
||||
#endif
|
||||
#ifdef CAPS
|
||||
#include "caps/caps_win32.h"
|
||||
#endif
|
||||
#include "debug.h"
|
||||
#include "crc32.h"
|
||||
#include "inputdevice.h"
|
||||
|
||||
static int longwritemode = 0;
|
||||
|
||||
|
@ -83,14 +77,10 @@ static uae_u8 writebuffer[544 * 11 * DDHDMULT];
|
|||
static int diskevent_flag;
|
||||
static int disk_sync_cycle;
|
||||
|
||||
#if 0
|
||||
#define MAX_DISK_WORDS_PER_LINE 50 /* depends on floppy_speed */
|
||||
static uae_u32 dma_tab[MAX_DISK_WORDS_PER_LINE + 1];
|
||||
#endif
|
||||
static int dskdmaen, dsklength, dsklength2, dsklen;
|
||||
static uae_u16 dskbytr_val;
|
||||
static uae_u32 dskpt;
|
||||
static int dma_enable, bitoffset, syncoffset;
|
||||
static int dma_enable, bitoffset;
|
||||
static uae_u16 word, dsksync;
|
||||
/* Always carried through to the next line. */
|
||||
static int disk_hpos;
|
||||
|
@ -161,9 +151,6 @@ typedef struct {
|
|||
unsigned long drive_id; /* drive id to be reported */
|
||||
char newname[256]; /* storage space for new filename during eject delay */
|
||||
uae_u32 crc32;
|
||||
#ifdef FDI2RAW
|
||||
FDI *fdi;
|
||||
#endif
|
||||
int useturbo;
|
||||
int floppybitcounter; /* number of bits left */
|
||||
} drive;
|
||||
|
@ -516,27 +503,10 @@ static void drive_settype_id (drive *drv)
|
|||
drv->drive_id = DRIVE_ID_NONE;
|
||||
break;
|
||||
}
|
||||
#ifdef DEBUG_DRIVE_ID
|
||||
write_log ("drive_settype_id: DF%d: set to %s\n", drv-floppy, drive_id_name (drv));
|
||||
#endif
|
||||
}
|
||||
|
||||
static void drive_image_free (drive *drv)
|
||||
{
|
||||
switch (drv->filetype)
|
||||
{
|
||||
case ADF_IPF:
|
||||
#ifdef CAPS
|
||||
caps_unloadimage (drv - floppy);
|
||||
#endif
|
||||
break;
|
||||
case ADF_FDI:
|
||||
#ifdef FDI2RAW
|
||||
fdi2raw_header_free (drv->fdi);
|
||||
drv->fdi = 0;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
drv->filetype = (drive_filetype)-1;
|
||||
zfile_fclose (drv->diskfile);
|
||||
drv->diskfile = 0;
|
||||
|
@ -558,7 +528,23 @@ static void reset_drive_gui(int i)
|
|||
static void reset_drive(int i)
|
||||
{
|
||||
drive *drv = &floppy[i];
|
||||
|
||||
drive_image_free (drv);
|
||||
|
||||
drv->motordelay = 0;
|
||||
drv->state = 0;
|
||||
drv->wrprot = 0;
|
||||
drv->mfmpos = 0;
|
||||
drv->tracklen = drv->prevtracklen = 0;
|
||||
drv->trackspeed = 0;
|
||||
drv->num_tracks = drv->write_num_tracks = drv->write_num_tracks = 0;
|
||||
drv->dskchange = drv->dskready = drv->dskready_time = drv->dskready_down_time = 0;
|
||||
drv->steplimit = drv->steplimitcycle = 0;
|
||||
drv->indexhack = 0;
|
||||
drv->drive_id_scnt = 0;
|
||||
drv->idbit = 0;
|
||||
drv->floppybitcounter = 0;
|
||||
|
||||
drv->motoroff = 1;
|
||||
disabled &= ~(1 << i);
|
||||
if (currprefs.dfxtype[i] < 0)
|
||||
|
@ -692,10 +678,6 @@ static int read_header_ext2 (struct zfile *diskfile, trackid *trackdata, int *nu
|
|||
return 1;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
extern char *start_path_data;
|
||||
#endif
|
||||
|
||||
char *DISK_get_saveimagepath (const char *name)
|
||||
{
|
||||
static char name1[MAX_DPATH];
|
||||
|
@ -719,7 +701,8 @@ char *DISK_get_saveimagepath (const char *name)
|
|||
}
|
||||
i--;
|
||||
}
|
||||
sprintf (name1, "%sSaveImages%c%s_save.adf", start_path_data, FSDB_DIR_SEPARATOR, name2 + i);
|
||||
fetch_saveimagepath (path, sizeof (path), 1);
|
||||
sprintf (name1, "%s%s_save.adf", path, name2 + i);
|
||||
return name1;
|
||||
}
|
||||
|
||||
|
@ -791,10 +774,6 @@ static int diskfile_iswriteprotect (const char *fname, int *needwritefile, drive
|
|||
zfile_fclose (zf2);
|
||||
zfile_fread (buffer, sizeof (char), 25, zf1);
|
||||
zfile_fclose (zf1);
|
||||
if (strncmp ((char *) buffer, "CAPS", 4) == 0) {
|
||||
*needwritefile = 1;
|
||||
return wrprot2;
|
||||
}
|
||||
if (strncmp ((char *) buffer, "Formatted Disk Image file", 25) == 0) {
|
||||
*needwritefile = 1;
|
||||
return wrprot2;
|
||||
|
@ -839,6 +818,7 @@ static int drive_insert (drive *drv, struct uae_prefs *p, int dnum, const char *
|
|||
track_reset (drv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
strncpy (currprefs.df[dnum], fname, 255);
|
||||
currprefs.df[dnum][255] = 0;
|
||||
strncpy (changed_prefs.df[dnum], fname, 255);
|
||||
|
@ -855,34 +835,7 @@ static int drive_insert (drive *drv, struct uae_prefs *p, int dnum, const char *
|
|||
zfile_fseek (drv->diskfile, 0, SEEK_SET);
|
||||
}
|
||||
|
||||
/* if (drv->catweasel) {
|
||||
|
||||
drv->wrprot = 1;
|
||||
drv->filetype = ADF_CATWEASEL;
|
||||
drv->num_tracks = 80;
|
||||
drv->ddhd = 1;
|
||||
|
||||
#ifdef CAPS
|
||||
} else if (strncmp ((char *) buffer, "CAPS", 4) == 0) {
|
||||
|
||||
drv->wrprot = 1;
|
||||
if (!caps_loadimage (drv->diskfile, drv - floppy, &num_tracks)) {
|
||||
zfile_fclose (drv->diskfile);
|
||||
drv->diskfile = 0;
|
||||
return 0;
|
||||
}
|
||||
drv->num_tracks = num_tracks;
|
||||
drv->filetype = ADF_IPF;
|
||||
#endif
|
||||
#ifdef FDI2RAW
|
||||
} else if (drv->fdi = fdi2raw_header (drv->diskfile)) {
|
||||
|
||||
drv->wrprot = 1;
|
||||
drv->num_tracks = fdi2raw_get_last_track (drv->fdi);
|
||||
drv->num_secs = fdi2raw_get_num_sector (drv->fdi);
|
||||
drv->filetype = ADF_FDI;
|
||||
#endif
|
||||
} else */ if (strncmp ((char *) buffer, "UAE-1ADF", 8) == 0) {
|
||||
if (strncmp ((char *) buffer, "UAE-1ADF", 8) == 0) {
|
||||
|
||||
read_header_ext2 (drv->diskfile, drv->trackdata, &drv->num_tracks, &drv->ddhd);
|
||||
drv->filetype = ADF_EXT2;
|
||||
|
@ -915,8 +868,8 @@ static int drive_insert (drive *drv, struct uae_prefs *p, int dnum, const char *
|
|||
}
|
||||
offs += tid->len;
|
||||
}
|
||||
} else if (memcmp (exeheader, buffer, sizeof(exeheader)) == 0) {
|
||||
|
||||
} else if (memcmp (exeheader, buffer, sizeof(exeheader)) == 0) {
|
||||
int i;
|
||||
struct zfile *z = zfile_fopen_empty ("", 512 * 1760);
|
||||
createimagefromexe (drv->diskfile, z);
|
||||
|
@ -1013,10 +966,6 @@ static void drive_step (drive * drv)
|
|||
if (drv->cyl) {
|
||||
drv->cyl--;
|
||||
}
|
||||
/* else
|
||||
write_log ("program tried to step beyond track zero\n");
|
||||
"no-click" programs does that
|
||||
*/
|
||||
} else {
|
||||
int maxtrack = drv->hard_num_cyls;
|
||||
if (drv->cyl < maxtrack + 3) {
|
||||
|
@ -1282,6 +1231,7 @@ static void drive_fill_bigbuf (drive * drv, int force)
|
|||
track_reset (drv);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!force && drv->buffered_cyl == drv->cyl && drv->buffered_side == side)
|
||||
return;
|
||||
drv->indexoffset = 0;
|
||||
|
@ -1299,31 +1249,7 @@ static void drive_fill_bigbuf (drive * drv, int force)
|
|||
uae_u8 *data = (uae_u8 *) mfm;
|
||||
*mfm = 256 * *data + *(data + 1);
|
||||
}
|
||||
} /* else if (drv->filetype == ADF_CATWEASEL) {
|
||||
#ifdef CATWEASEL
|
||||
drv->tracklen = 0;
|
||||
if (!catweasel_disk_changed (drv->catweasel)) {
|
||||
drv->tracklen = catweasel_fillmfm (drv->catweasel, drv->bigmfmbuf, side, drv->ddhd, 0);
|
||||
}
|
||||
drv->buffered_cyl = -1;
|
||||
if (!drv->tracklen) {
|
||||
track_reset (drv);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
} else if (drv->filetype == ADF_IPF) {
|
||||
|
||||
#ifdef CAPS
|
||||
caps_loadtrack (drv->bigmfmbuf, drv->tracktiming, drv - floppy, tr, &drv->tracklen, &drv->multi_revolution, &drv->skipoffset);
|
||||
#endif
|
||||
|
||||
} else if (drv->filetype == ADF_FDI) {
|
||||
|
||||
#ifdef FDI2RAW
|
||||
fdi2raw_loadtrack (drv->fdi, drv->bigmfmbuf, drv->tracktiming, tr, &drv->tracklen, &drv->indexoffset, &drv->multi_revolution, 1);
|
||||
#endif
|
||||
|
||||
} else */ if (ti->type == TRACK_PCDOS) {
|
||||
} else if (ti->type == TRACK_PCDOS) {
|
||||
|
||||
decode_pcdos(drv);
|
||||
|
||||
|
@ -1427,7 +1353,6 @@ static int decode_buffer (uae_u16 *mbuf, int cyl, int drvsec, int ddhd, int file
|
|||
|
||||
trackoffs = (id & 0xff00) >> 8;
|
||||
if (trackoffs + 1 > drvsec) {
|
||||
write_log ("Disk decode: weird sector number %d\n", trackoffs);
|
||||
if (filetype == ADF_EXT2)
|
||||
return 2;
|
||||
continue;
|
||||
|
@ -1451,7 +1376,6 @@ static int decode_buffer (uae_u16 *mbuf, int cyl, int drvsec, int ddhd, int file
|
|||
even = getmfmlong (mbuf + 2, shift);
|
||||
mbuf += 4;
|
||||
if (((odd << 1) | even) != chksum || ((id & 0x00ff0000) >> 16) != cyl * 2 + side) {
|
||||
write_log ("Disk decode: checksum error on sector %d header\n", trackoffs);
|
||||
if (filetype == ADF_EXT2)
|
||||
return 3;
|
||||
continue;
|
||||
|
@ -1473,7 +1397,6 @@ static int decode_buffer (uae_u16 *mbuf, int cyl, int drvsec, int ddhd, int file
|
|||
chksum ^= odd ^ even;
|
||||
}
|
||||
if (chksum) {
|
||||
write_log ("Disk decode: sector %d, data checksum error\n", trackoffs);
|
||||
if (filetype == ADF_EXT2)
|
||||
return 4;
|
||||
continue;
|
||||
|
@ -1555,14 +1478,12 @@ static int drive_write_pcdos (drive *drv)
|
|||
tmp[0] = 0xa1; tmp[1] = 0xa1; tmp[2] = 0xa1; tmp[3] = mark;
|
||||
tmp[4] = cyl; tmp[5] = head; tmp[6] = sector; tmp[7] = size;
|
||||
if (get_crc16(tmp, 8) != crc || cyl != drv->cyl || head != side || size != 2 || sector < 1 || sector > drv->num_secs) {
|
||||
write_log ("PCDOS: track %d, corrupted sector header\n", drv->cyl * 2 + side);
|
||||
return 1;
|
||||
}
|
||||
sector--;
|
||||
continue;
|
||||
}
|
||||
if (mark != 0xfb) {
|
||||
write_log ("PCDOS: track %d: unknown address mark %02.2X\n", drv->cyl * 2 + side, mark);
|
||||
continue;
|
||||
}
|
||||
if (sector < 0)
|
||||
|
@ -1571,20 +1492,14 @@ static int drive_write_pcdos (drive *drv)
|
|||
secbuf[i + 4] = mfmdecode(&mbuf, shift);
|
||||
crc = (mfmdecode(&mbuf, shift) << 8) | mfmdecode(&mbuf, shift);
|
||||
if (get_crc16(secbuf, 3 + 1 + 512) != crc) {
|
||||
write_log ("PCDOS: track %d, sector %d data checksum error\n",
|
||||
drv->cyl * 2 + side, sector + 1);
|
||||
continue;
|
||||
}
|
||||
sectable[sector] = 1;
|
||||
secwritten++;
|
||||
zfile_fseek (drv->diskfile, drv->trackdata[drv->cyl * 2 + side].offs + sector * 512, SEEK_SET);
|
||||
zfile_fwrite (secbuf + 4, sizeof (uae_u8), 512, drv->diskfile);
|
||||
write_log ("PCDOS: track %d sector %d written\n", drv->cyl * 2 + side, sector + 1);
|
||||
sector = -1;
|
||||
}
|
||||
if (secwritten != drv->num_secs)
|
||||
write_log ("PCDOS: track %d, %d corrupted sectors ignored\n",
|
||||
drv->cyl * 2 + side, drv->num_secs - secwritten);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1614,7 +1529,6 @@ static int drive_write_ext2 (uae_u16 *bigmfmbuf, struct zfile *diskfile, trackid
|
|||
|
||||
len = (tracklen + 7) / 8;
|
||||
if (len > ti->len) {
|
||||
write_log ("disk raw write: image file's track %d is too small (%d < %d)!\n", ti->track, ti->len, len);
|
||||
len = ti->len;
|
||||
}
|
||||
diskfile_update (diskfile, ti, tracklen, TRACK_RAW);
|
||||
|
@ -1632,6 +1546,8 @@ static int drive_write_ext2 (uae_u16 *bigmfmbuf, struct zfile *diskfile, trackid
|
|||
static void drive_write_data (drive * drv)
|
||||
{
|
||||
int ret = -1;
|
||||
static int warned;
|
||||
|
||||
if (drive_writeprotected (drv)) {
|
||||
/* read original track back because we didn't really write anything */
|
||||
drv->buffered_side = 2;
|
||||
|
@ -1643,7 +1559,11 @@ static void drive_write_data (drive * drv)
|
|||
}
|
||||
switch (drv->filetype) {
|
||||
case ADF_NORMAL:
|
||||
drive_write_adf_amigados (drv);
|
||||
if (drive_write_adf_amigados (drv)) {
|
||||
if (!warned)
|
||||
notify_user (NUMSG_NEEDEXT2);
|
||||
warned = 1;
|
||||
}
|
||||
return;
|
||||
case ADF_EXT1:
|
||||
break;
|
||||
|
@ -1651,7 +1571,6 @@ static void drive_write_data (drive * drv)
|
|||
if (!longwritemode)
|
||||
ret = drive_write_adf_amigados (drv);
|
||||
if (ret) {
|
||||
write_log("not an amigados track %d (error %d), writing as raw track\n", drv->cyl * 2 + side, ret);
|
||||
drive_write_ext2 (drv->bigmfmbuf, drv->diskfile, &drv->trackdata[drv->cyl * 2 + side],
|
||||
longwritemode ? dsklength2 * 8 : drv->tracklen);
|
||||
}
|
||||
|
@ -1661,8 +1580,6 @@ static void drive_write_data (drive * drv)
|
|||
break;
|
||||
case ADF_PCDOS:
|
||||
ret = drive_write_pcdos (drv);
|
||||
if (ret)
|
||||
write_log("not a PC formatted track %d (error %d)\n", drv->cyl * 2 + side, ret);
|
||||
break;
|
||||
}
|
||||
drv->tracktiming[0] = 0;
|
||||
|
@ -1932,10 +1849,6 @@ void disk_insert (int num, const char *name)
|
|||
{
|
||||
disk_insert_2 (num, name, 0);
|
||||
}
|
||||
void disk_insert_force (int num, const char *name)
|
||||
{
|
||||
disk_insert_2 (num, name, 1);
|
||||
}
|
||||
|
||||
void DISK_check_change (void)
|
||||
{
|
||||
|
@ -1977,16 +1890,6 @@ int disk_empty (int num)
|
|||
return drive_empty (floppy + num);
|
||||
}
|
||||
|
||||
static char *tobin(uae_u8 v)
|
||||
{
|
||||
int i;
|
||||
static char buf[10];
|
||||
for( i = 7; i >= 0; i--)
|
||||
buf[7 - i] = v & (1 << i) ? '1' : '0';
|
||||
buf[i] = 0;
|
||||
return buf;
|
||||
}
|
||||
|
||||
void DISK_select (uae_u8 data)
|
||||
{
|
||||
int step_pulse, lastselected, dr;
|
||||
|
@ -1999,6 +1902,7 @@ void DISK_select (uae_u8 data)
|
|||
|
||||
direction = (data >> 1) & 1;
|
||||
step_pulse = data & 1;
|
||||
|
||||
if ((prevdata & 0x80) != (data & 0x80)) {
|
||||
for (dr = 0; dr < 4; dr++) {
|
||||
if (floppy[dr].indexhackmode > 1 && !(selected & (1 << dr))) {
|
||||
|
@ -2038,15 +1942,12 @@ void DISK_select (uae_u8 data)
|
|||
drive_motor (drv, 1);
|
||||
}
|
||||
}
|
||||
if (currprefs.dfxtype[dr] == DRV_35_DD) {
|
||||
if (dr == 0) /* A500/A2000 internal drive always returns 0 */
|
||||
if (!currprefs.cs_df0idhw && dr == 0)
|
||||
drv->idbit = 0;
|
||||
else /* regular external DD drive always returns 1 */
|
||||
drv->idbit = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) {
|
||||
floppy[dr].state = (!(selected & (1 << dr))) | !floppy[dr].motoroff;
|
||||
update_drive_gui (dr);
|
||||
|
@ -2063,8 +1964,10 @@ uae_u8 DISK_status (void)
|
|||
drive *drv = floppy + dr;
|
||||
if (!((selected | disabled) & (1 << dr))) {
|
||||
if (drive_running (drv)) {
|
||||
{
|
||||
if (drv->dskready && !drv->indexhack && currprefs.dfxtype[dr] != DRV_35_DD_ESCOM)
|
||||
st &= ~0x20;
|
||||
}
|
||||
} else {
|
||||
/* report drive ID */
|
||||
if (drv->idbit && currprefs.dfxtype[dr] != DRV_35_DD_ESCOM)
|
||||
|
@ -2079,8 +1982,9 @@ uae_u8 DISK_status (void)
|
|||
st &= ~0x10;
|
||||
if (drive_writeprotected (drv))
|
||||
st &= ~8;
|
||||
if (drv->dskchange && currprefs.dfxtype[dr] != DRV_525_SD)
|
||||
if (drv->dskchange && currprefs.dfxtype[dr] != DRV_525_SD) {
|
||||
st &= ~4;
|
||||
}
|
||||
} else if (!(selected & (1 << dr))) {
|
||||
if (drv->idbit)
|
||||
st &= ~0x20;
|
||||
|
@ -2108,25 +2012,6 @@ STATIC_INLINE uae_u32 getonebit (uae_u16 * mfmbuf, int mfmpos)
|
|||
return (buf[0] & (1 << (15 - (mfmpos & 15)))) ? 1 : 0;
|
||||
}
|
||||
|
||||
void dumpdisk (void)
|
||||
{
|
||||
int i, j, k;
|
||||
uae_u16 w;
|
||||
|
||||
for (i = 0; i < MAX_FLOPPY_DRIVES; i++) {
|
||||
drive *drv = &floppy[i];
|
||||
if (!(disabled & (1 << i))) {
|
||||
w = word;
|
||||
for (j = 0; j < 15; j++) {
|
||||
for (k = 0; k < 16; k++) {
|
||||
w <<= 1;
|
||||
w |= getonebit (drv->bigmfmbuf, drv->mfmpos + j * 16 + k);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void disk_dmafinished (void)
|
||||
{
|
||||
INTREQ (0x8000 | 0x0002);
|
||||
|
@ -2139,19 +2024,6 @@ static void fetchnextrevolution (drive *drv)
|
|||
drv->trackspeed = get_floppy_speed2 (drv);
|
||||
if (!drv->multi_revolution)
|
||||
return;
|
||||
switch (drv->filetype)
|
||||
{
|
||||
case ADF_IPF:
|
||||
#ifdef CAPS
|
||||
caps_loadrevolution (drv->bigmfmbuf, drv - floppy, drv->cyl * 2 + side, &drv->tracklen);
|
||||
#endif
|
||||
break;
|
||||
case ADF_FDI:
|
||||
#ifdef FDI2RAW
|
||||
fdi2raw_loadrevolution (drv->fdi, drv->bigmfmbuf, drv->tracktiming, drv->cyl * 2 + side, &drv->tracklen, 1);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void DISK_handler (uae_u32 data)
|
||||
|
@ -2331,7 +2203,7 @@ static void disk_doupdate_read (drive * drv, int floppybits)
|
|||
else
|
||||
word |= getonebit (drv->bigmfmbuf, drv->mfmpos);
|
||||
}
|
||||
//write_log ("%08.8X bo=%d so=%d mfmpos=%d dma=%d\n", (word & 0xffffff), bitoffset, syncoffset, drv->mfmpos,dma_enable);
|
||||
//write_log ("%08.8X bo=%d mfmpos=%d dma=%d\n", (word & 0xffffff), bitoffset, drv->mfmpos,dma_enable);
|
||||
drv->mfmpos++;
|
||||
drv->mfmpos %= drv->tracklen;
|
||||
if (drv->mfmpos == drv->indexoffset) {
|
||||
|
@ -2346,13 +2218,6 @@ static void disk_doupdate_read (drive * drv, int floppybits)
|
|||
put_word (dskpt, word);
|
||||
dskpt += 2;
|
||||
}
|
||||
#if 0
|
||||
dma_tab[j++] = word;
|
||||
if (j == MAX_DISK_WORDS_PER_LINE - 1) {
|
||||
write_log ("Bug: Disk DMA buffer overflow!\n");
|
||||
j--;
|
||||
}
|
||||
#endif
|
||||
dsklength--;
|
||||
if (dsklength <= 0)
|
||||
disk_dmafinished ();
|
||||
|
@ -2372,30 +2237,8 @@ static void disk_doupdate_read (drive * drv, int floppybits)
|
|||
bitoffset &= 15;
|
||||
floppybits -= drv->trackspeed;
|
||||
}
|
||||
#if 0
|
||||
dma_tab[j] = 0xffffffff;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/* disk DMA fetch happens on real Amiga at the beginning of next horizontal line
|
||||
(cycles 9, 11 and 13 according to hardware manual) We transfer all DMA'd
|
||||
data at cycle 0. I don't think any program cares about this small difference.
|
||||
*/
|
||||
static void dodmafetch (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (dma_tab[i] != 0xffffffff && dskdmaen != 3 && (dmacon & 0x210) == 0x210) {
|
||||
put_word (dskpt, dma_tab[i++]);
|
||||
dskpt += 2;
|
||||
}
|
||||
dma_tab[0] = 0xffffffff;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* this is very unoptimized. DSKBYTR is used very rarely, so it should not matter. */
|
||||
|
||||
uae_u16 DSKBYTR (int hpos)
|
||||
|
@ -2476,10 +2319,6 @@ void DISK_update (int tohpos)
|
|||
if (disk_hpos >= (maxhpos << 8))
|
||||
disk_hpos -= maxhpos << 8;
|
||||
|
||||
#if 0
|
||||
dodmafetch ();
|
||||
#endif
|
||||
|
||||
for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) {
|
||||
drive *drv = &floppy[dr];
|
||||
if (drv->motoroff)
|
||||
|
@ -2663,9 +2502,6 @@ void DSKSYNC (int hpos, uae_u16 v)
|
|||
dsksync = v;
|
||||
}
|
||||
|
||||
void DSKDAT (uae_u16 v)
|
||||
{
|
||||
}
|
||||
void DSKPTH (uae_u16 v)
|
||||
{
|
||||
dskpt = (dskpt & 0xffff) | ((uae_u32) v << 16);
|
||||
|
@ -2689,9 +2525,16 @@ void DISK_init (void)
|
|||
{
|
||||
int dr;
|
||||
|
||||
#if 0
|
||||
dma_tab[0] = 0xffffffff;
|
||||
#endif
|
||||
longwritemode = side = direction = 0;
|
||||
diskevent_flag = 0;
|
||||
disk_sync_cycle = 0;
|
||||
dsklength = dsklength2 = dsklen = 0;
|
||||
dskbytr_val = 0;
|
||||
dskpt = 0;
|
||||
dma_enable =0;
|
||||
bitoffset = word = 0;
|
||||
dsksync = disk_jitter = linecounter = 0;
|
||||
selected = 15;
|
||||
|
||||
for (dr = 0; dr < MAX_FLOPPY_DRIVES; dr++) {
|
||||
drive *drv = &floppy[dr];
|
||||
|
@ -2700,8 +2543,6 @@ void DISK_init (void)
|
|||
if (!drive_insert (drv, &currprefs, dr, currprefs.df[dr]))
|
||||
disk_eject (dr);
|
||||
}
|
||||
if (disk_empty (0))
|
||||
write_log ("No disk in drive 0.\n");
|
||||
}
|
||||
|
||||
void DISK_reset (void)
|
||||
|
@ -2711,7 +2552,6 @@ void DISK_reset (void)
|
|||
if (savestate_state)
|
||||
return;
|
||||
|
||||
//floppy[0].catweasel = &cwc.drives[0];
|
||||
disk_hpos = 0;
|
||||
dskdmaen = 0;
|
||||
disabled = 0;
|
||||
|
@ -2783,7 +2623,7 @@ end:
|
|||
|
||||
/* Disk save/restore code */
|
||||
|
||||
#if defined SAVESTATE
|
||||
#if defined SAVESTATE || defined DEBUGGER
|
||||
|
||||
void DISK_save_custom (uae_u32 *pdskpt, uae_u16 *pdsklength, uae_u16 *pdsksync, uae_u16 *pdskbytr)
|
||||
{
|
||||
|
@ -2793,6 +2633,10 @@ void DISK_save_custom (uae_u32 *pdskpt, uae_u16 *pdsklength, uae_u16 *pdsksync,
|
|||
if(pdskbytr) *pdskbytr = dskbytr_val;
|
||||
}
|
||||
|
||||
#endif /* SAVESTATE || DEBUGGER */
|
||||
|
||||
#ifdef SAVESTATE
|
||||
|
||||
void DISK_restore_custom (uae_u32 pdskpt, uae_u16 pdsklength, uae_u16 pdskbytr)
|
||||
{
|
||||
dskpt = pdskpt;
|
||||
|
@ -2940,10 +2784,6 @@ uae_u8 *save_floppy(int *len, uae_u8 *dstptr)
|
|||
{
|
||||
uae_u8 *dstbak, *dst;
|
||||
|
||||
/* flush dma buffer before saving */
|
||||
#if 0
|
||||
dodmafetch();
|
||||
#endif
|
||||
if (dstptr)
|
||||
dstbak = dst = dstptr;
|
||||
else
|
||||
|
|
1004
src/drawing.cpp
1004
src/drawing.cpp
File diff suppressed because it is too large
Load diff
|
@ -358,7 +358,7 @@ static uae_u8 *fastmemory;
|
|||
static uae_u32 REGPARAM2 fastmem_lget (uaecptr addr)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= fastmem_start /*& fastmem_mask*/;
|
||||
addr -= fastmem_start;
|
||||
addr &= fastmem_mask;
|
||||
m = fastmemory + addr;
|
||||
return do_get_mem_long ((uae_u32 *)m);
|
||||
|
@ -367,7 +367,7 @@ static uae_u32 REGPARAM2 fastmem_lget (uaecptr addr)
|
|||
static uae_u32 REGPARAM2 fastmem_wget (uaecptr addr)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= fastmem_start /*& fastmem_mask*/;
|
||||
addr -= fastmem_start;
|
||||
addr &= fastmem_mask;
|
||||
m = fastmemory + addr;
|
||||
return do_get_mem_word ((uae_u16 *)m);
|
||||
|
@ -376,7 +376,7 @@ static uae_u32 REGPARAM2 fastmem_wget (uaecptr addr)
|
|||
static uae_u32 REGPARAM2 fastmem_bget (uaecptr addr)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= fastmem_start /*& fastmem_mask*/;
|
||||
addr -= fastmem_start;
|
||||
addr &= fastmem_mask;
|
||||
m = (uae_u8 *)(fastmemory + addr);
|
||||
return do_get_mem_byte(m);
|
||||
|
@ -385,7 +385,7 @@ static uae_u32 REGPARAM2 fastmem_bget (uaecptr addr)
|
|||
static void REGPARAM2 fastmem_lput (uaecptr addr, uae_u32 l)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= fastmem_start /*& fastmem_mask*/;
|
||||
addr -= fastmem_start;
|
||||
addr &= fastmem_mask;
|
||||
m = fastmemory + addr;
|
||||
do_put_mem_long ((uae_u32 *)m, l);
|
||||
|
@ -394,7 +394,7 @@ static void REGPARAM2 fastmem_lput (uaecptr addr, uae_u32 l)
|
|||
static void REGPARAM2 fastmem_wput (uaecptr addr, uae_u32 w)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= fastmem_start /*& fastmem_mask*/;
|
||||
addr -= fastmem_start;
|
||||
addr &= fastmem_mask;
|
||||
m = fastmemory + addr;
|
||||
do_put_mem_word ((uae_u16 *)m, w);
|
||||
|
@ -403,7 +403,7 @@ static void REGPARAM2 fastmem_wput (uaecptr addr, uae_u32 w)
|
|||
static void REGPARAM2 fastmem_bput (uaecptr addr, uae_u32 b)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= fastmem_start /*& fastmem_mask*/;
|
||||
addr -= fastmem_start;
|
||||
addr &= fastmem_mask;
|
||||
m = (uae_u8 *)(fastmemory + addr);
|
||||
do_put_mem_byte(m, b);
|
||||
|
@ -411,14 +411,14 @@ static void REGPARAM2 fastmem_bput (uaecptr addr, uae_u32 b)
|
|||
|
||||
static int REGPARAM2 fastmem_check (uaecptr addr, uae_u32 size)
|
||||
{
|
||||
addr -= fastmem_start /*& fastmem_mask*/;
|
||||
addr -= fastmem_start;
|
||||
addr &= fastmem_mask;
|
||||
return (addr + size) <= allocated_fastmem;
|
||||
}
|
||||
|
||||
static uae_u8 *REGPARAM2 fastmem_xlate (uaecptr addr)
|
||||
{
|
||||
addr -= fastmem_start /*& fastmem_mask*/;
|
||||
addr -= fastmem_start;
|
||||
addr &= fastmem_mask;
|
||||
return fastmemory + addr;
|
||||
}
|
||||
|
@ -453,7 +453,7 @@ static uae_u32 REGPARAM2 filesys_lget (uaecptr addr)
|
|||
#ifdef JIT
|
||||
special_mem |= S_READ;
|
||||
#endif
|
||||
addr -= filesys_start /*& 65535*/;
|
||||
addr -= filesys_start;
|
||||
addr &= 65535;
|
||||
m = filesysory + addr;
|
||||
return do_get_mem_long ((uae_u32 *)m);
|
||||
|
@ -465,7 +465,7 @@ static uae_u32 REGPARAM2 filesys_wget (uaecptr addr)
|
|||
#ifdef JIT
|
||||
special_mem |= S_READ;
|
||||
#endif
|
||||
addr -= filesys_start /*& 65535*/;
|
||||
addr -= filesys_start;
|
||||
addr &= 65535;
|
||||
m = filesysory + addr;
|
||||
return do_get_mem_word ((uae_u16 *)m);
|
||||
|
@ -476,7 +476,7 @@ static uae_u32 REGPARAM2 filesys_bget (uaecptr addr)
|
|||
#ifdef JIT
|
||||
special_mem |= S_READ;
|
||||
#endif
|
||||
addr -= filesys_start /*& 65535*/;
|
||||
addr -= filesys_start;
|
||||
addr &= 65535;
|
||||
return filesysory[addr];
|
||||
}
|
||||
|
@ -535,7 +535,7 @@ static uae_u8 *z3fastmem;
|
|||
static uae_u32 REGPARAM2 z3fastmem_lget (uaecptr addr)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= z3fastmem_start /*& z3fastmem_mask*/;
|
||||
addr -= z3fastmem_start;
|
||||
addr &= z3fastmem_mask;
|
||||
m = z3fastmem + addr;
|
||||
return do_get_mem_long ((uae_u32 *)m);
|
||||
|
@ -544,7 +544,7 @@ static uae_u32 REGPARAM2 z3fastmem_lget (uaecptr addr)
|
|||
static uae_u32 REGPARAM2 z3fastmem_wget (uaecptr addr)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= z3fastmem_start /*& z3fastmem_mask*/;
|
||||
addr -= z3fastmem_start;
|
||||
addr &= z3fastmem_mask;
|
||||
m = z3fastmem + addr;
|
||||
return do_get_mem_word ((uae_u16 *)m);
|
||||
|
@ -553,7 +553,7 @@ static uae_u32 REGPARAM2 z3fastmem_wget (uaecptr addr)
|
|||
static uae_u32 REGPARAM2 z3fastmem_bget (uaecptr addr)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= z3fastmem_start /*& z3fastmem_mask*/;
|
||||
addr -= z3fastmem_start;
|
||||
addr &= z3fastmem_mask;
|
||||
m = z3fastmem + addr;
|
||||
return do_get_mem_byte (m);
|
||||
|
@ -562,7 +562,7 @@ static uae_u32 REGPARAM2 z3fastmem_bget (uaecptr addr)
|
|||
static void REGPARAM2 z3fastmem_lput (uaecptr addr, uae_u32 l)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= z3fastmem_start /*& z3fastmem_mask*/;
|
||||
addr -= z3fastmem_start;
|
||||
addr &= z3fastmem_mask;
|
||||
m = z3fastmem + addr;
|
||||
do_put_mem_long ((uae_u32 *)m, l);
|
||||
|
@ -571,7 +571,7 @@ static void REGPARAM2 z3fastmem_lput (uaecptr addr, uae_u32 l)
|
|||
static void REGPARAM2 z3fastmem_wput (uaecptr addr, uae_u32 w)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= z3fastmem_start /*& z3fastmem_mask*/;
|
||||
addr -= z3fastmem_start;
|
||||
addr &= z3fastmem_mask;
|
||||
m = z3fastmem + addr;
|
||||
do_put_mem_word ((uae_u16 *)m, w);
|
||||
|
@ -580,7 +580,7 @@ static void REGPARAM2 z3fastmem_wput (uaecptr addr, uae_u32 w)
|
|||
static void REGPARAM2 z3fastmem_bput (uaecptr addr, uae_u32 b)
|
||||
{
|
||||
uae_u8 *m;
|
||||
addr -= z3fastmem_start /*& z3fastmem_mask*/;
|
||||
addr -= z3fastmem_start;
|
||||
addr &= z3fastmem_mask;
|
||||
m = z3fastmem + addr;
|
||||
do_put_mem_byte (m, b);
|
||||
|
@ -588,14 +588,14 @@ static void REGPARAM2 z3fastmem_bput (uaecptr addr, uae_u32 b)
|
|||
|
||||
static int REGPARAM2 z3fastmem_check (uaecptr addr, uae_u32 size)
|
||||
{
|
||||
addr -= z3fastmem_start /*& z3fastmem_mask*/;
|
||||
addr -= z3fastmem_start;
|
||||
addr &= z3fastmem_mask;
|
||||
return (addr + size) <= allocated_z3fastmem;
|
||||
}
|
||||
|
||||
static uae_u8 *REGPARAM2 z3fastmem_xlate (uaecptr addr)
|
||||
{
|
||||
addr -= z3fastmem_start /*& z3fastmem_mask*/;
|
||||
addr -= z3fastmem_start;
|
||||
addr &= z3fastmem_mask;
|
||||
return z3fastmem + addr;
|
||||
}
|
||||
|
@ -627,8 +627,8 @@ static void expamem_map_fastcard (void)
|
|||
|
||||
static void expamem_init_fastcard (void)
|
||||
{
|
||||
uae_u16 mid = /*currprefs.cs_a2091 ? commodore :*/ uae_id;
|
||||
uae_u8 pid = /*currprefs.cs_a2091 ? commodore_a2091_ram :*/ 1;
|
||||
uae_u16 mid = uae_id;
|
||||
uae_u8 pid = 1;
|
||||
|
||||
expamem_init_clear();
|
||||
if (allocated_fastmem == 0x100000)
|
||||
|
@ -952,22 +952,8 @@ static uaecptr check_boot_rom (void)
|
|||
if (uci->controller == 0)
|
||||
return b;
|
||||
}
|
||||
/*
|
||||
if (currprefs.socket_emu)
|
||||
return b;
|
||||
if (currprefs.uaeserial)
|
||||
return b;
|
||||
if (currprefs.scsi == 1)
|
||||
return b;
|
||||
if (currprefs.sana2)
|
||||
return b;
|
||||
if (currprefs.win32_outsidemouse)
|
||||
return b;
|
||||
*/
|
||||
if (currprefs.gfxmem_size)
|
||||
return b;
|
||||
// if (currprefs.win32_automount_removable)
|
||||
// return b;
|
||||
if (currprefs.chipmem_size > 2 * 1024 * 1024)
|
||||
return b;
|
||||
return 0;
|
||||
|
@ -1079,6 +1065,9 @@ void expansion_init (void)
|
|||
z3fastmem_mask = z3fastmem_start = 0;
|
||||
z3fastmem = 0;
|
||||
|
||||
expamem_lo = 0;
|
||||
expamem_hi = 0;
|
||||
|
||||
allocate_expamem ();
|
||||
|
||||
#ifdef FILESYS
|
||||
|
@ -1106,7 +1095,7 @@ void expansion_cleanup (void)
|
|||
#endif
|
||||
#ifdef FILESYS
|
||||
if (filesysory)
|
||||
free (filesysory); //mapped_free (filesysory);
|
||||
free (filesysory);
|
||||
filesysory = 0;
|
||||
#endif
|
||||
}
|
||||
|
|
135
src/filesys.cpp
135
src/filesys.cpp
|
@ -37,11 +37,9 @@
|
|||
#include "traps.h"
|
||||
#include "fsusage.h"
|
||||
#include "native2amiga.h"
|
||||
#include "scsidev.h"
|
||||
#include "fsdb.h"
|
||||
#include "zfile.h"
|
||||
#include "gui.h"
|
||||
#include "cfgfile.h"
|
||||
#include "savestate.h"
|
||||
|
||||
#define TRACING_ENABLED 0
|
||||
|
@ -53,35 +51,6 @@
|
|||
#define DUMPLOCK(u,x)
|
||||
#endif
|
||||
|
||||
static void aino_test (a_inode *aino)
|
||||
{
|
||||
#ifdef AINO_DEBUG
|
||||
a_inode *aino2 = aino, *aino3;
|
||||
for (;;) {
|
||||
if (!aino || !aino->next)
|
||||
return;
|
||||
if ((aino->checksum1 ^ aino->checksum2) != 0xaaaa5555) {
|
||||
write_log ("PANIC: corrupted or freed but used aino detected!", aino);
|
||||
}
|
||||
aino3 = aino;
|
||||
aino = aino->next;
|
||||
if (aino->prev != aino3) {
|
||||
write_log ("PANIC: corrupted aino linking!\n");
|
||||
break;
|
||||
}
|
||||
if (aino == aino2) break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void aino_test_init (a_inode *aino)
|
||||
{
|
||||
#ifdef AINO_DEBUG
|
||||
aino->checksum1 = (uae_u32)aino;
|
||||
aino->checksum2 = aino->checksum1 ^ 0xaaaa5555;
|
||||
#endif
|
||||
}
|
||||
|
||||
uaecptr filesys_initcode;
|
||||
static uae_u32 fsdevname, filesys_configdev;
|
||||
static int filesys_in_interrupt;
|
||||
|
@ -164,7 +133,6 @@ static void close_filesys_unit (UnitInfo *uip)
|
|||
xfree (uip->unit_pipe);
|
||||
if (uip->back_pipe)
|
||||
xfree (uip->back_pipe);
|
||||
|
||||
uip->unit_pipe = 0;
|
||||
uip->back_pipe = 0;
|
||||
|
||||
|
@ -230,7 +198,7 @@ int get_filesys_unitconfig (struct uae_prefs *p, int index, struct mountedinfo *
|
|||
ui->hf.fd = 0;
|
||||
}
|
||||
} else {
|
||||
if (!ui->controller /*|| (ui->controller && p->cs_ide)*/) {
|
||||
if (!ui->controller) {
|
||||
mi->ismounted = 1;
|
||||
if (uci->ishdf)
|
||||
mi->ismedia = ui->hf.drive_empty ? 0 : 1;
|
||||
|
@ -536,27 +504,7 @@ static void initialize_mountinfo(void)
|
|||
ui = &mountinfo.ui[idx];
|
||||
ui->configureddrive = 1;
|
||||
}
|
||||
} /* else if (uci->controller <= HD_CONTROLLER_IDE3 ) {
|
||||
gayle_add_ide_unit (uci->controller - HD_CONTROLLER_IDE0, uci->rootdir, uci->blocksize, uci->readonly,
|
||||
uci->devname, uci->sectors, uci->surfaces, uci->reserved,
|
||||
uci->bootpri, uci->filesys);
|
||||
} else if (uci->controller <= HD_CONTROLLER_SCSI6) {
|
||||
if (currprefs.cs_mbdmac) {
|
||||
a3000_add_scsi_unit (uci->controller - HD_CONTROLLER_SCSI0, uci->rootdir, uci->blocksize, uci->readonly,
|
||||
uci->devname, uci->sectors, uci->surfaces, uci->reserved,
|
||||
uci->bootpri, uci->filesys);
|
||||
} else if (currprefs.cs_a2091) {
|
||||
a2091_add_scsi_unit (uci->controller - HD_CONTROLLER_SCSI0, uci->rootdir, uci->blocksize, uci->readonly,
|
||||
uci->devname, uci->sectors, uci->surfaces, uci->reserved,
|
||||
uci->bootpri, uci->filesys);
|
||||
} else if (currprefs.cs_cdtvscsi) {
|
||||
cdtv_add_scsi_unit (uci->controller - HD_CONTROLLER_SCSI0, uci->rootdir, uci->blocksize, uci->readonly,
|
||||
uci->devname, uci->sectors, uci->surfaces, uci->reserved,
|
||||
uci->bootpri, uci->filesys);
|
||||
}
|
||||
} else if (uci->controller == HD_CONTROLLER_PCMCIA_SRAM) {
|
||||
gayle_add_pcmcia_sram_unit (uci->rootdir, uci->readonly);
|
||||
} */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -578,7 +526,6 @@ void free_mountinfo (void)
|
|||
int i;
|
||||
for (i = 0; i < MAX_FILESYSTEM_UNITS; i++)
|
||||
close_filesys_unit (mountinfo.ui + i);
|
||||
//gayle_free_units();
|
||||
}
|
||||
|
||||
struct hardfiledata *get_hardfile_data (int nr)
|
||||
|
@ -1027,7 +974,7 @@ int filesys_media_change (const char *rootdir, int inserted, struct uaedev_confi
|
|||
if (nr >= 0)
|
||||
ui = &mountinfo.ui[nr];
|
||||
/* only configured drives have automount support if automount is disabled */
|
||||
if (/*!currprefs.win32_automount_removable &&*/ (!ui || !ui->configureddrive) && (inserted == 0 || inserted == 1))
|
||||
if ((!ui || !ui->configureddrive) && (inserted == 0 || inserted == 1))
|
||||
return 0;
|
||||
if (nr < 0 && !inserted)
|
||||
return 0;
|
||||
|
@ -1177,20 +1124,11 @@ static int fsdb_cando (Unit *unit)
|
|||
{
|
||||
if (unit->volflags & MYVOLUMEINFO_ARCHIVE)
|
||||
return 1;
|
||||
// if (currprefs.filesys_custom_uaefsdb && (unit->volflags & MYVOLUMEINFO_STREAMS))
|
||||
// return 1;
|
||||
// if (!currprefs.filesys_no_uaefsdb)
|
||||
// return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void prepare_for_open (char *name)
|
||||
{
|
||||
}
|
||||
|
||||
static void de_recycle_aino (Unit *unit, a_inode *aino)
|
||||
{
|
||||
aino_test (aino);
|
||||
if (aino->next == 0 || aino == &unit->rootnode)
|
||||
return;
|
||||
aino->next->prev = aino->prev;
|
||||
|
@ -1238,11 +1176,9 @@ static int flush_cache(Unit *unit, int num)
|
|||
a_inode **aip;
|
||||
|
||||
aip = &parent->child;
|
||||
aino_test (parent);
|
||||
if (parent && !parent->locked_children) {
|
||||
for (;;) {
|
||||
a_inode *aino = *aip;
|
||||
aino_test (aino);
|
||||
if (aino == 0)
|
||||
break;
|
||||
/* Not recyclable if next == 0 (i.e., not chained into
|
||||
|
@ -1284,7 +1220,6 @@ static int flush_cache(Unit *unit, int num)
|
|||
|
||||
static void recycle_aino (Unit *unit, a_inode *new_aino)
|
||||
{
|
||||
aino_test (new_aino);
|
||||
if (new_aino->dir || new_aino->shlock > 0
|
||||
|| new_aino->elock || new_aino == &unit->rootnode)
|
||||
/* Still in use */
|
||||
|
@ -1297,14 +1232,11 @@ static void recycle_aino (Unit *unit, a_inode *new_aino)
|
|||
flush_cache (unit, 50);
|
||||
}
|
||||
|
||||
aino_test (new_aino);
|
||||
/* Chain it into circular list. */
|
||||
new_aino->next = unit->rootnode.next;
|
||||
new_aino->prev = &unit->rootnode;
|
||||
new_aino->prev->next = new_aino;
|
||||
new_aino->next->prev = new_aino;
|
||||
aino_test (new_aino->next);
|
||||
aino_test (new_aino->prev);
|
||||
|
||||
unit->aino_cache_size++;
|
||||
}
|
||||
|
@ -1342,8 +1274,6 @@ static void update_child_names (Unit *unit, a_inode *a, a_inode *parent)
|
|||
|
||||
static void move_aino_children (Unit *unit, a_inode *from, a_inode *to)
|
||||
{
|
||||
aino_test (from);
|
||||
aino_test (to);
|
||||
to->child = from->child;
|
||||
from->child = 0;
|
||||
update_child_names (unit, to->child, to);
|
||||
|
@ -1355,7 +1285,6 @@ static void delete_aino (Unit *unit, a_inode *aino)
|
|||
|
||||
TRACE(("deleting aino %x\n", aino->uniq));
|
||||
|
||||
aino_test (aino);
|
||||
aino->dirty = 1;
|
||||
aino->deleted = 1;
|
||||
de_recycle_aino (unit, aino);
|
||||
|
@ -1436,7 +1365,6 @@ static a_inode *lookup_aino (Unit *unit, uae_u32 uniq)
|
|||
unit->nr_cache_hits++;
|
||||
unit->nr_cache_lookups++;
|
||||
unit->aino_hash[hash] = a;
|
||||
aino_test (a);
|
||||
return a;
|
||||
}
|
||||
|
||||
|
@ -1475,8 +1403,6 @@ static char *get_nname (Unit *unit, a_inode *base, char *rel,
|
|||
return 0;
|
||||
}
|
||||
|
||||
aino_test (base);
|
||||
|
||||
/* If we have a mapping of some other aname to "rel", we must pretend
|
||||
* it does not exist.
|
||||
* This can happen for example if an Amiga program creates a
|
||||
|
@ -1508,28 +1434,16 @@ static char *create_nname (Unit *unit, a_inode *base, char *rel)
|
|||
{
|
||||
char *p;
|
||||
|
||||
aino_test (base);
|
||||
/* We are trying to create a file called REL. */
|
||||
|
||||
/* If the name is used otherwise in the directory (or globally), we
|
||||
* need a new unique nname. */
|
||||
if (fsdb_name_invalid (rel) || fsdb_used_as_nname (base, rel)) {
|
||||
#if 0
|
||||
oh_dear:
|
||||
#endif
|
||||
p = fsdb_create_unique_nname (base, rel);
|
||||
return p;
|
||||
}
|
||||
p = build_nname (base->nname, rel);
|
||||
|
||||
#if 0
|
||||
/* Delete this code once we know everything works. */
|
||||
if (access (p, R_OK) >= 0 || errno != ENOENT) {
|
||||
write_log ("Filesystem in trouble... please report.\n");
|
||||
xfree (p);
|
||||
goto oh_dear;
|
||||
}
|
||||
#endif
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -1598,9 +1512,6 @@ static void init_child_aino (Unit *unit, a_inode *base, a_inode *aino)
|
|||
base->locked_children++;
|
||||
}
|
||||
init_child_aino_tree(unit, base, aino);
|
||||
|
||||
aino_test_init (aino);
|
||||
aino_test (aino);
|
||||
}
|
||||
|
||||
static a_inode *new_child_aino (Unit *unit, a_inode *base, char *rel)
|
||||
|
@ -1673,9 +1584,6 @@ static a_inode *lookup_child_aino (Unit *unit, a_inode *base, char *rel, uae_u32
|
|||
a_inode *c = base->child;
|
||||
int l0 = strlen (rel);
|
||||
|
||||
aino_test (base);
|
||||
aino_test (c);
|
||||
|
||||
if (base->dir == 0) {
|
||||
*err = ERROR_OBJECT_WRONG_TYPE;
|
||||
return 0;
|
||||
|
@ -1703,9 +1611,6 @@ static a_inode *lookup_child_aino_for_exnext (Unit *unit, a_inode *base, char *r
|
|||
int l0 = strlen (rel);
|
||||
int isarch = unit->volflags & MYVOLUMEINFO_ARCHIVE;
|
||||
|
||||
aino_test (base);
|
||||
aino_test (c);
|
||||
|
||||
*err = 0;
|
||||
while (c != 0) {
|
||||
int l1 = strlen (c->nname);
|
||||
|
@ -1753,8 +1658,6 @@ static a_inode *get_aino (Unit *unit, a_inode *base, const char *rel, uae_u32 *e
|
|||
a_inode *curr;
|
||||
int i;
|
||||
|
||||
aino_test (base);
|
||||
|
||||
*err = 0;
|
||||
TRACE(("get_path(%s,%s)\n", base->aname, rel));
|
||||
|
||||
|
@ -1912,7 +1815,6 @@ static Unit *startup_create_unit (UnitInfo *uinfo, int num)
|
|||
unit->rootnode.comment = 0;
|
||||
unit->rootnode.has_dbentry = 0;
|
||||
unit->rootnode.volflags = uinfo->volflags;
|
||||
aino_test_init (&unit->rootnode);
|
||||
unit->aino_cache_size = 0;
|
||||
for (i = 0; i < MAX_AINO_HASH; i++)
|
||||
unit->aino_hash[i] = 0;
|
||||
|
@ -2176,7 +2078,6 @@ static a_inode *find_aino (Unit *unit, uaecptr lock, const char *name, uae_u32 *
|
|||
if (a) {
|
||||
TRACE(("aino=\"%s\"\n", a->nname));
|
||||
}
|
||||
aino_test (a);
|
||||
return a;
|
||||
}
|
||||
|
||||
|
@ -3244,8 +3145,6 @@ static void do_find (Unit *unit, dpacket packet, int mode, int create, int fallb
|
|||
aino_created = 1;
|
||||
}
|
||||
|
||||
prepare_for_open (aino->nname);
|
||||
|
||||
openmode = (((mode & A_FIBF_READ) == 0 ? O_WRONLY
|
||||
: (mode & A_FIBF_WRITE) == 0 ? O_RDONLY
|
||||
: O_RDWR)
|
||||
|
@ -3307,7 +3206,6 @@ action_fh_from_lock (Unit *unit, dpacket packet)
|
|||
aino = &unit->rootnode;
|
||||
mode = aino->amigaos_mode; /* Use same mode for opened filehandle as existing Lock() */
|
||||
|
||||
prepare_for_open (aino->nname);
|
||||
TRACE ((" mode is %d\n", mode));
|
||||
openmode = (((mode & A_FIBF_READ) ? O_WRONLY
|
||||
: (mode & A_FIBF_WRITE) ? O_RDONLY
|
||||
|
@ -4287,7 +4185,7 @@ action_write_protect (Unit *unit, dpacket packet)
|
|||
|
||||
/* We don't want multiple interrupts to be active at the same time. I don't
|
||||
* know whether AmigaOS takes care of that, but this does. */
|
||||
static uae_sem_t singlethread_int_sem;
|
||||
static uae_sem_t singlethread_int_sem = 0;
|
||||
|
||||
static uae_u32 REGPARAM2 exter_int_helper (TrapContext *context)
|
||||
{
|
||||
|
@ -4529,6 +4427,7 @@ static void *filesys_thread (void *unit_v)
|
|||
/* Death message received. */
|
||||
uae_sem_post (&ui->reset_sync_sem);
|
||||
/* Die. */
|
||||
write_log("filesys_thread: Die\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -4551,6 +4450,7 @@ static void *filesys_thread (void *unit_v)
|
|||
write_comm_pipe_int (ui->back_pipe, (int)(get_long (ui->self->locklist)), 0);
|
||||
put_long (ui->self->locklist, 0);
|
||||
}
|
||||
write_log("filesys_thread: exit\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
@ -4631,8 +4531,16 @@ void filesys_start_threads (void)
|
|||
|
||||
void filesys_cleanup (void)
|
||||
{
|
||||
filesys_free_handles();
|
||||
filesys_prepare_reset();
|
||||
free_mountinfo ();
|
||||
|
||||
if(singlethread_int_sem != 0)
|
||||
uae_sem_destroy(&singlethread_int_sem);
|
||||
singlethread_int_sem = 0;
|
||||
|
||||
filesys_in_interrupt = 0;
|
||||
mountertask = 0;
|
||||
automountunit = -1;
|
||||
}
|
||||
|
||||
void filesys_free_handles(void)
|
||||
|
@ -4695,6 +4603,12 @@ void filesys_prepare_reset (void)
|
|||
write_comm_pipe_int (uip[i].unit_pipe, 0, 0);
|
||||
write_comm_pipe_int (uip[i].unit_pipe, 0, 1);
|
||||
uae_sem_wait (&uip[i].reset_sync_sem);
|
||||
uae_sem_destroy(&uip[i].reset_sync_sem);
|
||||
uip[i].reset_sync_sem = 0;
|
||||
destroy_comm_pipe(uip[i].unit_pipe);
|
||||
uip[i].unit_pipe = 0;
|
||||
destroy_comm_pipe(uip[i].back_pipe);
|
||||
uip[i].back_pipe = 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -4742,9 +4656,6 @@ static uae_u32 REGPARAM2 filesys_diagentry (TrapContext *context)
|
|||
* Resident structures and call InitResident() for them at the end of the
|
||||
* diag entry. */
|
||||
|
||||
#ifdef SCSIEMU
|
||||
resaddr = scsidev_startup(resaddr);
|
||||
#endif
|
||||
/* scan for Residents and return pointer to array of them */
|
||||
residents = resaddr;
|
||||
while (tmp < residents && tmp > start) {
|
||||
|
@ -5611,14 +5522,14 @@ uae_u8 *save_filesys (int num, int *len)
|
|||
save_string (ui->rootdir);
|
||||
save_string (ui->devname);
|
||||
save_string (ui->volname);
|
||||
save_string (/*ui->filesysdir*/ "");
|
||||
save_string ("");
|
||||
save_u8 (ui->bootpri);
|
||||
save_u8 (ui->readonly);
|
||||
save_u32 (ui->startup);
|
||||
save_u32 (filesys_configdev);
|
||||
if (type == FILESYS_VIRTUAL)
|
||||
dst = save_filesys_virtual (ui, dst);
|
||||
if (type == FILESYS_HARDFILE /*|| type == FILESYS_HARDFILE_RDB*/)
|
||||
if (type == FILESYS_HARDFILE)
|
||||
dst = save_filesys_hardfile (ui, dst);
|
||||
*len = dst - dstbak;
|
||||
return dstbak;
|
||||
|
@ -5644,7 +5555,7 @@ uae_u8 *restore_filesys (uae_u8 *src)
|
|||
ui = &mountinfo.ui[devno];
|
||||
ui->startup = restore_u32 ();
|
||||
filesys_configdev = restore_u32 ();
|
||||
if (type == FILESYS_HARDFILE /*|| type == FILESYS_HARDFILE_RDB*/)
|
||||
if (type == FILESYS_HARDFILE)
|
||||
src = restore_filesys_hardfile(ui, src);
|
||||
if (set_filesys_unit (devno, devname, volname, rootdir, readonly,
|
||||
ui->hf.secspertrack, ui->hf.surfaces, ui->hf.reservedblocks, ui->hf.blocksize,
|
||||
|
|
|
@ -183,8 +183,6 @@ STATIC_INLINE int fault_if_no_fpu(uae_u32 opcode, struct regstruct *regs, int pc
|
|||
static int get_fpu_version(void)
|
||||
{
|
||||
int v = 0;
|
||||
// if (currprefs.fpu_revision >= 0)
|
||||
// return currprefs.fpu_revision;
|
||||
switch (currprefs.fpu_model)
|
||||
{
|
||||
case 68881:
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "filesys.h"
|
||||
#include "autoconf.h"
|
||||
#include "fsusage.h"
|
||||
#include "scsidev.h"
|
||||
#include "fsdb.h"
|
||||
|
||||
/* The on-disk format is as follows:
|
||||
|
|
|
@ -3076,10 +3076,10 @@ main (int argc, char **argv)
|
|||
read_table68k ();
|
||||
do_merges ();
|
||||
|
||||
opcode_map = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_last_postfix = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_next_clev = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
counts = (unsigned long *) malloc (65536 * sizeof (unsigned long));
|
||||
opcode_map = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_last_postfix = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_next_clev = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
counts = (unsigned long *) xmalloc (65536 * sizeof (unsigned long));
|
||||
read_counts ();
|
||||
|
||||
/* It would be a lot nicer to put all in one file (we'd also get rid of
|
||||
|
@ -3098,23 +3098,23 @@ main (int argc, char **argv)
|
|||
noflags=0;
|
||||
generate_func (noflags);
|
||||
|
||||
free(opcode_map);
|
||||
free(opcode_last_postfix);
|
||||
free(opcode_next_clev);
|
||||
free(counts);
|
||||
xfree(opcode_map);
|
||||
xfree(opcode_last_postfix);
|
||||
xfree(opcode_next_clev);
|
||||
xfree(counts);
|
||||
|
||||
opcode_map = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_last_postfix = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_next_clev = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
counts = (unsigned long *) malloc (65536 * sizeof (unsigned long));
|
||||
opcode_map = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_last_postfix = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_next_clev = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
counts = (unsigned long *) xmalloc (65536 * sizeof (unsigned long));
|
||||
read_counts ();
|
||||
noflags=1;
|
||||
generate_func (noflags);
|
||||
|
||||
free(opcode_map);
|
||||
free(opcode_last_postfix);
|
||||
free(opcode_next_clev);
|
||||
free(counts);
|
||||
xfree(opcode_map);
|
||||
xfree(opcode_last_postfix);
|
||||
xfree(opcode_next_clev);
|
||||
xfree(counts);
|
||||
|
||||
printf ("#endif\n");
|
||||
fprintf (stblfile, "#endif\n");
|
||||
|
|
|
@ -610,8 +610,7 @@ static void genmov16(uae_u32 opcode, struct instr *curi)
|
|||
comprintf("\tuae_u16 dstreg=((%s)>>12)&0x07;\n", gen_nextiword());
|
||||
comprintf("\tmov_l_rr(src,8+srcreg);\n");
|
||||
comprintf("\tmov_l_rr(dst,8+dstreg);\n");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
/* Other variants */
|
||||
genamode (curi->smode, "srcreg", curi->size, "src", 0, 2);
|
||||
genamode (curi->dmode, "dstreg", curi->size, "dst", 0, 2);
|
||||
|
@ -627,8 +626,7 @@ static void genmov16(uae_u32 opcode, struct instr *curi)
|
|||
comprintf("\tif (srcreg != dstreg)\n");
|
||||
comprintf("\tarm_ADD_l_ri8(srcreg+8,16);\n");
|
||||
comprintf("\tarm_ADD_l_ri8(dstreg+8,16);\n");
|
||||
}
|
||||
else if ((opcode & 0xfff8) == 0xf600)
|
||||
} else if ((opcode & 0xfff8) == 0xf600)
|
||||
comprintf("\tarm_ADD_l_ri8(srcreg+8,16);\n");
|
||||
else if ((opcode & 0xfff8) == 0xf608)
|
||||
comprintf("\tarm_ADD_l_ri8(dstreg+8,16);\n");
|
||||
|
@ -675,7 +673,7 @@ genmovemel (uae_u16 opcode)
|
|||
comprintf ("\tuae_u16 mask = %s;\n", gen_nextiword ());
|
||||
comprintf ("\tint native=scratchie++;\n");
|
||||
comprintf ("\tint i;\n");
|
||||
comprintf ("\tsigned char offset=0;\n");
|
||||
comprintf ("\tint offset=0;\n");
|
||||
genamode (table68k[opcode].dmode, "dstreg", table68k[opcode].size, "src", 2, 1);
|
||||
comprintf("\tif (1 && !special_mem) {\n");
|
||||
|
||||
|
@ -770,8 +768,7 @@ genmovemle (uae_u16 opcode)
|
|||
break;
|
||||
default: abort();
|
||||
}
|
||||
}
|
||||
else { /* Pre-decrement */
|
||||
} else { /* Pre-decrement */
|
||||
comprintf("\tfor (i=0;i<16;i++) {\n"
|
||||
"\t\tif ((mask>>i)&1) {\n");
|
||||
switch(table68k[opcode].size) {
|
||||
|
@ -872,8 +869,8 @@ genflags (flagtypes type, wordsizes size, char *value, char *src, char *dst)
|
|||
{
|
||||
char* op;
|
||||
switch(type) {
|
||||
case flag_add: op="add"; break; // nf
|
||||
case flag_sub: op="sub"; break; // nf
|
||||
case flag_add: op="add"; break;
|
||||
case flag_sub: op="sub"; break;
|
||||
default: abort();
|
||||
}
|
||||
switch (size)
|
||||
|
@ -899,7 +896,7 @@ genflags (flagtypes type, wordsizes size, char *value, char *src, char *dst)
|
|||
case sz_byte:
|
||||
comprintf("if (kill_rodent(dst)) {\n");
|
||||
comprintf("\tzero_extend_8_rr(scratchie,%s);\n",src);
|
||||
comprintf("\tor_l_ri(scratchie,0xffffff00);\n"); // nf
|
||||
comprintf("\tor_l_ri(scratchie,0xffffff00);\n");
|
||||
comprintf("\tarm_AND_l(%s,scratchie);\n",dst);
|
||||
comprintf("\tforget_about(scratchie);\n");
|
||||
comprintf("\t} else \n"
|
||||
|
@ -908,7 +905,7 @@ genflags (flagtypes type, wordsizes size, char *value, char *src, char *dst)
|
|||
case sz_word:
|
||||
comprintf("if (kill_rodent(dst)) {\n");
|
||||
comprintf("\tzero_extend_16_rr(scratchie,%s);\n",src);
|
||||
comprintf("\tor_l_ri(scratchie,0xffff0000);\n"); // nf
|
||||
comprintf("\tor_l_ri(scratchie,0xffff0000);\n");
|
||||
comprintf("\tarm_AND_l(%s,scratchie);\n",dst);
|
||||
comprintf("\tforget_about(scratchie);\n");
|
||||
comprintf("\t} else \n"
|
||||
|
@ -927,7 +924,7 @@ genflags (flagtypes type, wordsizes size, char *value, char *src, char *dst)
|
|||
case sz_byte:
|
||||
comprintf("if (kill_rodent(dst)) {\n");
|
||||
comprintf("\tzero_extend_8_rr(scratchie,%s);\n",src);
|
||||
comprintf("\tand_l_ri(%s,0xffffff00);\n",dst); // nf
|
||||
comprintf("\tand_l_ri(%s,0xffffff00);\n",dst);
|
||||
comprintf("\tarm_ORR_l(%s,scratchie);\n",dst);
|
||||
comprintf("\tforget_about(scratchie);\n");
|
||||
comprintf("\t} else \n"
|
||||
|
@ -936,7 +933,7 @@ genflags (flagtypes type, wordsizes size, char *value, char *src, char *dst)
|
|||
case sz_word:
|
||||
comprintf("if (kill_rodent(dst)) {\n");
|
||||
comprintf("\tzero_extend_16_rr(scratchie,%s);\n",src);
|
||||
comprintf("\tand_l_ri(%s,0xffff0000);\n",dst); // nf
|
||||
comprintf("\tand_l_ri(%s,0xffff0000);\n",dst);
|
||||
comprintf("\tarm_ORR_l(%s,scratchie);\n",dst);
|
||||
comprintf("\tforget_about(scratchie);\n");
|
||||
comprintf("\t} else \n"
|
||||
|
@ -955,8 +952,8 @@ genflags (flagtypes type, wordsizes size, char *value, char *src, char *dst)
|
|||
{
|
||||
char* op;
|
||||
switch(type) {
|
||||
case flag_or: op="ORR"; break; // nf
|
||||
case flag_eor: op="EOR"; break; // nf
|
||||
case flag_or: op="ORR"; break;
|
||||
case flag_eor: op="EOR"; break;
|
||||
default: abort();
|
||||
}
|
||||
switch (size)
|
||||
|
@ -1752,8 +1749,7 @@ gen_opcode (unsigned long int opcode)
|
|||
default: abort(); /* Seems this only comes in word flavour */
|
||||
}
|
||||
comprintf("\tsub_l_ri(offs,m68k_pc_offset-m68k_pc_offset_thisinst-2);\n");
|
||||
comprintf("\tarm_ADD_l_ri(offs,(uintptr)comp_pc_p);\n");
|
||||
/* New PC,
|
||||
comprintf("\tarm_ADD_l_ri(offs,(uintptr)comp_pc_p);\n"); /* New PC,
|
||||
once the
|
||||
offset_68k is
|
||||
* also added */
|
||||
|
@ -3031,10 +3027,10 @@ main (int argc, char **argv)
|
|||
read_table68k ();
|
||||
do_merges ();
|
||||
|
||||
opcode_map = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_last_postfix = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_next_clev = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
counts = (unsigned long *) malloc (65536 * sizeof (unsigned long));
|
||||
opcode_map = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_last_postfix = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_next_clev = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
counts = (unsigned long *) xmalloc (65536 * sizeof (unsigned long));
|
||||
read_counts ();
|
||||
|
||||
/* It would be a lot nicer to put all in one file (we'd also get rid of
|
||||
|
@ -3053,23 +3049,23 @@ main (int argc, char **argv)
|
|||
noflags=0;
|
||||
generate_func (noflags);
|
||||
|
||||
free(opcode_map);
|
||||
free(opcode_last_postfix);
|
||||
free(opcode_next_clev);
|
||||
free(counts);
|
||||
xfree(opcode_map);
|
||||
xfree(opcode_last_postfix);
|
||||
xfree(opcode_next_clev);
|
||||
xfree(counts);
|
||||
|
||||
opcode_map = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_last_postfix = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_next_clev = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
counts = (unsigned long *) malloc (65536 * sizeof (unsigned long));
|
||||
opcode_map = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_last_postfix = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_next_clev = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
counts = (unsigned long *) xmalloc (65536 * sizeof (unsigned long));
|
||||
read_counts ();
|
||||
noflags=1;
|
||||
generate_func (noflags);
|
||||
|
||||
free(opcode_map);
|
||||
free(opcode_last_postfix);
|
||||
free(opcode_next_clev);
|
||||
free(counts);
|
||||
xfree(opcode_map);
|
||||
xfree(opcode_last_postfix);
|
||||
xfree(opcode_next_clev);
|
||||
xfree(counts);
|
||||
|
||||
printf ("#endif\n");
|
||||
fprintf (stblfile, "#endif\n");
|
||||
|
|
|
@ -2959,10 +2959,10 @@ int main (int argc, char **argv)
|
|||
read_table68k ();
|
||||
do_merges ();
|
||||
|
||||
opcode_map = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_last_postfix = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_next_clev = (int *) malloc (sizeof (int) * nr_cpuop_funcs);
|
||||
counts = (unsigned long *) malloc (65536 * sizeof (unsigned long));
|
||||
opcode_map = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_last_postfix = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
opcode_next_clev = (int *) xmalloc (sizeof (int) * nr_cpuop_funcs);
|
||||
counts = (unsigned long *) xmalloc (65536 * sizeof (unsigned long));
|
||||
read_counts ();
|
||||
|
||||
/* It would be a lot nicer to put all in one file (we'd also get rid of
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
#include "gui.h"
|
||||
#include "uae.h"
|
||||
|
||||
#define FILESYS_MAX_BLOCKSIZE 512
|
||||
|
||||
#define CMD_INVALID 0
|
||||
#define CMD_RESET 1
|
||||
#define CMD_READ 2
|
||||
|
@ -80,7 +78,7 @@ struct hardfileprivdata {
|
|||
int changenum;
|
||||
};
|
||||
|
||||
static uae_sem_t change_sem;
|
||||
static uae_sem_t change_sem = 0;
|
||||
|
||||
static struct hardfileprivdata hardfpd[MAX_FILESYSTEM_UNITS];
|
||||
|
||||
|
@ -103,7 +101,7 @@ static uae_u64 cmd_read (struct hardfiledata *hfd, uaecptr dataptr, uae_u64 offs
|
|||
}
|
||||
static uae_u64 cmd_writex (struct hardfiledata *hfd, uae_u8 *dataptr, uae_u64 offset, uae_u64 len)
|
||||
{
|
||||
gui_hd_led (1);
|
||||
gui_hd_led (2);
|
||||
write_log ("cmd_write: %p %04.4x-%08.8x %08.8x\n", dataptr, (uae_u32)(offset >> 32), (uae_u32)offset, (uae_u32)(offset / hfd->blocksize), (uae_u32)len, (uae_u32)(len / hfd->blocksize));
|
||||
fseek (hfd->fd, offset, SEEK_SET);
|
||||
return fwrite (dataptr, 1, len, hfd->fd);
|
||||
|
@ -562,6 +560,7 @@ static void *hardfile_thread (void *devs)
|
|||
hfpd->thread_running = 0;
|
||||
uae_sem_post (&hfpd->sync_sem);
|
||||
uae_sem_post (&change_sem);
|
||||
write_log("hardfile_thread: leave\n");
|
||||
return 0;
|
||||
} else if (hardfile_do_io (get_hardfile_data (hfpd - &hardfpd[0]), hfpd, request) == 0) {
|
||||
put_byte (request + 30, get_byte (request + 30) & ~1);
|
||||
|
@ -572,6 +571,7 @@ static void *hardfile_thread (void *devs)
|
|||
}
|
||||
uae_sem_post (&change_sem);
|
||||
}
|
||||
write_log("hardfile_thread: exit\n");
|
||||
}
|
||||
|
||||
void hardfile_reset (void)
|
||||
|
@ -584,10 +584,19 @@ void hardfile_reset (void)
|
|||
if (hfpd->base && valid_address(hfpd->base, 36) && get_word(hfpd->base + 32) > 0) {
|
||||
for (j = 0; j < MAX_ASYNC_REQUESTS; j++) {
|
||||
uaecptr request;
|
||||
if ((request = hfpd->d_request[i]))
|
||||
if ((request = hfpd->d_request[j]))
|
||||
abort_async (hfpd, request, 0, 0);
|
||||
}
|
||||
}
|
||||
if(hfpd->thread_running)
|
||||
{
|
||||
uae_sem_wait (&change_sem);
|
||||
write_comm_pipe_u32(&hfpd->requests, 0, 1);
|
||||
uae_sem_post (&change_sem);
|
||||
uae_sem_wait (&hfpd->sync_sem);
|
||||
uae_sem_destroy (&hfpd->sync_sem);
|
||||
destroy_comm_pipe (&hfpd->requests);
|
||||
}
|
||||
memset (hfpd, 0, sizeof (struct hardfileprivdata));
|
||||
}
|
||||
}
|
||||
|
@ -597,6 +606,9 @@ void hardfile_install (void)
|
|||
uae_u32 functable, datatable;
|
||||
uae_u32 initcode, openfunc, closefunc, expungefunc;
|
||||
uae_u32 beginiofunc, abortiofunc;
|
||||
if(change_sem != 0)
|
||||
uae_sem_destroy(&change_sem);
|
||||
change_sem = 0;
|
||||
uae_sem_init (&change_sem, 0, 1);
|
||||
|
||||
ROM_hardfile_resname = ds ("uaehf.device");
|
||||
|
|
|
@ -34,6 +34,16 @@ extern int audio_activate(void);
|
|||
|
||||
enum {
|
||||
SND_MONO, SND_STEREO, SND_4CH_CLONEDSTEREO, SND_4CH, SND_6CH_CLONEDSTEREO, SND_6CH, SND_NONE };
|
||||
STATIC_INLINE int get_audio_nativechannels(void)
|
||||
{
|
||||
int ch[] = { 1, 2, 4, 4, 6, 6, 0 };
|
||||
return ch[currprefs.sound_stereo];
|
||||
}
|
||||
STATIC_INLINE int get_audio_amigachannels(void)
|
||||
{
|
||||
int ch[] = { 1, 2, 2, 4, 2, 4, 0 };
|
||||
return ch[currprefs.sound_stereo];
|
||||
}
|
||||
STATIC_INLINE int get_audio_ismono(void)
|
||||
{
|
||||
if (currprefs.sound_stereo == 0)
|
||||
|
|
|
@ -69,7 +69,6 @@ extern void filesys_start_threads (void);
|
|||
extern void filesys_flush_cache (void);
|
||||
extern void filesys_free_handles (void);
|
||||
extern void filesys_vsync (void);
|
||||
extern void free_mountinfo (void);
|
||||
|
||||
extern void filesys_install (void);
|
||||
extern void filesys_install_code (void);
|
||||
|
|
853
src/include/blit_test.h
Normal file
853
src/include/blit_test.h
Normal file
|
@ -0,0 +1,853 @@
|
|||
static uae_u32 blit_func_0x0(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return 0;
|
||||
}
|
||||
static uae_u32 blit_func_0x1(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca | srcb | srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x2(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc & ~(srca | srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x3(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca | srcb);
|
||||
}
|
||||
static uae_u32 blit_func_0x4(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb & ~(srca | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x5(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca | srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x6(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srca & (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x7(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca | (srcb & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x8(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srca & srcb & srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x9(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca | (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xa(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srca & srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xb(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca | (srcb & ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xc(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srca & srcb);
|
||||
}
|
||||
static uae_u32 blit_func_0xd(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca | (~srcb & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xe(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srca & (srcb | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xf(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~srca;
|
||||
}
|
||||
static uae_u32 blit_func_0x10(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & ~(srcb | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x11(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb | srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x12(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srcb & (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x13(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb | (srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x14(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srcc & (srca ^ srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x15(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc | (srca & srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x16(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ ((srca & srcb) | (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x17(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ ((srca ^ srcb) & (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x18(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca ^ srcb) & (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x19(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (~srcc | (srca & srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x1a(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcc | (srca & srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x1b(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcc | ~(srca ^ srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x1c(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb | (srca & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x1d(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb | ~(srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x1e(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x1f(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca & (srcb | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x20(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & ~srcb & srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x21(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb | (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x22(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srcb & srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x23(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb | (srca & ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x24(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca ^ srcb) & (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x25(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcc | (srca & srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x26(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srcc | (srca & srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x27(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ (srcc & (srca ^ srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x28(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc & (srca ^ srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x29(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ srcb ^ (srcc | (srca & srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x2a(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc & ~(srca & srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x2b(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ ((srca ^ srcb) & (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x2c(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srca & (srcb | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x2d(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb | ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x2e(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb | (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x2f(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca & (srcb | ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x30(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & ~srcb);
|
||||
}
|
||||
static uae_u32 blit_func_0x31(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb | (~srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x32(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srcb & (srca | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x33(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~srcb;
|
||||
}
|
||||
static uae_u32 blit_func_0x34(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srca | (srcb & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x35(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srca | ~(srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x36(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srca | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x37(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb & (srca | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x38(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb & (srca | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x39(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srca | ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x3a(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srca | (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x3b(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb & (srca | ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x3c(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ srcb);
|
||||
}
|
||||
static uae_u32 blit_func_0x3d(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb | ~(srca | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x3e(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb | (srca ^ (srca | srcc))));
|
||||
}
|
||||
static uae_u32 blit_func_0x3f(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca & srcb);
|
||||
}
|
||||
static uae_u32 blit_func_0x40(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & srcb & ~srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x41(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc | (srca ^ srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x42(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca ^ srcc) & (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x43(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcb | (srca & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x44(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb & ~srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x45(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc | (srca & ~srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x46(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srcb | (srca & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x47(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ (srcb & (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x48(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb & (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x49(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ srcc ^ (srcb | (srca & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x4a(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srca & (srcb | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x4b(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcb | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x4c(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb & ~(srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x4d(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ ((srca ^ srcb) | ~(srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x4e(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcc | (srca ^ srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x4f(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca & (~srcb | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x50(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & ~srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x51(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc | (~srca & srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x52(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srca | (srcb & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x53(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ (srca & (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x54(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srcc & (srca | srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x55(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~srcc;
|
||||
}
|
||||
static uae_u32 blit_func_0x56(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srca | srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x57(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc & (srca | srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x58(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcc & (srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x59(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srca | ~srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x5a(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x5b(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcc | ~(srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x5c(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srca | (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x5d(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc & (srca | ~srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x5e(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcc | (srca ^ (srca | srcb))));
|
||||
}
|
||||
static uae_u32 blit_func_0x5f(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca & srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x60(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x61(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ srcc ^ (srca | (srcb & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x62(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srcb & (srca | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x63(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (~srca | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x64(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srcc & (srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x65(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (~srca | srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x66(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x67(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srcc | ~(srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x68(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca & srcb) ^ (srcc & (srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x69(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ srcb ^ srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x6a(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srca & srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x6b(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ srcb ^ (srcc & (srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x6c(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x6d(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ srcc ^ (srcb & (srca | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x6e(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((~srca & srcb) | (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x6f(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srca | (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x70(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & ~(srcb & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x71(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ ((srca ^ srcb) | (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x72(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srcc | (srca ^ srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x73(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb & (~srca | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x74(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srcb | (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x75(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc & (~srca | srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x76(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srcc | (srca ^ (srca & srcb))));
|
||||
}
|
||||
static uae_u32 blit_func_0x77(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb & srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x78(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x79(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ srcc ^ (srca & (srcb | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x7a(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca & ~srcb) | (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x7b(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srcb | (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x7c(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca ^ srcb) | (srca & ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x7d(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srcc | (srca ^ srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x7e(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca ^ srcb) | (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x7f(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca & srcb & srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x80(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & srcb & srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x81(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~((srca ^ srcb) | (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x82(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc & ~(srca ^ srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x83(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcb | (srca & ~srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x84(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb & ~(srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x85(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcc | (srca & ~srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x86(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ srcc ^ (srca & (srcb | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x87(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ (srcb & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x88(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb & srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x89(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (~srcc & (~srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x8a(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc & (~srca | srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x8b(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcb | (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x8c(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb & (~srca | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x8d(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcc | (srca ^ srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x8e(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ ((srca ^ srcb) | (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x8f(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srca | (srcb & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x90(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & ~(srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x91(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (~srcc | (~srca & srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x92(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ srcc ^ (srcb & (srca | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x93(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ (srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x94(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ srcb ^ (srcc & (srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x95(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc ^ (srca & srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x96(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ srcb ^ srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x97(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ srcb ^ (srcc | ~(srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x98(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (~srcc & (srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x99(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0x9a(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srca & ~srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0x9b(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ (srcc & (srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0x9c(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srca & ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0x9d(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc ^ (srcb & (srca | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x9e(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ srcc ^ (srca | (srcb & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0x9f(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca & (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xa0(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xa1(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcc & (srca | ~srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0xa2(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc & (srca | ~srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xa3(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (~srca | (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xa4(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcc & (srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0xa5(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xa6(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (~srca & srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xa7(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ (srcc & (srca | srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0xa8(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc & (srca | srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xa9(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc ^ (srca | srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xaa(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return srcc;
|
||||
}
|
||||
static uae_u32 blit_func_0xab(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc | ~(srca | srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xac(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srca & (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xad(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc ^ (srca | (srcb & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xae(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc | (~srca & srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xaf(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srca | srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xb0(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & (~srcb | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xb1(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ (srcc | (srca ^ srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0xb2(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ ((srca ^ srcc) & (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xb3(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srcb | (srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xb4(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb & ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xb5(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc ^ (srca & (srcb | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xb6(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ srcc ^ (srcb | (srca & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xb7(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb & (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xb8(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcb & (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xb9(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc ^ (srcb | (srca & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xba(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc | (srca & ~srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xbb(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srcb | srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xbc(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca ^ srcb) | (srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xbd(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca ^ srcb) | ~(srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xbe(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc | (srca ^ srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xbf(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc | ~(srca & srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xc0(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & srcb);
|
||||
}
|
||||
static uae_u32 blit_func_0xc1(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcb & (srca | ~srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xc2(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcb & (srca | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xc3(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ srcb);
|
||||
}
|
||||
static uae_u32 blit_func_0xc4(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb & (srca | ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xc5(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ (srca | (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xc6(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (~srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xc7(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ (srcb & (srca | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xc8(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb & (srca | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xc9(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ (srca | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xca(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srca & (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xcb(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ (srca | (srcb & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xcc(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return srcb;
|
||||
}
|
||||
static uae_u32 blit_func_0xcd(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb | ~(srca | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xce(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb | (~srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xcf(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srca | srcb);
|
||||
}
|
||||
static uae_u32 blit_func_0xd0(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & (srcb | ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xd1(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ (srcb | (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xd2(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (~srcb & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xd3(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ (srca & (srcb | srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xd4(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ ((srca ^ srcb) & (srcb ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xd5(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srcc | (srca & srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xd6(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ srcb ^ (srcc | (srca & srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0xd7(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcc & (srca ^ srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xd8(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ (srcc & (srca ^ srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0xd9(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srcb ^ (srcc | (srca & srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0xda(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca & srcb) | (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xdb(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~((srca ^ srcb) & (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xdc(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb | (srca & ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xdd(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb | ~srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xde(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb | (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xdf(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb | ~(srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xe0(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca & (srcb | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xe1(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ (srcb | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xe2(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc ^ (srcb & (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xe3(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ (srcb | (srca & srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xe4(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb ^ (srcc & (srca ^ srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0xe5(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~(srca ^ (srcc | (srca & srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0xe6(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ((srca & srcb) | (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xe7(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return ~((srca ^ srcb) & (srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xe8(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ ((srca ^ srcb) & (srca ^ srcc)));
|
||||
}
|
||||
static uae_u32 blit_func_0xe9(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca ^ srcb ^ (~srcc | (srca & srcb)));
|
||||
}
|
||||
static uae_u32 blit_func_0xea(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc | (srca & srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xeb(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcc | ~(srca ^ srcb));
|
||||
}
|
||||
static uae_u32 blit_func_0xec(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb | (srca & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xed(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb | ~(srca ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xee(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srcb | srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xef(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (~srca | srcb | srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xf0(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return srca;
|
||||
}
|
||||
static uae_u32 blit_func_0xf1(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | ~(srcb | srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xf2(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | (~srcb & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xf3(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | ~srcb);
|
||||
}
|
||||
static uae_u32 blit_func_0xf4(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | (srcb & ~srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xf5(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | ~srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xf6(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | (srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xf7(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | ~(srcb & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xf8(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | (srcb & srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xf9(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | ~(srcb ^ srcc));
|
||||
}
|
||||
static uae_u32 blit_func_0xfa(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xfb(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | ~srcb | srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xfc(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | srcb);
|
||||
}
|
||||
static uae_u32 blit_func_0xfd(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | srcb | ~srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xfe(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return (srca | srcb | srcc);
|
||||
}
|
||||
static uae_u32 blit_func_0xff(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc) {
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
typedef uae_u32 (*blitter_op_func)(const uae_u32 srca, const uae_u32 srcb, const uae_u32 srcc);
|
||||
|
||||
static blitter_op_func blitter_func_tbl[256]={
|
||||
blit_func_0x0, blit_func_0x1, blit_func_0x2, blit_func_0x3,
|
||||
blit_func_0x4, blit_func_0x5, blit_func_0x6, blit_func_0x7,
|
||||
blit_func_0x8, blit_func_0x9, blit_func_0xa, blit_func_0xb,
|
||||
blit_func_0xc, blit_func_0xd, blit_func_0xe, blit_func_0xf,
|
||||
|
||||
blit_func_0x10, blit_func_0x11, blit_func_0x12, blit_func_0x13,
|
||||
blit_func_0x14, blit_func_0x15, blit_func_0x16, blit_func_0x17,
|
||||
blit_func_0x18, blit_func_0x19, blit_func_0x1a, blit_func_0x1b,
|
||||
blit_func_0x1c, blit_func_0x1d, blit_func_0x1e, blit_func_0x1f,
|
||||
|
||||
blit_func_0x20, blit_func_0x21, blit_func_0x22, blit_func_0x23,
|
||||
blit_func_0x24, blit_func_0x25, blit_func_0x26, blit_func_0x27,
|
||||
blit_func_0x28, blit_func_0x29, blit_func_0x2a, blit_func_0x2b,
|
||||
blit_func_0x2c, blit_func_0x2d, blit_func_0x2e, blit_func_0x2f,
|
||||
|
||||
blit_func_0x30, blit_func_0x31, blit_func_0x32, blit_func_0x33,
|
||||
blit_func_0x34, blit_func_0x35, blit_func_0x36, blit_func_0x37,
|
||||
blit_func_0x38, blit_func_0x39, blit_func_0x3a, blit_func_0x3b,
|
||||
blit_func_0x3c, blit_func_0x3d, blit_func_0x3e, blit_func_0x3f,
|
||||
|
||||
blit_func_0x40, blit_func_0x41, blit_func_0x42, blit_func_0x43,
|
||||
blit_func_0x44, blit_func_0x45, blit_func_0x46, blit_func_0x47,
|
||||
blit_func_0x48, blit_func_0x49, blit_func_0x4a, blit_func_0x4b,
|
||||
blit_func_0x4c, blit_func_0x4d, blit_func_0x4e, blit_func_0x4f,
|
||||
|
||||
blit_func_0x50, blit_func_0x51, blit_func_0x52, blit_func_0x53,
|
||||
blit_func_0x54, blit_func_0x55, blit_func_0x56, blit_func_0x57,
|
||||
blit_func_0x58, blit_func_0x59, blit_func_0x5a, blit_func_0x5b,
|
||||
blit_func_0x5c, blit_func_0x5d, blit_func_0x5e, blit_func_0x5f,
|
||||
|
||||
blit_func_0x60, blit_func_0x61, blit_func_0x62, blit_func_0x63,
|
||||
blit_func_0x64, blit_func_0x65, blit_func_0x66, blit_func_0x67,
|
||||
blit_func_0x68, blit_func_0x69, blit_func_0x6a, blit_func_0x6b,
|
||||
blit_func_0x6c, blit_func_0x6d, blit_func_0x6e, blit_func_0x6f,
|
||||
|
||||
blit_func_0x70, blit_func_0x71, blit_func_0x72, blit_func_0x73,
|
||||
blit_func_0x74, blit_func_0x75, blit_func_0x76, blit_func_0x77,
|
||||
blit_func_0x78, blit_func_0x79, blit_func_0x7a, blit_func_0x7b,
|
||||
blit_func_0x7c, blit_func_0x7d, blit_func_0x7e, blit_func_0x7f,
|
||||
|
||||
blit_func_0x80, blit_func_0x81, blit_func_0x82, blit_func_0x83,
|
||||
blit_func_0x84, blit_func_0x85, blit_func_0x86, blit_func_0x87,
|
||||
blit_func_0x88, blit_func_0x89, blit_func_0x8a, blit_func_0x8b,
|
||||
blit_func_0x8c, blit_func_0x8d, blit_func_0x8e, blit_func_0x8f,
|
||||
|
||||
blit_func_0x90, blit_func_0x91, blit_func_0x92, blit_func_0x93,
|
||||
blit_func_0x94, blit_func_0x95, blit_func_0x96, blit_func_0x97,
|
||||
blit_func_0x98, blit_func_0x99, blit_func_0x9a, blit_func_0x9b,
|
||||
blit_func_0x9c, blit_func_0x9d, blit_func_0x9e, blit_func_0x9f,
|
||||
|
||||
blit_func_0xa0, blit_func_0xa1, blit_func_0xa2, blit_func_0xa3,
|
||||
blit_func_0xa4, blit_func_0xa5, blit_func_0xa6, blit_func_0xa7,
|
||||
blit_func_0xa8, blit_func_0xa9, blit_func_0xaa, blit_func_0xab,
|
||||
blit_func_0xac, blit_func_0xad, blit_func_0xae, blit_func_0xaf,
|
||||
|
||||
blit_func_0xb0, blit_func_0xb1, blit_func_0xb2, blit_func_0xb3,
|
||||
blit_func_0xb4, blit_func_0xb5, blit_func_0xb6, blit_func_0xb7,
|
||||
blit_func_0xb8, blit_func_0xb9, blit_func_0xba, blit_func_0xbb,
|
||||
blit_func_0xbc, blit_func_0xbd, blit_func_0xbe, blit_func_0xbf,
|
||||
|
||||
blit_func_0xc0, blit_func_0xc1, blit_func_0xc2, blit_func_0xc3,
|
||||
blit_func_0xc4, blit_func_0xc5, blit_func_0xc6, blit_func_0xc7,
|
||||
blit_func_0xc8, blit_func_0xc9, blit_func_0xca, blit_func_0xcb,
|
||||
blit_func_0xcc, blit_func_0xcd, blit_func_0xce, blit_func_0xcf,
|
||||
|
||||
blit_func_0xd0, blit_func_0xd1, blit_func_0xd2, blit_func_0xd3,
|
||||
blit_func_0xd4, blit_func_0xd5, blit_func_0xd6, blit_func_0xd7,
|
||||
blit_func_0xd8, blit_func_0xd9, blit_func_0xda, blit_func_0xdb,
|
||||
blit_func_0xdc, blit_func_0xdd, blit_func_0xde, blit_func_0xdf,
|
||||
|
||||
blit_func_0xe0, blit_func_0xe1, blit_func_0xe2, blit_func_0xe3,
|
||||
blit_func_0xe4, blit_func_0xe5, blit_func_0xe6, blit_func_0xe7,
|
||||
blit_func_0xe8, blit_func_0xe9, blit_func_0xea, blit_func_0xeb,
|
||||
blit_func_0xec, blit_func_0xed, blit_func_0xee, blit_func_0xef,
|
||||
|
||||
blit_func_0xf0, blit_func_0xf1, blit_func_0xf2, blit_func_0xf3,
|
||||
blit_func_0xf4, blit_func_0xf5, blit_func_0xf6, blit_func_0xf7,
|
||||
blit_func_0xf8, blit_func_0xf9, blit_func_0xfa, blit_func_0xfb,
|
||||
blit_func_0xfc, blit_func_0xfd, blit_func_0xfe, blit_func_0xff
|
||||
|
||||
};
|
|
@ -42,4 +42,3 @@ extern blitter_func blitdofast_fa;
|
|||
extern blitter_func blitdofast_desc_fa;
|
||||
extern blitter_func blitdofast_fc;
|
||||
extern blitter_func blitdofast_desc_fc;
|
||||
extern blitter_func blitdofast_fe;
|
||||
|
|
|
@ -15,18 +15,18 @@ struct bltinfo {
|
|||
};
|
||||
|
||||
extern enum blitter_states {
|
||||
BLT_done, BLT_init, BLT_read, BLT_work, BLT_write, BLT_next, BLT_waitDMA
|
||||
BLT_done, BLT_init, BLT_read, BLT_work, BLT_write, BLT_next
|
||||
} bltstate;
|
||||
|
||||
extern struct bltinfo blt_info;
|
||||
|
||||
extern uae_u16 bltsize;
|
||||
extern uae_u16 bltcon0,bltcon1;
|
||||
extern int blinea_shift, blitsign;
|
||||
extern int blinea_shift;
|
||||
extern uae_u32 bltapt,bltbpt,bltcpt,bltdpt;
|
||||
extern uae_u32 preva, prevb;
|
||||
|
||||
extern void maybe_blit (int);
|
||||
extern void reset_blit (int);
|
||||
extern int blitnasty (void);
|
||||
extern void blitter_handler (uae_u32);
|
||||
extern void build_blitfilltable (void);
|
||||
|
@ -41,8 +41,3 @@ typedef void blitter_func(uaecptr, uaecptr, uaecptr, uaecptr, struct bltinfo *_G
|
|||
extern blitter_func * const blitfunc_dofast[256];
|
||||
extern blitter_func * const blitfunc_dofast_desc[256];
|
||||
extern uae_u32 blit_masktable[BLITTER_MAX_WORDS];
|
||||
|
||||
// New vars for blitter mode "partial"
|
||||
extern void blitter_do_partial(int do_all);
|
||||
extern void blitter_dma_disabled(void);
|
||||
extern void blitter_dma_enabled(void);
|
||||
|
|
|
@ -29,7 +29,7 @@ typedef struct {
|
|||
volatile int reader_waiting;
|
||||
} smp_comm_pipe;
|
||||
|
||||
static __inline__ void init_comm_pipe (smp_comm_pipe *p, int size, int chunks)
|
||||
STATIC_INLINE void init_comm_pipe (smp_comm_pipe *p, int size, int chunks)
|
||||
{
|
||||
memset (p, 0, sizeof (*p));
|
||||
p->data = (uae_pt *)malloc (size*sizeof (uae_pt));
|
||||
|
@ -43,14 +43,19 @@ static __inline__ void init_comm_pipe (smp_comm_pipe *p, int size, int chunks)
|
|||
uae_sem_init (&p->writer_wait, 0, 0);
|
||||
}
|
||||
|
||||
static __inline__ void destroy_comm_pipe (smp_comm_pipe *p)
|
||||
STATIC_INLINE void destroy_comm_pipe (smp_comm_pipe *p)
|
||||
{
|
||||
uae_sem_destroy (&p->lock);
|
||||
uae_sem_destroy (&p->reader_wait);
|
||||
uae_sem_destroy (&p->writer_wait);
|
||||
p->lock = 0;
|
||||
p->reader_wait = 0;
|
||||
p->writer_wait = 0;
|
||||
if(p->size > 0 && p->data != NULL)
|
||||
free(p->data);
|
||||
}
|
||||
|
||||
static __inline__ void maybe_wake_reader (smp_comm_pipe *p, int no_buffer)
|
||||
STATIC_INLINE void maybe_wake_reader (smp_comm_pipe *p, int no_buffer)
|
||||
{
|
||||
if (p->reader_waiting
|
||||
&& (no_buffer || ((p->wrp - p->rdp + p->size) % p->size) >= p->chunks))
|
||||
|
@ -60,7 +65,7 @@ static __inline__ void maybe_wake_reader (smp_comm_pipe *p, int no_buffer)
|
|||
}
|
||||
}
|
||||
|
||||
static __inline__ void write_comm_pipe_pt (smp_comm_pipe *p, uae_pt data, int no_buffer)
|
||||
STATIC_INLINE void write_comm_pipe_pt (smp_comm_pipe *p, uae_pt data, int no_buffer)
|
||||
{
|
||||
int nxwrp = (p->wrp + 1) % p->size;
|
||||
|
||||
|
@ -89,7 +94,7 @@ static __inline__ void write_comm_pipe_pt (smp_comm_pipe *p, uae_pt data, int no
|
|||
uae_sem_post (&p->lock);
|
||||
}
|
||||
|
||||
static __inline__ uae_pt read_comm_pipe_pt_blocking (smp_comm_pipe *p)
|
||||
STATIC_INLINE uae_pt read_comm_pipe_pt_blocking (smp_comm_pipe *p)
|
||||
{
|
||||
uae_pt data;
|
||||
|
||||
|
@ -112,43 +117,43 @@ static __inline__ uae_pt read_comm_pipe_pt_blocking (smp_comm_pipe *p)
|
|||
return data;
|
||||
}
|
||||
|
||||
static __inline__ int comm_pipe_has_data (smp_comm_pipe *p)
|
||||
STATIC_INLINE int comm_pipe_has_data (smp_comm_pipe *p)
|
||||
{
|
||||
return p->rdp != p->wrp;
|
||||
}
|
||||
|
||||
static __inline__ int read_comm_pipe_int_blocking (smp_comm_pipe *p)
|
||||
STATIC_INLINE int read_comm_pipe_int_blocking (smp_comm_pipe *p)
|
||||
{
|
||||
uae_pt foo = read_comm_pipe_pt_blocking (p);
|
||||
return foo.i;
|
||||
}
|
||||
static __inline__ uae_u32 read_comm_pipe_u32_blocking (smp_comm_pipe *p)
|
||||
STATIC_INLINE uae_u32 read_comm_pipe_u32_blocking (smp_comm_pipe *p)
|
||||
{
|
||||
uae_pt foo = read_comm_pipe_pt_blocking (p);
|
||||
return foo._u32;
|
||||
}
|
||||
|
||||
static __inline__ void *read_comm_pipe_pvoid_blocking (smp_comm_pipe *p)
|
||||
STATIC_INLINE void *read_comm_pipe_pvoid_blocking (smp_comm_pipe *p)
|
||||
{
|
||||
uae_pt foo = read_comm_pipe_pt_blocking (p);
|
||||
return foo.pv;
|
||||
}
|
||||
|
||||
static __inline__ void write_comm_pipe_int (smp_comm_pipe *p, int data, int no_buffer)
|
||||
STATIC_INLINE void write_comm_pipe_int (smp_comm_pipe *p, int data, int no_buffer)
|
||||
{
|
||||
uae_pt foo;
|
||||
foo.i = data;
|
||||
write_comm_pipe_pt (p, foo, no_buffer);
|
||||
}
|
||||
|
||||
static __inline__ void write_comm_pipe_u32 (smp_comm_pipe *p, int data, int no_buffer)
|
||||
STATIC_INLINE void write_comm_pipe_u32 (smp_comm_pipe *p, int data, int no_buffer)
|
||||
{
|
||||
uae_pt foo;
|
||||
foo._u32 = data;
|
||||
write_comm_pipe_pt (p, foo, no_buffer);
|
||||
}
|
||||
|
||||
static __inline__ void write_comm_pipe_pvoid (smp_comm_pipe *p, void *data, int no_buffer)
|
||||
STATIC_INLINE void write_comm_pipe_pvoid (smp_comm_pipe *p, void *data, int no_buffer)
|
||||
{
|
||||
uae_pt foo;
|
||||
foo.pv = data;
|
||||
|
|
|
@ -149,7 +149,6 @@ extern void* pushall_call_handler;
|
|||
typedef struct {
|
||||
uae_u32* mem;
|
||||
uae_u32 val;
|
||||
uae_u8 is_swapped;
|
||||
uae_u8 status;
|
||||
uae_s8 realreg; /* gb-- realreg can hold -1 */
|
||||
uae_u8 realind; /* The index in the holds[] array */
|
||||
|
@ -246,12 +245,6 @@ typedef struct {
|
|||
freg_status fate[VFREGS];
|
||||
fn_status fat[N_FREGS];
|
||||
#endif
|
||||
#ifdef USE_JIT_FPU
|
||||
/* x86 FPU part */
|
||||
uae_s8 spos[N_FREGS];
|
||||
uae_s8 onstack[6];
|
||||
uae_s8 tos;
|
||||
#endif
|
||||
} bigstate;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -15,7 +15,7 @@ STATIC_INLINE uae_u32 get_long_prefetch (struct regstruct *regs, int o)
|
|||
#ifdef CPUEMU_12
|
||||
STATIC_INLINE uae_u32 mem_access_delay_word_read (uaecptr addr)
|
||||
{
|
||||
if (addr < 0x200000 || (addr >= 0xc00000 && addr < 0xe00000)) {
|
||||
if (addr < 0x200000 || (addr >= 0xc00000 && addr < 0xe00000 && !currprefs.cs_slowmemisfast)) {
|
||||
return wait_cpu_cycle_read (addr, 1);
|
||||
} else if (!(addr >= 0xa00000 && addr < 0xc00000)) {
|
||||
do_cycles_ce (4 * CYCLE_UNIT / 2);
|
||||
|
@ -24,16 +24,17 @@ STATIC_INLINE uae_u32 mem_access_delay_word_read (uaecptr addr)
|
|||
}
|
||||
STATIC_INLINE uae_u32 mem_access_delay_wordi_read (uaecptr addr)
|
||||
{
|
||||
if (addr < 0x200000 || (addr >= 0xc00000 && addr < 0xe00000)) {
|
||||
if (addr < 0x200000 || (addr >= 0xc00000 && addr < 0xe00000 && !currprefs.cs_slowmemisfast)) {
|
||||
return wait_cpu_cycle_read (addr, 1);
|
||||
} else if (!(addr >= 0xa00000 && addr < 0xc00000)) {
|
||||
do_cycles_ce (4 * CYCLE_UNIT / 2);
|
||||
}
|
||||
return get_wordi (addr);
|
||||
}
|
||||
|
||||
STATIC_INLINE uae_u32 mem_access_delay_byte_read (uaecptr addr)
|
||||
{
|
||||
if (addr < 0x200000 || (addr >= 0xc00000 && addr < 0xe00000)) {
|
||||
if (addr < 0x200000 || (addr >= 0xc00000 && addr < 0xe00000 && !currprefs.cs_slowmemisfast)) {
|
||||
return wait_cpu_cycle_read (addr, 0);
|
||||
} else if (!(addr >= 0xa00000 && addr < 0xc00000)) {
|
||||
do_cycles_ce (4 * CYCLE_UNIT / 2);
|
||||
|
@ -42,7 +43,7 @@ STATIC_INLINE uae_u32 mem_access_delay_byte_read (uaecptr addr)
|
|||
}
|
||||
STATIC_INLINE void mem_access_delay_byte_write (uaecptr addr, uae_u32 v)
|
||||
{
|
||||
if (addr < 0x200000 || (addr >= 0xc00000 && addr < 0xe00000)) {
|
||||
if (addr < 0x200000 || (addr >= 0xc00000 && addr < 0xe00000 && !currprefs.cs_slowmemisfast)) {
|
||||
wait_cpu_cycle_write (addr, 0, v);
|
||||
return;
|
||||
} else if (!(addr >= 0xa00000 && addr < 0xc00000)) {
|
||||
|
@ -52,7 +53,7 @@ STATIC_INLINE void mem_access_delay_byte_write (uaecptr addr, uae_u32 v)
|
|||
}
|
||||
STATIC_INLINE void mem_access_delay_word_write (uaecptr addr, uae_u32 v)
|
||||
{
|
||||
if (addr < 0x200000 || (addr >= 0xc00000 && addr < 0xe00000)) {
|
||||
if (addr < 0x200000 || (addr >= 0xc00000 && addr < 0xe00000 && !currprefs.cs_slowmemisfast)) {
|
||||
wait_cpu_cycle_write (addr, 1, v);
|
||||
return;
|
||||
} else if (!(addr >= 0xa00000 && addr < 0xc00000)) {
|
||||
|
|
91
src/include/cpu_small.h
Normal file
91
src/include/cpu_small.h
Normal file
|
@ -0,0 +1,91 @@
|
|||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
|
||||
typedef void xcpuop_func (uae_u32);
|
||||
|
||||
struct xcputbl {
|
||||
xcpuop_func *handler;
|
||||
uae_u16 opcode;
|
||||
};
|
||||
|
||||
struct xcpu
|
||||
{
|
||||
uae_u32 regs[16];
|
||||
uae_u32 cznv;
|
||||
uae_u32 x;
|
||||
uae_u32 pc;
|
||||
};
|
||||
|
||||
extern struct xcpu xregs;
|
||||
|
||||
extern struct xcputbl xop_smalltbl_0[];
|
||||
|
||||
extern void init_cpu_small(void);
|
||||
extern xcpuop_func *xcpufunctbl[65536];
|
||||
extern void xop_illg (uae_u32);
|
||||
|
||||
extern uae_u32 xget_ibyte(int);
|
||||
extern uae_u32 xget_iword(int);
|
||||
extern uae_u32 xget_ilong(int);
|
||||
|
||||
extern uae_u32 xget_byte(uaecptr);
|
||||
extern uae_u32 xget_word(uaecptr);
|
||||
extern uae_u32 xget_long(uaecptr);
|
||||
|
||||
extern void xput_byte(uaecptr, uae_u32);
|
||||
extern void xput_word(uaecptr, uae_u32);
|
||||
extern void xput_long(uaecptr, uae_u32);
|
||||
|
||||
extern uae_u32 xnext_iword (void);
|
||||
extern uae_u32 xnext_ilong (void);
|
||||
|
||||
extern void xm68k_incpc(int);
|
||||
extern uaecptr xm68k_getpc(void);
|
||||
extern void xm68k_setpc(uaecptr);
|
||||
|
||||
#define xm68k_dreg(num) (xregs.regs[(num)])
|
||||
#define xm68k_areg(num) (xregs.regs[(num + 8)])
|
||||
|
||||
extern uae_u32 xget_disp_ea_020 (uae_u32 base, uae_u32 dp);
|
||||
extern uae_u32 xget_disp_ea_000 (uae_u32 base, uae_u32 dp);
|
||||
|
||||
extern int xcctrue (int cc);
|
||||
|
||||
extern const int xareg_byteinc[];
|
||||
extern const int ximm8_table[];
|
||||
|
||||
extern int xmovem_index1[256];
|
||||
extern int xmovem_index2[256];
|
||||
extern int xmovem_next[256];
|
||||
|
||||
#define XFLAGBIT_N 15
|
||||
#define XFLAGBIT_Z 14
|
||||
#define XFLAGBIT_C 8
|
||||
#define XFLAGBIT_V 0
|
||||
#define XFLAGBIT_X 8
|
||||
|
||||
#define XFLAGVAL_N (1 << XFLAGBIT_N)
|
||||
#define XFLAGVAL_Z (1 << XFLAGBIT_Z)
|
||||
#define XFLAGVAL_C (1 << XFLAGBIT_C)
|
||||
#define XFLAGVAL_V (1 << XFLAGBIT_V)
|
||||
#define XFLAGVAL_X (1 << XFLAGBIT_X)
|
||||
|
||||
#define XSET_ZFLG(y) (xregs.cznv = (xregs.cznv & ~XFLAGVAL_Z) | (((y) ? 1 : 0) << XFLAGBIT_Z))
|
||||
#define XSET_CFLG(y) (xregs.cznv = (xregs.cznv & ~XFLAGVAL_C) | (((y) ? 1 : 0) << XFLAGBIT_C))
|
||||
#define XSET_VFLG(y) (xregs.cznv = (xregs.cznv & ~XFLAGVAL_V) | (((y) ? 1 : 0) << XFLAGBIT_V))
|
||||
#define XSET_NFLG(y) (xregs.cznv = (xregs.cznv & ~XFLAGVAL_N) | (((y) ? 1 : 0) << XFLAGBIT_N))
|
||||
#define XSET_XFLG(y) (xregs.x = ((y) ? 1 : 0) << XFLAGBIT_X)
|
||||
|
||||
#define XGET_ZFLG ((xregs.cznv >> XFLAGBIT_Z) & 1)
|
||||
#define XGET_CFLG ((xregs.cznv >> XFLAGBIT_C) & 1)
|
||||
#define XGET_VFLG ((xregs.cznv >> XFLAGBIT_V) & 1)
|
||||
#define XGET_NFLG ((xregs.cznv >> XFLAGBIT_N) & 1)
|
||||
#define XGET_XFLG ((xregs.x >> XFLAGBIT_X) & 1)
|
||||
|
||||
#define XCLEAR_CZNV (xregs.cznv = 0)
|
||||
#define XGET_CZNV (xregs.cznv)
|
||||
#define XIOR_CZNV(X) (xregs.cznv |= (X))
|
||||
#define XSET_CZNV(X) (xregs.cznv = (X))
|
||||
|
||||
#define XCOPY_CARRY (xregs.x = xregs.cznv)
|
||||
|
2681
src/include/cputbl.h
2681
src/include/cputbl.h
File diff suppressed because it is too large
Load diff
|
@ -32,19 +32,14 @@ extern void init_row_map (void);
|
|||
extern void init_hz (void);
|
||||
extern void init_custom (void);
|
||||
|
||||
extern int screen_is_picasso;
|
||||
extern int picasso_requested_on;
|
||||
extern int picasso_on;
|
||||
|
||||
/* Set to 1 to leave out the current frame in average frame time calculation.
|
||||
* Useful if the debugger was active. */
|
||||
extern int bogusframe;
|
||||
extern unsigned long int hsync_counter;
|
||||
|
||||
extern uae_u16 dmacon;
|
||||
extern uae_u16 intena, intreq, intreqr;
|
||||
|
||||
// extern int current_hpos (void);
|
||||
extern int vpos;
|
||||
#define current_hpos() ((get_cycles () - eventtab[ev_hsync].oldcycles) / CYCLE_UNIT)
|
||||
|
||||
|
@ -137,17 +132,12 @@ extern unsigned int xredcolors[256], xgreencolors[256], xbluecolors[256];
|
|||
#define RES_SHIFT(res) ((res) == RES_LORES ? 8 : (res) == RES_HIRES ? 4 : 2)
|
||||
|
||||
/* get resolution from bplcon0 */
|
||||
//#define GET_RES(CON0) (((CON0) & 0x8000) ? RES_HIRES : ((CON0) & 0x40) ? RES_SUPERHIRES : RES_LORES)
|
||||
#define GET_RES(CON0) (((CON0) & 0x8000) ? RES_HIRES : RES_LORES)
|
||||
#define GET_RES(CON0) (((CON0) & 0x8000) ? RES_HIRES : ((CON0) & 0x40) ? RES_SUPERHIRES : RES_LORES)
|
||||
/* get sprite width from FMODE */
|
||||
#define GET_SPRITEWIDTH(FMODE) ((((FMODE) >> 2) & 3) == 3 ? 64 : (((FMODE) >> 2) & 3) == 0 ? 16 : 32)
|
||||
/* Compute the number of bitplanes from a value written to BPLCON0 */
|
||||
#define GET_PLANES(x) ((((x) >> 12) & 7) | (((x) & 0x10) >> 1))
|
||||
|
||||
extern void alloc_cycle_ext(int, int);
|
||||
|
||||
extern void fpscounter_reset (void);
|
||||
|
||||
extern unsigned int beamcon0, new_beamcon0;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -15,7 +15,6 @@ extern uae_u8 DISK_status (void);
|
|||
extern void disk_eject (int num);
|
||||
extern int disk_empty (int num);
|
||||
extern void disk_insert (int num, const char *name);
|
||||
extern void disk_insert_force (int num, const char *name);
|
||||
extern void DISK_check_change (void);
|
||||
extern struct zfile *DISK_validate_filename (const char *, int, int *, uae_u32 *);
|
||||
extern void DISK_handler (uae_u32);
|
||||
|
@ -33,9 +32,16 @@ extern void DISK_reinsert (int num);
|
|||
|
||||
extern void DSKLEN (uae_u16 v, int hpos);
|
||||
extern uae_u16 DSKBYTR (int hpos);
|
||||
extern void DSKDAT (uae_u16);
|
||||
#define DSKDAT(uae_u16)
|
||||
extern void DSKSYNC (int, uae_u16);
|
||||
extern void DSKPTL (uae_u16);
|
||||
extern void DSKPTH (uae_u16);
|
||||
|
||||
extern int disk_debug_logging;
|
||||
extern int disk_debug_mode;
|
||||
extern int disk_debug_track;
|
||||
#define DISK_DEBUG_DMA_READ 1
|
||||
#define DISK_DEBUG_DMA_WRITE 2
|
||||
#define DISK_DEBUG_PIO 4
|
||||
|
||||
#define MAX_PREVIOUS_FLOPPIES 99
|
||||
|
|
|
@ -8,26 +8,20 @@
|
|||
|
||||
#define MAX_PLANES 8
|
||||
|
||||
#define gfxHeight 270
|
||||
|
||||
/* According to the HRM, pixel data spends a couple of cycles somewhere in the chips
|
||||
before it appears on-screen. */
|
||||
#define DIW_DDF_OFFSET 9
|
||||
/* this many cycles starting from hpos=0 are visible on right border */
|
||||
#define HBLANK_OFFSET 4
|
||||
|
||||
/* We ignore that many lores pixels at the start of the display. These are
|
||||
* invisible anyway due to hardware DDF limits. */
|
||||
#define DISPLAY_LEFT_SHIFT 0x40
|
||||
#define PIXEL_XPOS(HPOS) ((((HPOS)<<1) - DISPLAY_LEFT_SHIFT + DIW_DDF_OFFSET - 1) )
|
||||
|
||||
#define min_diwlastword (0)
|
||||
#define max_diwlastword (PIXEL_XPOS(0x1d4>> 1))
|
||||
|
||||
extern int lores_shift;
|
||||
extern int aga_mode, direct_rgb;
|
||||
|
||||
// extern int sprite_width;
|
||||
|
||||
STATIC_INLINE int coord_hw_to_window_x (int x)
|
||||
{
|
||||
x -= DISPLAY_LEFT_SHIFT;
|
||||
|
@ -65,8 +59,24 @@ struct color_entry {
|
|||
|
||||
/* convert 24 bit AGA Amiga RGB to native color */
|
||||
/* warning: this is still ugly, but now works with either byte order */
|
||||
//#ifndef PANDORA
|
||||
#if !defined(PANDORA) || !defined(USE_ARMNEON) // Well not really since ubfx is arm6t2...
|
||||
#define CONVERT_RGB(c) \
|
||||
( xbluecolors[((uae_u8*)(&c))[0]] | xgreencolors[((uae_u8*)(&c))[1]] | xredcolors[((uae_u8*)(&c))[2]] )
|
||||
#else
|
||||
STATIC_INLINE uae_u16 CONVERT_RGB(uae_u32 c)
|
||||
{
|
||||
uae_u16 ret;
|
||||
__asm__ __volatile__ (
|
||||
"ubfx r1, %[c], #19, #5 \n\t"
|
||||
"ubfx r2, %[c], #10, #6 \n\t"
|
||||
"ubfx %[v], %[c], #3, #5 \n\t"
|
||||
"orr %[v], %[v], r1, lsl #11 \n\t"
|
||||
"orr %[v], %[v], r2, lsl #5 \n\t"
|
||||
: [v] "=r" (ret) : [c] "r" (c) : "r1", "r2" );
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
STATIC_INLINE xcolnr getxcolor (int c)
|
||||
{
|
||||
|
@ -121,7 +131,8 @@ struct color_change {
|
|||
};
|
||||
|
||||
/* 440 rather than 880, since sprites are always lores. */
|
||||
#define MAX_PIXELS_PER_LINE 1760
|
||||
#define MAX_PIXELS_PER_LINE 880
|
||||
#define MAX_VIDHEIGHT 270
|
||||
|
||||
/* No divisors for MAX_PIXELS_PER_LINE; we support AGA and may one day
|
||||
want to use SHRES sprites. */
|
||||
|
@ -177,8 +188,6 @@ struct draw_info {
|
|||
int nr_color_changes, nr_sprites;
|
||||
};
|
||||
|
||||
// extern int next_sprite_entry;
|
||||
|
||||
extern struct decision line_decisions[2 * (MAXVPOS+1) + 1];
|
||||
extern struct draw_info curr_drawinfo[2 * (MAXVPOS+1) + 1];
|
||||
|
||||
|
@ -188,9 +197,6 @@ extern uae_u8 line_data[(MAXVPOS+1) * 2][MAX_PLANES * MAX_WORDS_PER_LINE * 2];
|
|||
extern int coord_native_to_amiga_y (int);
|
||||
extern int coord_native_to_amiga_x (int);
|
||||
|
||||
extern void record_diw_line (int first, int last);
|
||||
extern void hardware_line_completed (int lineno);
|
||||
|
||||
extern void hsync_record_line_state (int lineno);
|
||||
extern void vsync_handle_redraw (int long_frame, int lof_changed);
|
||||
extern void init_hardware_for_drawing_frame (void);
|
||||
|
|
|
@ -14,11 +14,8 @@
|
|||
|
||||
#include "md-pandora/rpt.h"
|
||||
|
||||
#define FAST_COPPER
|
||||
|
||||
extern volatile frame_time_t vsynctime, vsyncmintime;
|
||||
extern void reset_frame_rate_hack (void);
|
||||
extern int rpt_available;
|
||||
extern frame_time_t syncbase;
|
||||
extern int speedup_cycles, speedup_timelimit;
|
||||
|
||||
|
@ -51,9 +48,7 @@ struct ev2
|
|||
|
||||
enum {
|
||||
ev_hsync,
|
||||
#ifdef FAST_COPPER
|
||||
ev_copper,
|
||||
#endif
|
||||
ev_audio, ev_cia, ev_misc,
|
||||
ev_max
|
||||
};
|
||||
|
|
|
@ -86,7 +86,8 @@ STATIC_INLINE void do_cycles_slow (unsigned long cycles_to_add)
|
|||
#else
|
||||
|
||||
/* Let's see whether hiding this away somewhere where the compiler can't
|
||||
see it will cure it of its silly urge to mis-optimize the comparison */ extern long int diff32(frame_time_t x, frame_time_t y);
|
||||
see it will cure it of its silly urge to mis-optimize the comparison */
|
||||
extern long int diff32(frame_time_t x, frame_time_t y);
|
||||
|
||||
extern long cycles_to_next_event;
|
||||
extern long max_cycles_to_next_event;
|
||||
|
|
|
@ -46,10 +46,6 @@ extern uae_u32 allocated_fastmem;
|
|||
extern uae_u32 allocated_bogomem;
|
||||
extern uae_u32 allocated_gfxmem;
|
||||
extern uae_u32 allocated_z3fastmem, max_z3fastmem;
|
||||
#if !( defined(PANDORA) || defined(ANDROIDSDL) )
|
||||
extern uae_u32 allocated_a3000mem;
|
||||
extern uae_u32 allocated_cardmem;
|
||||
#endif
|
||||
|
||||
extern void wait_cpu_cycle (void);
|
||||
|
||||
|
@ -58,16 +54,10 @@ extern void wait_cpu_cycle (void);
|
|||
|
||||
#define chipmem_start 0x00000000
|
||||
#define bogomem_start 0x00C00000
|
||||
#if !( defined(PANDORA) || defined(ANDROIDSDL) )
|
||||
#define cardmem_start 0x00E00000
|
||||
#endif
|
||||
#define kickmem_start 0x00F80000
|
||||
extern uaecptr z3fastmem_start;
|
||||
extern uaecptr p96ram_start;
|
||||
extern uaecptr fastmem_start;
|
||||
#if !( defined(PANDORA) || defined(ANDROIDSDL) )
|
||||
extern uaecptr a3000lmem_start, a3000hmem_start;
|
||||
#endif
|
||||
|
||||
extern int ersatzkickfile;
|
||||
extern int cloanto_rom;
|
||||
|
@ -115,15 +105,6 @@ extern addrbank rtarea_bank;
|
|||
extern addrbank expamem_bank;
|
||||
extern addrbank fastmem_bank;
|
||||
extern addrbank gfxmem_bank, gfxmem_bankx;
|
||||
#if !( defined(PANDORA) || defined(ANDROIDSDL) )
|
||||
extern addrbank gayle_bank;
|
||||
extern addrbank gayle2_bank;
|
||||
extern addrbank gayle_attr_bank;
|
||||
extern addrbank gayle_common_bank;
|
||||
extern addrbank mbres_bank;
|
||||
extern addrbank akiko_bank;
|
||||
extern addrbank cardmem_bank;
|
||||
#endif
|
||||
|
||||
extern void rtarea_init (void);
|
||||
extern void rtarea_setup (void);
|
||||
|
@ -171,8 +152,6 @@ extern void map_overlay (int chip);
|
|||
extern void memory_hardreset (void);
|
||||
extern void free_fastmemory (void);
|
||||
|
||||
#define NONEXISTINGDATA 0
|
||||
|
||||
#define longget(addr) (call_mem_get_func(get_mem_bank(addr).lget, addr))
|
||||
#define wordget(addr) (call_mem_get_func(get_mem_bank(addr).wget, addr))
|
||||
#define byteget(addr) (call_mem_get_func(get_mem_bank(addr).bget, addr))
|
||||
|
@ -332,7 +311,7 @@ extern uae_u8 *mapped_malloc (size_t, const char *);
|
|||
extern void mapped_free (uae_u8 *);
|
||||
extern void clearexec (void);
|
||||
|
||||
extern void decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size, uae_u8 *key, int keysize);
|
||||
extern int decode_cloanto_rom_do (uae_u8 *mem, int size, int real_size);
|
||||
|
||||
#define ROMTYPE_KICK 1
|
||||
#define ROMTYPE_KICKCD32 2
|
||||
|
@ -398,8 +377,10 @@ extern void romlist_add (char *path, struct romdata *rd);
|
|||
extern char *romlist_get (struct romdata *rd);
|
||||
extern void romlist_clear (void);
|
||||
|
||||
extern uae_u8 *load_keyfile (struct uae_prefs *p, char *path, int *size);
|
||||
extern void free_keyfile (uae_u8 *key);
|
||||
extern int load_keyring (struct uae_prefs *p, char *path);
|
||||
extern uae_u8 *target_load_keyfile (struct uae_prefs *p, char *path, int *size, char *name);
|
||||
extern void free_keyring (void);
|
||||
extern int get_keyring (void);
|
||||
|
||||
uaecptr strcpyha_safe (uaecptr dst, const char *src);
|
||||
extern char *strcpyah_safe (char *dst, uaecptr src);
|
||||
|
|
|
@ -185,8 +185,6 @@ STATIC_INLINE uae_u32 munge24(uae_u32 x)
|
|||
return x & regs.address_space_mask;
|
||||
}
|
||||
|
||||
extern unsigned long irqcycles[15];
|
||||
extern int irqdelay[15];
|
||||
extern int mmu_enabled, mmu_triggered;
|
||||
extern int cpu_cycles;
|
||||
|
||||
|
@ -339,6 +337,22 @@ extern void m68k_reset (int);
|
|||
extern int getDivu68kCycles(uae_u32 dividend, uae_u16 divisor);
|
||||
extern int getDivs68kCycles(uae_s32 dividend, uae_s16 divisor);
|
||||
|
||||
STATIC_INLINE int bitset_count(uae_u32 data)
|
||||
{
|
||||
unsigned int const MASK1 = 0x55555555;
|
||||
unsigned int const MASK2 = 0x33333333;
|
||||
unsigned int const MASK4 = 0x0f0f0f0f;
|
||||
unsigned int const MASK6 = 0x0000003f;
|
||||
|
||||
unsigned int const w = (data & MASK1) + ((data >> 1) & MASK1);
|
||||
unsigned int const x = (w & MASK2) + ((w >> 2) & MASK2);
|
||||
unsigned int const y = ((x + (x >> 4)) & MASK4);
|
||||
unsigned int const z = (y + (y >> 8));
|
||||
unsigned int const c = (z + (z >> 16)) & MASK6;
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
extern void mmu_op (uae_u32, struct regstruct *regs, uae_u32);
|
||||
extern void mmu_op30 (uaecptr, uae_u32, struct regstruct *regs, int, uaecptr);
|
||||
|
||||
|
|
|
@ -21,12 +21,6 @@ struct strlist {
|
|||
|
||||
#define DEFAULT_JIT_CACHE_SIZE 8192
|
||||
|
||||
#define PREFS_GFX_WIDTH 320
|
||||
#define PREFS_GFX_HEIGHT 240
|
||||
|
||||
#define PREFS_GFX_SCALED_WIDTH 328
|
||||
#define PREFS_GFX_SCALED_HEIGHT 256
|
||||
|
||||
#define CONFIG_TYPE_HARDWARE 1
|
||||
#define CONFIG_TYPE_HOST 2
|
||||
#define CONFIG_BLEN 2560
|
||||
|
@ -59,22 +53,19 @@ struct uae_prefs {
|
|||
struct strlist *all_lines;
|
||||
|
||||
char description[256];
|
||||
char info[256]; // Not used in UAE4ARM
|
||||
int config_version; // Not used in UAE4ARM
|
||||
char info[256];
|
||||
int config_version;
|
||||
|
||||
int start_debugger; // Not used in UAE4ARM
|
||||
int start_gui;
|
||||
|
||||
int produce_sound;
|
||||
int sound_stereo;
|
||||
int sound_stereo_separation;
|
||||
int sound_mixed_stereo_delay;
|
||||
int sound_bits; // Not used in UAE4ARM
|
||||
int sound_freq;
|
||||
int sound_interpol;
|
||||
int sound_filter;
|
||||
int sound_filter_type;
|
||||
int sound_volume; // Not used in UAE4ARM
|
||||
int sound_auto;
|
||||
|
||||
int cachesize;
|
||||
|
@ -84,12 +75,10 @@ struct uae_prefs {
|
|||
struct wh gfx_size_win;
|
||||
struct wh gfx_size_fs;
|
||||
struct wh gfx_size;
|
||||
int gfx_refreshrate; // Not used in UAE4ARM
|
||||
int gfx_avsync; // Not used in UAE4ARM
|
||||
int gfx_resolution; // Not used in UAE4ARM
|
||||
int gfx_correct_aspect; // Not used in UAE4ARM
|
||||
int gfx_xcenter; // Not used in UAE4ARM
|
||||
int gfx_ycenter; // Not used in UAE4ARM
|
||||
|
||||
#ifdef RASPBERRY
|
||||
int gfx_correct_aspect;
|
||||
#endif
|
||||
|
||||
int immediate_blits;
|
||||
unsigned int chipset_mask;
|
||||
|
@ -98,20 +87,20 @@ struct uae_prefs {
|
|||
int collision_level;
|
||||
int leds_on_screen;
|
||||
int fast_copper;
|
||||
int scsi; // Not used in UAE4ARM
|
||||
int cpu_idle;
|
||||
int floppy_speed;
|
||||
int tod_hack;
|
||||
|
||||
int cs_a1000ram; // Always 0 in UAE4ARM
|
||||
int cs_a1000ram;
|
||||
int cs_df0idhw;
|
||||
|
||||
char df[4][MAX_DPATH];
|
||||
char romfile[MAX_DPATH];
|
||||
char romextfile[MAX_DPATH];
|
||||
|
||||
char path_floppy[256]; // Not used in UAE4ARM
|
||||
char path_hardfile[256]; // Not used in UAE4ARM
|
||||
char path_rom[256]; // Not used in UAE4ARM
|
||||
char path_floppy[256];
|
||||
char path_hardfile[256];
|
||||
char path_rom[256];
|
||||
|
||||
int m68k_speed;
|
||||
int cpu_model;
|
||||
|
@ -132,12 +121,8 @@ struct uae_prefs {
|
|||
|
||||
int nr_floppies;
|
||||
int dfxtype[4];
|
||||
int dfxclick[4]; // Not used in UAE4ARM
|
||||
char dfxclickexternal[4][256]; // Not used in UAE4ARM
|
||||
int dfxclickvolume; // Not used in UAE4ARM
|
||||
|
||||
/* Target specific options */
|
||||
int pandora_partial_blits;
|
||||
int pandora_horizontal_offset;
|
||||
int pandora_vertical_offset;
|
||||
int pandora_cpu_speed;
|
||||
|
|
|
@ -577,7 +577,7 @@ extern void picasso_enablescreen (int on);
|
|||
extern void picasso_refresh (int);
|
||||
extern void picasso_handle_vsync (void);
|
||||
extern void init_hz_p96 (void);
|
||||
static inline void picasso_handle_hsync (void)
|
||||
static __inline__ void picasso_handle_hsync (void)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -21,10 +21,6 @@
|
|||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define likely(x) __builtin_expect((x),1)
|
||||
#define unlikely(x) __builtin_expect((x),0)
|
||||
|
||||
|
||||
#ifdef _GCCRES_
|
||||
#undef _GCCRES_
|
||||
#endif
|
||||
|
@ -108,8 +104,46 @@
|
|||
#define BROKEN_OS_PROBABLY_AIX
|
||||
#endif
|
||||
|
||||
#ifdef __NeXT__
|
||||
#define S_IRUSR S_IREAD
|
||||
#define S_IWUSR S_IWRITE
|
||||
#define S_IXUSR S_IEXEC
|
||||
#define S_ISDIR(val) (S_IFDIR & val)
|
||||
struct utimbuf
|
||||
{
|
||||
time_t actime;
|
||||
time_t modtime;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(AMIGA)
|
||||
/* gcc on the amiga need that __attribute((regparm)) must */
|
||||
/* be defined in function prototypes as well as in */
|
||||
/* function definitions ! */
|
||||
#define REGPARAM2 REGPARAM
|
||||
#else /* not(GCC & AMIGA) */
|
||||
#define REGPARAM2
|
||||
#define REGPARAM3
|
||||
#endif
|
||||
|
||||
/* sam: some definitions so that SAS/C can compile UAE */
|
||||
#if defined(__SASC) && defined(AMIGA)
|
||||
#define REGPARAM2
|
||||
#define REGPARAM
|
||||
#define S_IRUSR S_IREAD
|
||||
#define S_IWUSR S_IWRITE
|
||||
#define S_IXUSR S_IEXECUTE
|
||||
#define S_ISDIR(val) (S_IFDIR & val)
|
||||
#define mkdir(x,y) mkdir(x)
|
||||
#define truncate(x,y) 0
|
||||
#define creat(x,y) open("T:creat",O_CREAT|O_TEMP|O_RDWR) /* sam: for zfile.c */
|
||||
#define strcasecmp stricmp
|
||||
#define utime(file,time) 0
|
||||
struct utimbuf
|
||||
{
|
||||
time_t actime;
|
||||
time_t modtime;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(WARPUP)
|
||||
#include "devices/timer.h"
|
||||
|
@ -122,7 +156,7 @@
|
|||
#define memcpy q_memcpy
|
||||
#define memset q_memset
|
||||
#define strdup my_strdup
|
||||
// #define random rand
|
||||
#define random rand
|
||||
#define creat(x,y) open("T:creat",O_CREAT|O_RDWR|O_TRUNC,777)
|
||||
extern void* q_memset(void*,int,size_t);
|
||||
extern void* q_memcpy(void*,const void*,size_t);
|
||||
|
@ -133,18 +167,27 @@ extern void* q_memcpy(void*,const void*,size_t);
|
|||
#include <io.h>
|
||||
#endif
|
||||
|
||||
/* Acorn specific stuff */
|
||||
#ifdef ACORN
|
||||
|
||||
#define S_IRUSR S_IREAD
|
||||
#define S_IWUSR S_IWRITE
|
||||
#define S_IXUSR S_IEXEC
|
||||
|
||||
#define strcasecmp stricmp
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef L_tmpnam
|
||||
#define L_tmpnam 128 /* ought to be safe */
|
||||
#endif
|
||||
|
||||
|
||||
/* If char has more then 8 bits, good night. */
|
||||
typedef unsigned char uae_u8;
|
||||
typedef signed char uae_s8;
|
||||
|
||||
typedef struct { uae_u8 RGB[3]; } RGB;
|
||||
|
||||
|
||||
#if SIZEOF_SHORT == 2
|
||||
typedef unsigned short uae_u16;
|
||||
typedef short uae_s16;
|
||||
|
@ -210,6 +253,10 @@ extern void xfree(void*);
|
|||
SDL_Quit(); \
|
||||
(abort) (); \
|
||||
} while (0)
|
||||
#else
|
||||
#define ENUMDECL enum
|
||||
#define ENUMNAME(name) ; typedef int name
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Porters to weird systems, look! This is the preferred way to get
|
||||
|
@ -228,6 +275,22 @@ extern void xfree(void*);
|
|||
#define DONT_HAVE_POSIX
|
||||
#endif
|
||||
|
||||
#if defined PANDORA
|
||||
|
||||
#define FILEFLAG_DIR 0x1
|
||||
#define FILEFLAG_ARCHIVE 0x2
|
||||
#define FILEFLAG_WRITE 0x4
|
||||
#define FILEFLAG_READ 0x8
|
||||
#define FILEFLAG_EXECUTE 0x10
|
||||
#define FILEFLAG_SCRIPT 0x20
|
||||
#define FILEFLAG_PURE 0x40
|
||||
|
||||
#define REGPARAM2
|
||||
#define REGPARAM3
|
||||
#define REGPARAM
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef DONT_HAVE_POSIX
|
||||
|
||||
#define access posixemu_access
|
||||
|
@ -312,23 +375,17 @@ extern void mallocemu_free (void *ptr);
|
|||
#ifdef UAE_CONSOLE
|
||||
#undef write_log
|
||||
#define write_log write_log_standard
|
||||
#else
|
||||
#undef write_log
|
||||
#define write_log(FORMATO, RESTO...)
|
||||
#endif
|
||||
|
||||
#ifdef write_log
|
||||
#undef write_log
|
||||
#endif
|
||||
#ifndef WITH_LOGGING
|
||||
#undef write_log
|
||||
#define write_log(FORMATO, RESTO...)
|
||||
#define write_log_standard(FORMATO, RESTO...)
|
||||
#define console_out(FORMATO, RESTO...)
|
||||
#define console_get(FORMATO, RESTO...)
|
||||
#else
|
||||
extern void write_log (const char *format,...);
|
||||
extern FILE *debugfile;
|
||||
#endif
|
||||
extern void console_out (const char *, ...);
|
||||
extern void gui_message (const char *,...);
|
||||
|
||||
#ifndef O_BINARY
|
||||
|
@ -336,6 +393,7 @@ extern void gui_message (const char *,...);
|
|||
#endif
|
||||
|
||||
#ifndef STATIC_INLINE
|
||||
#if __GNUC__ - 1 > 1 && __GNUC_MINOR__ - 1 >= 0
|
||||
#ifdef RASPBERRY
|
||||
#define STATIC_INLINE static __inline__
|
||||
#else
|
||||
|
@ -343,27 +401,15 @@ extern void gui_message (const char *,...);
|
|||
#endif
|
||||
#define NOINLINE __attribute__ ((noinline))
|
||||
#define NORETURN __attribute__ ((noreturn))
|
||||
#endif
|
||||
|
||||
#elif _MSC_VER
|
||||
#define STATIC_INLINE static __forceinline
|
||||
#define NOINLINE __declspec(noinline)
|
||||
#define NORETURN __declspec(noreturn)
|
||||
#else
|
||||
#ifndef STATIC_INLINE
|
||||
#define STATIC_INLINE static __inline__
|
||||
#define NOINLINE
|
||||
#define NORETURN
|
||||
#endif
|
||||
#define ENUMDECL enum
|
||||
#define ENUMNAME(name) ; typedef int name
|
||||
#endif
|
||||
|
||||
#ifdef ARMV6_ASSEMBLY
|
||||
|
||||
static inline uae_u32 do_byteswap_32(uae_u32 v) {__asm__ (
|
||||
"rev %0, %0"
|
||||
: "=r" (v) : "0" (v) ); return v;}
|
||||
|
||||
static inline uae_u32 do_byteswap_16(uae_u32 v) {__asm__ (
|
||||
"revsh %0, %0\n\t"
|
||||
"uxth %0, %0"
|
||||
: "=r" (v) : "0" (v) ); return v;}
|
||||
|
||||
#endif
|
||||
|
||||
/* Every Amiga hardware clock cycle takes this many "virtual" cycles. This
|
||||
|
@ -388,15 +434,21 @@ static inline uae_u32 do_byteswap_16(uae_u32 v) {__asm__ (
|
|||
*/
|
||||
#define CPU_EMU_SIZE 0
|
||||
|
||||
#undef REGPARAM
|
||||
#define REGPARAM
|
||||
/*
|
||||
* Byte-swapping functions
|
||||
*/
|
||||
|
||||
#define FILEFLAG_DIR 0x1
|
||||
#define FILEFLAG_ARCHIVE 0x2
|
||||
#define FILEFLAG_WRITE 0x4
|
||||
#define FILEFLAG_READ 0x8
|
||||
#define FILEFLAG_EXECUTE 0x10
|
||||
#define FILEFLAG_SCRIPT 0x20
|
||||
#define FILEFLAG_PURE 0x40
|
||||
#ifdef ARMV6_ASSEMBLY
|
||||
|
||||
static inline uae_u32 do_byteswap_32(uae_u32 v) {__asm__ (
|
||||
"rev %0, %0"
|
||||
: "=r" (v) : "0" (v) ); return v;}
|
||||
|
||||
static inline uae_u32 do_byteswap_16(uae_u32 v) {__asm__ (
|
||||
"revsh %0, %0\n\t"
|
||||
"uxth %0, %0"
|
||||
: "=r" (v) : "0" (v) ); return v;}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -27,7 +27,6 @@ extern void reset_all_systems (void);
|
|||
|
||||
extern int quit_program;
|
||||
|
||||
extern char warning_buffer[256];
|
||||
extern char start_path_data[256];
|
||||
|
||||
/* This structure is used to define menus. The val field can hold key
|
||||
|
@ -44,5 +43,6 @@ struct bstring {
|
|||
int val;
|
||||
};
|
||||
|
||||
extern void fetch_saveimagepath (char*, int, int);
|
||||
#define uaerand() rand()
|
||||
#endif //UAE_UAE_H
|
||||
|
|
|
@ -24,7 +24,7 @@ extern void setup_brkhandler (void);
|
|||
|
||||
extern void flush_line (int);
|
||||
extern void flush_block ();
|
||||
extern void flush_screen (int, int);
|
||||
extern void flush_screen ();
|
||||
void black_screen_now(void);
|
||||
|
||||
extern int lockscr (void);
|
||||
|
@ -39,13 +39,7 @@ extern int bits_in_mask (unsigned long mask);
|
|||
extern int mask_shift (unsigned long mask);
|
||||
extern unsigned int doMask (int p, int bits, int shift);
|
||||
extern unsigned int doMask256 (int p, int bits, int shift);
|
||||
extern void setup_maxcol (int);
|
||||
extern void alloc_colors256 (int (*)(int, int, int, xcolnr *));
|
||||
extern void alloc_colors64k (int, int, int, int, int, int, int);
|
||||
extern void setup_greydither (int bits, allocfunc_type allocfunc);
|
||||
extern void setup_greydither_maxcol (int maxcol, allocfunc_type allocfunc);
|
||||
extern void setup_dither (int bits, allocfunc_type allocfunc);
|
||||
extern void DitherLine (uae_u8 *l, uae_u16 *r4g4b4, int x, int y, uae_s16 len, int bits) ASM_SYM_FOR_FUNC("DitherLine");
|
||||
|
||||
struct vidbuf_description
|
||||
{
|
||||
|
|
|
@ -59,7 +59,6 @@ struct zarchive_info
|
|||
};
|
||||
|
||||
#define ArchiveFormat7Zip '7z '
|
||||
#define ArchiveFormatRAR 'rar '
|
||||
#define ArchiveFormatZIP 'zip '
|
||||
#define ArchiveFormatLHA 'lha '
|
||||
#define ArchiveFormatLZX 'lzx '
|
||||
|
@ -83,8 +82,6 @@ extern struct zvolume *archive_directory_zip(struct zfile *zf);
|
|||
extern struct zfile *archive_access_zip (struct znode *zn);
|
||||
extern struct zvolume *archive_directory_7z (struct zfile *z);
|
||||
extern struct zfile *archive_access_7z (struct znode *zn);
|
||||
extern struct zvolume *archive_directory_rar (struct zfile *z);
|
||||
extern struct zfile *archive_access_rar (struct znode *zn);
|
||||
extern struct zvolume *archive_directory_lzx (struct zfile *in_file);
|
||||
extern struct zfile *archive_access_lzx (struct znode *zn);
|
||||
extern struct zvolume *archive_directory_arcacc (struct zfile *z, unsigned int id);
|
||||
|
@ -93,10 +90,10 @@ extern struct zfile *archive_access_arcacc (struct znode *zn);
|
|||
extern struct zfile *archive_access_select (struct zfile *zf, unsigned int id, int doselect);
|
||||
extern struct zfile *archive_access_arcacc_select (struct zfile *zf, unsigned int id);
|
||||
|
||||
|
||||
|
||||
extern void archive_access_scan (struct zfile *zf, zfile_callback zc, void *user, unsigned int id);
|
||||
|
||||
extern void archive_access_close (void *handle, unsigned int id);
|
||||
|
||||
extern struct zfile *archive_getzfile(struct znode *zn, unsigned int id);
|
||||
|
||||
extern struct zfile *decompress_zfd (struct zfile*);
|
|
@ -27,8 +27,7 @@ extern int zfile_ferror (struct zfile *z);
|
|||
extern char *zfile_getdata (struct zfile *z, int offset, int len);
|
||||
extern void zfile_exit (void);
|
||||
|
||||
//extern int execute_command (char *);
|
||||
#define execute_command(CMD) system(CMD)
|
||||
extern int execute_command (char *);
|
||||
extern int zfile_iscompressed (struct zfile *z);
|
||||
extern int zfile_zcompress (struct zfile *dst, void *src, int size);
|
||||
extern int zfile_zuncompress (void *dst, int dstsize, struct zfile *src, int srcsize);
|
||||
|
|
|
@ -344,6 +344,10 @@ void inputdevice_vsync (void)
|
|||
|
||||
void inputdevice_reset (void)
|
||||
{
|
||||
lastmx = lastmy = 0;
|
||||
newmousecounters = 0;
|
||||
potgo_value = 0;
|
||||
|
||||
if (needmousehack ())
|
||||
mousehack_set (mousehack_dontcare);
|
||||
else
|
||||
|
@ -369,6 +373,9 @@ void inputdevice_default_prefs (struct uae_prefs *p)
|
|||
|
||||
void inputdevice_init (void)
|
||||
{
|
||||
lastsampledmx = 0;
|
||||
lastsampledmy = 0;
|
||||
|
||||
init_joystick ();
|
||||
inputmode_init();
|
||||
}
|
||||
|
|
948
src/linetoscr.c
Normal file
948
src/linetoscr.c
Normal file
|
@ -0,0 +1,948 @@
|
|||
/* Note:
|
||||
* xcolors[] contains 16-bit color information in both words
|
||||
* colors_for_drawing.acolors (non AGA) contains 16-bit color information in both words
|
||||
* colors_for_drawing.acolors (AGA) contains 16-bit color information in one word
|
||||
*/
|
||||
|
||||
static int NOINLINE linetoscr_16 (int spix, int dpix, int stoppos)
|
||||
{
|
||||
uae_u16 *buf = (uae_u16 *) xlinebuffer;
|
||||
|
||||
if (dp_for_drawing->ham_seen) {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
buf[dpix++] = xcolors[ham_linebuf[spix++]];
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
out_val = xcolors[ham_linebuf[spix++]];
|
||||
dpix_val = xcolors[ham_linebuf[spix++]];
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
buf[dpix++] = xcolors[ham_linebuf[spix++]];
|
||||
}
|
||||
} else if (bpldualpf) {
|
||||
int *lookup = bpldualpfpri ? dblpf_ind2 : dblpf_ind1;
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
buf[dpix++] = colors_for_drawing.acolors[lookup[spix_val]];
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
out_val = colors_for_drawing.acolors[lookup[spix_val]];
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
dpix_val = colors_for_drawing.acolors[lookup[spix_val]];
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
buf[dpix++] = colors_for_drawing.acolors[lookup[spix_val]];
|
||||
}
|
||||
} else if (bplehb) {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
if (spix_val <= 31)
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
else
|
||||
dpix_val = xcolors[(colors_for_drawing.color_regs_ecs[spix_val - 32] >> 1) & 0x777];
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
if (spix_val <= 31)
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
else
|
||||
out_val = xcolors[(colors_for_drawing.color_regs_ecs[spix_val - 32] >> 1) & 0x777];
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
if (spix_val <= 31)
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
else
|
||||
dpix_val = xcolors[(colors_for_drawing.color_regs_ecs[spix_val - 32] >> 1) & 0x777];
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
if (spix_val <= 31)
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
else
|
||||
dpix_val = xcolors[(colors_for_drawing.color_regs_ecs[spix_val - 32] >> 1) & 0x777];
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
} else {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
buf[dpix++] = colors_for_drawing.acolors[spix_val];
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
buf[dpix++] = colors_for_drawing.acolors[spix_val];
|
||||
}
|
||||
}
|
||||
|
||||
return spix;
|
||||
}
|
||||
|
||||
static int NOINLINE linetoscr_16_stretch1 (int spix, int dpix, int stoppos)
|
||||
{
|
||||
uae_u16 *buf = (uae_u16 *) xlinebuffer;
|
||||
|
||||
if (dp_for_drawing->ham_seen) {
|
||||
while (dpix < stoppos) {
|
||||
*((uae_u32 *)&buf[dpix]) = xcolors[ham_linebuf[spix++]];
|
||||
dpix += 2;
|
||||
}
|
||||
} else if (bpldualpf) {
|
||||
int *lookup = bpldualpfpri ? dblpf_ind2 : dblpf_ind1;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
*((uae_u32 *)&buf[dpix]) = colors_for_drawing.acolors[lookup[spix_val]];
|
||||
dpix += 2;
|
||||
}
|
||||
} else if (bplehb) {
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
if (spix_val <= 31)
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
else
|
||||
out_val = xcolors[(colors_for_drawing.color_regs_ecs[spix_val - 32] >> 1) & 0x0777];
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (out_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[o], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
} else {
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++];
|
||||
*((uae_u32 *)&buf[dpix]) = colors_for_drawing.acolors[spix_val];
|
||||
dpix += 2;
|
||||
}
|
||||
}
|
||||
|
||||
return spix;
|
||||
}
|
||||
|
||||
static int NOINLINE linetoscr_16_shrink1 (int spix, int dpix, int stoppos)
|
||||
{
|
||||
uae_u16 *buf = (uae_u16 *) xlinebuffer;
|
||||
|
||||
if (dp_for_drawing->ham_seen) {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 dpix_val;
|
||||
dpix_val = xcolors[ham_linebuf[spix]];
|
||||
spix += 2;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
out_val = xcolors[ham_linebuf[spix]];
|
||||
spix += 2;
|
||||
dpix_val = xcolors[ham_linebuf[spix]];
|
||||
spix += 2;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 dpix_val;
|
||||
dpix_val = xcolors[ham_linebuf[spix]];
|
||||
spix += 2;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
} else if (bpldualpf) {
|
||||
int *lookup = bpldualpfpri ? dblpf_ind2 : dblpf_ind1;
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
spix_val = pixdata.apixels[spix];
|
||||
dpix_val = colors_for_drawing.acolors[lookup[spix_val]];
|
||||
spix += 2;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix];
|
||||
out_val = colors_for_drawing.acolors[lookup[spix_val]];
|
||||
spix += 2;
|
||||
spix_val = pixdata.apixels[spix];
|
||||
dpix_val = colors_for_drawing.acolors[lookup[spix_val]];
|
||||
spix += 2;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
spix_val = pixdata.apixels[spix];
|
||||
dpix_val = colors_for_drawing.acolors[lookup[spix_val]];
|
||||
spix += 2;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
} else if (bplehb) {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
spix_val = pixdata.apixels[spix];
|
||||
if (spix_val <= 31)
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
else
|
||||
dpix_val = xcolors[(colors_for_drawing.color_regs_ecs[spix_val - 32] >> 1) & 0x777];
|
||||
spix += 2;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix];
|
||||
if (spix_val <= 31)
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
else
|
||||
out_val = xcolors[(colors_for_drawing.color_regs_ecs[spix_val - 32] >> 1) & 0x777];
|
||||
spix += 2;
|
||||
spix_val = pixdata.apixels[spix];
|
||||
if (spix_val <= 31)
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
else
|
||||
dpix_val = xcolors[(colors_for_drawing.color_regs_ecs[spix_val - 32] >> 1) & 0x777];
|
||||
spix += 2;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
spix_val = pixdata.apixels[spix];
|
||||
if (spix_val <= 31)
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
else
|
||||
dpix_val = xcolors[(colors_for_drawing.color_regs_ecs[spix_val - 32] >> 1) & 0x777];
|
||||
spix += 2;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
} else {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
spix_val = pixdata.apixels[spix];
|
||||
spix += 2;
|
||||
buf[dpix++] = colors_for_drawing.acolors[spix_val];
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix];
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
spix += 2;
|
||||
spix_val = pixdata.apixels[spix];
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
spix += 2;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
spix_val = pixdata.apixels[spix];
|
||||
spix += 2;
|
||||
buf[dpix++] = colors_for_drawing.acolors[spix_val];
|
||||
}
|
||||
}
|
||||
|
||||
return spix;
|
||||
}
|
||||
|
||||
#ifdef AGA
|
||||
static int NOINLINE linetoscr_16_aga (int spix, int dpix, int stoppos)
|
||||
{
|
||||
uae_u16 *buf = (uae_u16 *) xlinebuffer;
|
||||
uae_u8 xor_val = (uae_u8)(dp_for_drawing->bplcon4 >> 8);
|
||||
|
||||
if (dp_for_drawing->ham_seen) {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
buf[dpix++] = CONVERT_RGB (ham_linebuf[spix]);
|
||||
spix++;
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
out_val = CONVERT_RGB (ham_linebuf[spix]);
|
||||
spix++;
|
||||
dpix_val = CONVERT_RGB (ham_linebuf[spix]);
|
||||
spix++;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
buf[dpix++] = CONVERT_RGB (ham_linebuf[spix]);
|
||||
spix++;
|
||||
}
|
||||
} else if (bpldualpf) {
|
||||
int *lookup = bpldualpfpri ? dblpf_ind2_aga : dblpf_ind1_aga;
|
||||
int *lookup_no = bpldualpfpri ? dblpf_2nd2 : dblpf_2nd1;
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
if (spritepixels[spix]) {
|
||||
dpix_val = colors_for_drawing.acolors[spritepixels[spix]];
|
||||
spritepixels[spix] = 0;
|
||||
} else {
|
||||
spix_val = pixdata.apixels[spix];
|
||||
unsigned int val = lookup[spix_val];
|
||||
if (lookup_no[spix_val] == 2)
|
||||
val += dblpfofs[bpldualpf2of];
|
||||
val ^= xor_val;
|
||||
dpix_val = colors_for_drawing.acolors[val];
|
||||
}
|
||||
spix++;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
if (spritepixels[spix]) {
|
||||
out_val = colors_for_drawing.acolors[spritepixels[spix]];
|
||||
spritepixels[spix] = 0;
|
||||
} else {
|
||||
spix_val = pixdata.apixels[spix];
|
||||
unsigned int val = lookup[spix_val];
|
||||
if (lookup_no[spix_val] == 2)
|
||||
val += dblpfofs[bpldualpf2of];
|
||||
val ^= xor_val;
|
||||
out_val = colors_for_drawing.acolors[val];
|
||||
}
|
||||
spix++;
|
||||
if (spritepixels[spix]) {
|
||||
dpix_val = colors_for_drawing.acolors[spritepixels[spix]];
|
||||
spritepixels[spix] = 0;
|
||||
} else {
|
||||
spix_val = pixdata.apixels[spix];
|
||||
unsigned int val = lookup[spix_val];
|
||||
if (lookup_no[spix_val] == 2)
|
||||
val += dblpfofs[bpldualpf2of];
|
||||
val ^= xor_val;
|
||||
dpix_val = colors_for_drawing.acolors[val];
|
||||
}
|
||||
spix++;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
if (spritepixels[spix]) {
|
||||
dpix_val = colors_for_drawing.acolors[spritepixels[spix]];
|
||||
spritepixels[spix] = 0;
|
||||
} else {
|
||||
spix_val = pixdata.apixels[spix];
|
||||
unsigned int val = lookup[spix_val];
|
||||
if (lookup_no[spix_val] == 2)
|
||||
val += dblpfofs[bpldualpf2of];
|
||||
val ^= xor_val;
|
||||
dpix_val = colors_for_drawing.acolors[val];
|
||||
}
|
||||
spix++;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
} else if (bplehb) {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
if (spix_val >= 32 && spix_val < 64) {
|
||||
unsigned int c = (colors_for_drawing.color_regs_aga[spix_val - 32] >> 1) & 0x7F7F7F;
|
||||
dpix_val = CONVERT_RGB (c);
|
||||
} else
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
if (spix_val >= 32 && spix_val < 64) {
|
||||
unsigned int c = (colors_for_drawing.color_regs_aga[spix_val - 32] >> 1) & 0x7F7F7F;
|
||||
out_val = CONVERT_RGB (c);
|
||||
} else
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
if (spix_val >= 32 && spix_val < 64) {
|
||||
unsigned int c = (colors_for_drawing.color_regs_aga[spix_val - 32] >> 1) & 0x7F7F7F;
|
||||
dpix_val = CONVERT_RGB (c);
|
||||
} else
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
if (spix_val >= 32 && spix_val < 64) {
|
||||
unsigned int c = (colors_for_drawing.color_regs_aga[spix_val - 32] >> 1) & 0x7F7F7F;
|
||||
dpix_val = CONVERT_RGB (c);
|
||||
} else
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
} else {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
buf[dpix++] = colors_for_drawing.acolors[spix_val];
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
buf[dpix++] = colors_for_drawing.acolors[spix_val];
|
||||
}
|
||||
}
|
||||
|
||||
return spix;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef AGA
|
||||
static int NOINLINE linetoscr_16_stretch1_aga (int spix, int dpix, int stoppos)
|
||||
{
|
||||
uae_u16 *buf = (uae_u16 *) xlinebuffer;
|
||||
uae_u8 xor_val = (uae_u8)(dp_for_drawing->bplcon4 >> 8);
|
||||
|
||||
if (dp_for_drawing->ham_seen) {
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
out_val = CONVERT_RGB (ham_linebuf[spix]);
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (out_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[o], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
} else if (bpldualpf) {
|
||||
int *lookup = bpldualpfpri ? dblpf_ind2_aga : dblpf_ind1_aga;
|
||||
int *lookup_no = bpldualpfpri ? dblpf_2nd2 : dblpf_2nd1;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
if (spritepixels[spix]) {
|
||||
out_val = colors_for_drawing.acolors[spritepixels[spix]];
|
||||
spritepixels[spix] = 0;
|
||||
} else {
|
||||
spix_val = pixdata.apixels[spix];
|
||||
unsigned int val = lookup[spix_val];
|
||||
if (lookup_no[spix_val] == 2)
|
||||
val += dblpfofs[bpldualpf2of];
|
||||
val ^= xor_val;
|
||||
out_val = colors_for_drawing.acolors[val];
|
||||
}
|
||||
spix++;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (out_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[o], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
} else if (bplehb) {
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
if (spix_val >= 32 && spix_val < 64) {
|
||||
unsigned int c = (colors_for_drawing.color_regs_aga[spix_val - 32] >> 1) & 0x7F7F7F;
|
||||
out_val = CONVERT_RGB (c);
|
||||
} else
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (out_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[o], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
} else {
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix++] ^ xor_val;
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (out_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[o], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
}
|
||||
|
||||
return spix;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef AGA
|
||||
static int NOINLINE linetoscr_16_shrink1_aga (int spix, int dpix, int stoppos)
|
||||
{
|
||||
uae_u16 *buf = (uae_u16 *) xlinebuffer;
|
||||
uae_u8 xor_val = (uae_u8)(dp_for_drawing->bplcon4 >> 8);
|
||||
|
||||
if (dp_for_drawing->ham_seen) {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
buf[dpix++] = CONVERT_RGB (ham_linebuf[spix]);
|
||||
spix += 2;
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
out_val = CONVERT_RGB (ham_linebuf[spix]);
|
||||
spix += 2;
|
||||
dpix_val = CONVERT_RGB (ham_linebuf[spix]);
|
||||
spix += 2;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
buf[dpix++] = CONVERT_RGB (ham_linebuf[spix]);
|
||||
spix += 2;
|
||||
}
|
||||
} else if (bpldualpf) {
|
||||
int *lookup = bpldualpfpri ? dblpf_ind2_aga : dblpf_ind1_aga;
|
||||
int *lookup_no = bpldualpfpri ? dblpf_2nd2 : dblpf_2nd1;
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
if (spritepixels[spix]) {
|
||||
dpix_val = colors_for_drawing.acolors[spritepixels[spix]];
|
||||
spritepixels[spix] = 0;
|
||||
} else {
|
||||
spix_val = pixdata.apixels[spix];
|
||||
unsigned int val = lookup[spix_val];
|
||||
if (lookup_no[spix_val] == 2)
|
||||
val += dblpfofs[bpldualpf2of];
|
||||
val ^= xor_val;
|
||||
dpix_val = colors_for_drawing.acolors[val];
|
||||
}
|
||||
spix += 2;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
if (spritepixels[spix]) {
|
||||
out_val = colors_for_drawing.acolors[spritepixels[spix]];
|
||||
spritepixels[spix] = 0;
|
||||
} else {
|
||||
spix_val = pixdata.apixels[spix];
|
||||
unsigned int val = lookup[spix_val];
|
||||
if (lookup_no[spix_val] == 2)
|
||||
val += dblpfofs[bpldualpf2of];
|
||||
val ^= xor_val;
|
||||
out_val = colors_for_drawing.acolors[val];
|
||||
}
|
||||
spix += 2;
|
||||
if (spritepixels[spix]) {
|
||||
dpix_val = colors_for_drawing.acolors[spritepixels[spix]];
|
||||
spritepixels[spix] = 0;
|
||||
} else {
|
||||
spix_val = pixdata.apixels[spix];
|
||||
unsigned int val = lookup[spix_val];
|
||||
if (lookup_no[spix_val] == 2)
|
||||
val += dblpfofs[bpldualpf2of];
|
||||
val ^= xor_val;
|
||||
dpix_val = colors_for_drawing.acolors[val];
|
||||
}
|
||||
spix += 2;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
if (spritepixels[spix]) {
|
||||
dpix_val = colors_for_drawing.acolors[spritepixels[spix]];
|
||||
spritepixels[spix] = 0;
|
||||
} else {
|
||||
spix_val = pixdata.apixels[spix];
|
||||
unsigned int val = lookup[spix_val];
|
||||
if (lookup_no[spix_val] == 2)
|
||||
val += dblpfofs[bpldualpf2of];
|
||||
val ^= xor_val;
|
||||
dpix_val = colors_for_drawing.acolors[val];
|
||||
}
|
||||
spix += 2;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
} else if (bplehb) {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
spix_val = pixdata.apixels[spix] ^ xor_val;
|
||||
if (spix_val >= 32 && spix_val < 64) {
|
||||
unsigned int c = (colors_for_drawing.color_regs_aga[spix_val - 32] >> 1) & 0x7F7F7F;
|
||||
dpix_val = CONVERT_RGB (c);
|
||||
} else
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
spix += 2;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix] ^ xor_val;
|
||||
if (spix_val >= 32 && spix_val < 64) {
|
||||
unsigned int c = (colors_for_drawing.color_regs_aga[spix_val - 32] >> 1) & 0x7F7F7F;
|
||||
out_val = CONVERT_RGB (c);
|
||||
} else
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
spix += 2;
|
||||
spix_val = pixdata.apixels[spix] ^ xor_val;
|
||||
if (spix_val >= 32 && spix_val < 64) {
|
||||
unsigned int c = (colors_for_drawing.color_regs_aga[spix_val - 32] >> 1) & 0x7F7F7F;
|
||||
dpix_val = CONVERT_RGB (c);
|
||||
} else
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
spix += 2;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
spix_val = pixdata.apixels[spix] ^ xor_val;
|
||||
if (spix_val >= 32 && spix_val < 64) {
|
||||
unsigned int c = (colors_for_drawing.color_regs_aga[spix_val - 32] >> 1) & 0x7F7F7F;
|
||||
dpix_val = CONVERT_RGB (c);
|
||||
} else
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
spix += 2;
|
||||
buf[dpix++] = dpix_val;
|
||||
}
|
||||
} else {
|
||||
int rem;
|
||||
if (((long)&buf[dpix]) & 2) {
|
||||
uae_u32 spix_val;
|
||||
spix_val = pixdata.apixels[spix] ^ xor_val;
|
||||
spix += 2;
|
||||
buf[dpix++] = colors_for_drawing.acolors[spix_val];
|
||||
}
|
||||
if (dpix >= stoppos)
|
||||
return spix;
|
||||
rem = (((long)&buf[stoppos]) & 2);
|
||||
if (rem)
|
||||
stoppos--;
|
||||
while (dpix < stoppos) {
|
||||
uae_u32 spix_val;
|
||||
uae_u32 dpix_val;
|
||||
uae_u32 out_val;
|
||||
|
||||
spix_val = pixdata.apixels[spix] ^ xor_val;
|
||||
out_val = colors_for_drawing.acolors[spix_val];
|
||||
spix += 2;
|
||||
spix_val = pixdata.apixels[spix] ^ xor_val;
|
||||
dpix_val = colors_for_drawing.acolors[spix_val];
|
||||
spix += 2;
|
||||
#ifndef ARMV6_ASSEMBLY
|
||||
out_val = (out_val & 0xFFFF) | (dpix_val << 16);
|
||||
#else
|
||||
__asm__ __volatile__ (
|
||||
"pkhbt %[o], %[o], %[d], lsl #16 \n\t"
|
||||
: [o] "+r" (out_val) : [d] "r" (dpix_val) );
|
||||
#endif
|
||||
*((uae_u32 *)&buf[dpix]) = out_val;
|
||||
dpix += 2;
|
||||
}
|
||||
if (rem) {
|
||||
uae_u32 spix_val;
|
||||
spix_val = pixdata.apixels[spix] ^ xor_val;
|
||||
spix += 2;
|
||||
buf[dpix++] = colors_for_drawing.acolors[spix_val];
|
||||
}
|
||||
}
|
||||
|
||||
return spix;
|
||||
}
|
||||
#endif
|
|
@ -2,17 +2,17 @@
|
|||
static __inline__ int LNAME (int spix, int dpix, int stoppos)
|
||||
{
|
||||
TYPE *buf = ((TYPE *)xlinebuffer);
|
||||
#if AGA
|
||||
#if AGA_LTS
|
||||
uae_u8 xor_val;
|
||||
#endif
|
||||
|
||||
#if AGA
|
||||
#if AGA_LTS
|
||||
xor_val = (uae_u8)(dp_for_drawing->bplcon4 >> 8);
|
||||
#endif
|
||||
if (dp_for_drawing->ham_seen) {
|
||||
/* HAM 6 / HAM 8 */
|
||||
while (dpix < stoppos) {
|
||||
#if AGA
|
||||
#if AGA_LTS
|
||||
TYPE d = CONVERT_RGB (ham_linebuf[spix]);
|
||||
#else
|
||||
TYPE d = xcolors[ham_linebuf[spix]];
|
||||
|
@ -24,7 +24,7 @@ static __inline__ int LNAME (int spix, int dpix, int stoppos)
|
|||
#endif
|
||||
}
|
||||
} else if (bpldualpf) {
|
||||
#if AGA
|
||||
#if AGA_LTS
|
||||
/* AGA Dual playfield */
|
||||
int *lookup = bpldualpfpri ? dblpf_ind2_aga : dblpf_ind1_aga;
|
||||
int *lookup_no = bpldualpfpri ? dblpf_2nd2 : dblpf_2nd1;
|
||||
|
@ -61,7 +61,7 @@ static __inline__ int LNAME (int spix, int dpix, int stoppos)
|
|||
#endif
|
||||
} else if (bplehb) {
|
||||
while (dpix < stoppos) {
|
||||
#if AGA
|
||||
#if AGA_LTS
|
||||
/* AGA EHB playfield */
|
||||
int p = pixdata.apixels[spix]^xor_val;
|
||||
TYPE d;
|
||||
|
@ -89,7 +89,7 @@ static __inline__ int LNAME (int spix, int dpix, int stoppos)
|
|||
}
|
||||
} else {
|
||||
while (dpix < stoppos) {
|
||||
#if AGA
|
||||
#if AGA_LTS
|
||||
TYPE d = colors_for_drawing.acolors[pixdata.apixels[spix]^xor_val];
|
||||
#else
|
||||
TYPE d = colors_for_drawing.acolors[pixdata.apixels[spix]];
|
||||
|
@ -107,4 +107,4 @@ static __inline__ int LNAME (int spix, int dpix, int stoppos)
|
|||
#undef LNAME
|
||||
#undef HDOUBLE
|
||||
#undef SRC_INC
|
||||
#undef AGA
|
||||
#undef AGA_LTS
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "traps.h"
|
||||
#include "osemu.h"
|
||||
#include "picasso96.h"
|
||||
#include "bsdsocket.h"
|
||||
#include "drawing.h"
|
||||
#include "native2amiga.h"
|
||||
#include "savestate.h"
|
||||
|
@ -47,15 +46,10 @@ long int version = 256*65536L*UAEMAJOR + 65536L*UAEMINOR + UAESUBREV;
|
|||
struct uae_prefs currprefs, changed_prefs;
|
||||
|
||||
int no_gui = 0;
|
||||
int joystickpresent = 0;
|
||||
int cloanto_rom = 0;
|
||||
|
||||
struct gui_info gui_data;
|
||||
|
||||
char warning_buffer[256];
|
||||
|
||||
char optionsfile[256];
|
||||
|
||||
/* If you want to pipe printer output to a file, put something like
|
||||
* "cat >>printerfile.tmp" above.
|
||||
* The printer support was only tested with the driver "PostScript" on
|
||||
|
@ -78,6 +72,7 @@ void discard_prefs (struct uae_prefs *p, int type)
|
|||
}
|
||||
#ifdef FILESYS
|
||||
filesys_cleanup ();
|
||||
p->mountitems = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -395,7 +390,6 @@ void do_leave_program (void)
|
|||
inputdevice_close ();
|
||||
DISK_free ();
|
||||
close_sound ();
|
||||
// if (! no_gui)
|
||||
gui_exit ();
|
||||
#ifdef USE_SDL
|
||||
SDL_Quit ();
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include "custom.h"
|
||||
|
||||
|
||||
extern int screen_is_picasso;
|
||||
|
||||
int64_t g_uae_epoch = 0;
|
||||
|
||||
|
||||
|
|
1013
src/memory.cpp
1013
src/memory.cpp
File diff suppressed because it is too large
Load diff
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "uae.h"
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "native2amiga.h"
|
||||
|
||||
smp_comm_pipe native2amiga_pending;
|
||||
static uae_sem_t n2asem;
|
||||
static uae_sem_t n2asem = 0;
|
||||
|
||||
/*
|
||||
* to be called when setting up the hardware
|
||||
|
@ -30,7 +30,11 @@ static uae_sem_t n2asem;
|
|||
|
||||
void native2amiga_install (void)
|
||||
{
|
||||
if(native2amiga_pending.size != 100)
|
||||
init_comm_pipe (&native2amiga_pending, 100, 2);
|
||||
if(n2asem != 0)
|
||||
uae_sem_destroy(&n2asem);
|
||||
n2asem = 0;
|
||||
uae_sem_init (&n2asem, 0, 1);
|
||||
}
|
||||
|
||||
|
|
115
src/newcpu.cpp
115
src/newcpu.cpp
|
@ -58,8 +58,6 @@ extern uae_u8* compiled_code;
|
|||
#include <signal.h>
|
||||
/* For faster cycles handling */
|
||||
signed long pissoff=0;
|
||||
/* Counter for missed vsyncmintime deadlines */
|
||||
int gonebad=0;
|
||||
#else
|
||||
/* Need to have these somewhere */
|
||||
static void build_comp(void) {}
|
||||
|
@ -76,10 +74,9 @@ uaecptr last_fault_for_exception_3;
|
|||
static int last_writeaccess_for_exception_3;
|
||||
/* instruction (1) or data (0) access */
|
||||
static int last_instructionaccess_for_exception_3;
|
||||
unsigned long irqcycles[15];
|
||||
int irqdelay[15];
|
||||
int mmu_enabled, mmu_triggered;
|
||||
int cpu_cycles;
|
||||
static uaecptr last_trace_ad = 0;
|
||||
|
||||
const int areg_byteinc[] = { 1,1,1,1,1,1,1,2 };
|
||||
const int imm8_table[] = { 8,1,2,3,4,5,6,7 };
|
||||
|
@ -99,15 +96,6 @@ static uae_u64 srp_030, crp_030;
|
|||
static uae_u32 tt0_030, tt1_030, tc_030;
|
||||
static uae_u16 mmusr_030;
|
||||
|
||||
static __inline__ unsigned int cft_map (unsigned int f)
|
||||
{
|
||||
//#if ((!defined(HAVE_GET_WORD_UNSWAPPED)) || (defined(FULLMMU)))
|
||||
return f;
|
||||
//#else
|
||||
// return do_byteswap_16(f);
|
||||
//#endif
|
||||
}
|
||||
|
||||
#ifdef DEBUG_M68K
|
||||
|
||||
int debug_frame_counter = 0;
|
||||
|
@ -160,11 +148,11 @@ static void set_cpu_caches(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
unsigned long REGPARAM3 op_illg_1 (uae_u32 opcode, struct regstruct *regs) REGPARAM;
|
||||
static unsigned long REGPARAM3 op_illg_1 (uae_u32 opcode, struct regstruct *regs) REGPARAM;
|
||||
|
||||
unsigned long REGPARAM2 op_illg_1 (uae_u32 opcode, struct regstruct *regs)
|
||||
static unsigned long REGPARAM2 op_illg_1 (uae_u32 opcode, struct regstruct *regs)
|
||||
{
|
||||
op_illg (cft_map (opcode), regs);
|
||||
op_illg (opcode, regs);
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
@ -217,9 +205,9 @@ static void build_cpufunctbl (void)
|
|||
}
|
||||
|
||||
for (opcode = 0; opcode < 65536; opcode++)
|
||||
cpufunctbl[cft_map (opcode)] = op_illg_1;
|
||||
cpufunctbl[opcode] = op_illg_1;
|
||||
for (i = 0; tbl[i].handler != NULL; i++)
|
||||
cpufunctbl[cft_map (tbl[i].opcode)] = tbl[i].handler;
|
||||
cpufunctbl[tbl[i].opcode] = tbl[i].handler;
|
||||
|
||||
for (opcode = 0; opcode < 65536; opcode++) {
|
||||
cpuop_func *f;
|
||||
|
@ -228,10 +216,10 @@ static void build_cpufunctbl (void)
|
|||
continue;
|
||||
|
||||
if (table68k[opcode].handler != -1) {
|
||||
f = cpufunctbl[cft_map (table68k[opcode].handler)];
|
||||
f = cpufunctbl[table68k[opcode].handler];
|
||||
if (f == op_illg_1)
|
||||
abort();
|
||||
cpufunctbl[cft_map (opcode)] = f;
|
||||
cpufunctbl[opcode] = f;
|
||||
}
|
||||
}
|
||||
#ifdef JIT
|
||||
|
@ -247,25 +235,41 @@ void fill_prefetch_slow (struct regstruct *regs)
|
|||
regs->irc = get_word (m68k_getpc (regs) + 2);
|
||||
}
|
||||
|
||||
unsigned long cycles_mask, cycles_val;
|
||||
unsigned long cycles_shift;
|
||||
unsigned long cycles_shift_2;
|
||||
|
||||
static void update_68k_cycles (void)
|
||||
{
|
||||
cycles_mask = 0;
|
||||
cycles_val = currprefs.m68k_speed;
|
||||
if (currprefs.m68k_speed < 1) {
|
||||
cycles_mask = 0xFFFFFFFF;
|
||||
cycles_val = 0;
|
||||
cycles_shift = 0;
|
||||
cycles_shift_2 = 0;
|
||||
if(currprefs.m68k_speed == M68K_SPEED_14MHZ_CYCLES)
|
||||
cycles_shift = 1;
|
||||
else if(currprefs.m68k_speed == M68K_SPEED_25MHZ_CYCLES)
|
||||
{
|
||||
cycles_shift = 2;
|
||||
cycles_shift_2 = 5;
|
||||
}
|
||||
}
|
||||
|
||||
STATIC_INLINE unsigned long adjust_cycles(unsigned long cycles)
|
||||
{
|
||||
unsigned long res = cycles >> cycles_shift;
|
||||
if(cycles_shift_2 > 0)
|
||||
return res + (cycles >> cycles_shift_2);
|
||||
else
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
void check_prefs_changed_adr24 (void)
|
||||
{
|
||||
if(currprefs.address_space_24 != changed_prefs.address_space_24)
|
||||
{
|
||||
currprefs.address_space_24 = changed_prefs.address_space_24;
|
||||
|
||||
if (currprefs.address_space_24) {
|
||||
regs.address_space_mask = 0x00ffffff;
|
||||
fixup_prefs(&changed_prefs);
|
||||
} else {
|
||||
regs.address_space_mask = 0xffffffff;
|
||||
}
|
||||
|
@ -278,8 +282,6 @@ static void prefs_changed_cpu (void)
|
|||
currprefs.cpu_model = changed_prefs.cpu_model;
|
||||
currprefs.fpu_model = changed_prefs.fpu_model;
|
||||
currprefs.cpu_compatible = changed_prefs.cpu_compatible;
|
||||
// currprefs.cpu_cycle_exact = changed_prefs.cpu_cycle_exact;
|
||||
// currprefs.blitter_cycle_exact = changed_prefs.cpu_cycle_exact;
|
||||
}
|
||||
|
||||
void check_prefs_changed_cpu (void)
|
||||
|
@ -351,7 +353,6 @@ void init_m68k (void)
|
|||
}
|
||||
|
||||
struct regstruct regs;
|
||||
static long int m68kpc_offset;
|
||||
|
||||
int get_cpu_model(void)
|
||||
{
|
||||
|
@ -512,18 +513,6 @@ static void exception_trace (int nr)
|
|||
regs.t1 = regs.t0 = regs.m = 0;
|
||||
}
|
||||
|
||||
/* for building exception frames */
|
||||
static __inline__ void exc_push_word(uae_u16 w)
|
||||
{
|
||||
m68k_areg(®s, 7) -= 2;
|
||||
put_word(m68k_areg(®s, 7), w);
|
||||
}
|
||||
static __inline__ void exc_push_long(uae_u32 l)
|
||||
{
|
||||
m68k_areg(®s, 7) -= 4;
|
||||
put_long (m68k_areg(®s, 7), l);
|
||||
}
|
||||
|
||||
void REGPARAM2 Exception (int nr, struct regstruct *regs, uaecptr oldpc)
|
||||
{
|
||||
uae_u32 currpc = m68k_getpc (regs), newpc;
|
||||
|
@ -1062,9 +1051,13 @@ void m68k_mull (uae_u32 opcode, uae_u32 src, uae_u16 extra)
|
|||
|
||||
void m68k_reset (int hardreset)
|
||||
{
|
||||
pissoff = 0;
|
||||
cpu_cycles = 0;
|
||||
last_trace_ad = 0;
|
||||
|
||||
regs.spcflags = 0;
|
||||
#ifdef SAVESTATE
|
||||
if (savestate_state == STATE_RESTORE /* || savestate_state == STATE_REWIND */) {
|
||||
if (savestate_state == STATE_RESTORE) {
|
||||
m68k_setpc (®s, regs.pc);
|
||||
/* MakeFromSR() must not swap stack pointer */
|
||||
regs.s = (regs.sr >> 13) & 1;
|
||||
|
@ -1100,7 +1093,6 @@ void m68k_reset (int hardreset)
|
|||
regs.itt0 = regs.itt1 = regs.dtt0 = regs.dtt1 = 0;
|
||||
regs.tcr = regs.mmusr = regs.urp = regs.srp = regs.buscr = 0;
|
||||
|
||||
// a3000_fakekick(0);
|
||||
/* only (E)nable bit is zeroed when CPU is reset, A3000 SuperKickstart expects this */
|
||||
tc_030 &= ~0x80000000;
|
||||
tt0_030 &= ~0x80000000;
|
||||
|
@ -1117,7 +1109,6 @@ void m68k_reset (int hardreset)
|
|||
regs.pcr = 0;
|
||||
if (currprefs.cpu_model == 68060) {
|
||||
regs.pcr = currprefs.fpu_model ? MC68060_PCR : MC68EC060_PCR;
|
||||
//regs.pcr |= (currprefs.cpu060_revision & 0xff) << 8;
|
||||
regs.pcr |= 2;
|
||||
}
|
||||
fill_prefetch_slow (®s);
|
||||
|
@ -1198,7 +1189,6 @@ static void mmu_op30_pmove(uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr ext
|
|||
int rw = (next >> 9) & 1;
|
||||
int fd = (next >> 8) & 1;
|
||||
char *reg = NULL;
|
||||
uae_u32 otc = tc_030;
|
||||
int siz;
|
||||
|
||||
switch (preg)
|
||||
|
@ -1263,11 +1253,6 @@ static void mmu_op30_pmove(uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr ext
|
|||
op_illg(opcode, ®s);
|
||||
return;
|
||||
}
|
||||
// if (currprefs.cs_mbdmac == 1 && currprefs.mbresmem_low_size > 0) {
|
||||
// if (otc != tc_030) {
|
||||
// a3000_fakekick(tc_030 & 0x80000000);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
static void mmu_op30_ptest(uaecptr pc, uae_u32 opcode, uae_u16 next, uaecptr extra)
|
||||
|
@ -1328,8 +1313,6 @@ void mmu_op(uae_u32 opcode, struct regstruct *regs, uae_u32 extra)
|
|||
|
||||
#endif
|
||||
|
||||
static uaecptr last_trace_ad = 0;
|
||||
|
||||
static void do_trace (void)
|
||||
{
|
||||
if (regs.t0 && currprefs.cpu_model >= 68020) {
|
||||
|
@ -1477,13 +1460,12 @@ static void m68k_run_1 (void)
|
|||
|
||||
do_cycles (cpu_cycles);
|
||||
cpu_cycles = (*cpufunctbl[opcode])(opcode, r);
|
||||
cpu_cycles &= cycles_mask;
|
||||
cpu_cycles |= cycles_val;
|
||||
cpu_cycles = adjust_cycles(cpu_cycles);
|
||||
if (r->spcflags) {
|
||||
if (do_specialties (cpu_cycles, r))
|
||||
return;
|
||||
}
|
||||
if (!currprefs.cpu_compatible || (currprefs.cpu_model == 68000))
|
||||
if (!currprefs.cpu_compatible)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1509,8 +1491,7 @@ void exec_nostats(void)
|
|||
uae_u16 opcode = get_iword(r, 0);
|
||||
|
||||
cpu_cycles = (*cpufunctbl[opcode])(opcode, r);
|
||||
cpu_cycles &= cycles_mask;
|
||||
cpu_cycles |= cycles_val;
|
||||
cpu_cycles = adjust_cycles(cpu_cycles);
|
||||
|
||||
do_cycles (cpu_cycles);
|
||||
|
||||
|
@ -1519,8 +1500,6 @@ void exec_nostats(void)
|
|||
}
|
||||
}
|
||||
|
||||
static int triggered;
|
||||
|
||||
void execute_normal(void)
|
||||
{
|
||||
struct regstruct *r = ®s;
|
||||
|
@ -1547,8 +1526,7 @@ void execute_normal(void)
|
|||
|
||||
cpu_cycles = (*cpufunctbl[opcode])(opcode, r);
|
||||
|
||||
cpu_cycles &= cycles_mask;
|
||||
cpu_cycles |= cycles_val;
|
||||
cpu_cycles = adjust_cycles(cpu_cycles);
|
||||
do_cycles (cpu_cycles);
|
||||
total_cycles += cpu_cycles;
|
||||
pc_hist[blocklen].specmem = special_mem;
|
||||
|
@ -1614,8 +1592,7 @@ static void m68k_run_2p (void)
|
|||
prefetch_pc = m68k_getpc (r) + 2;
|
||||
prefetch = get_longi (prefetch_pc);
|
||||
cpu_cycles = (*cpufunctbl[opcode])(opcode, r);
|
||||
cpu_cycles &= cycles_mask;
|
||||
cpu_cycles |= cycles_val;
|
||||
cpu_cycles = adjust_cycles(cpu_cycles);
|
||||
if (r->spcflags) {
|
||||
if (do_specialties (cpu_cycles, r))
|
||||
return;
|
||||
|
@ -1636,8 +1613,7 @@ static void m68k_run_2 (void)
|
|||
m68k_dumpstate();
|
||||
#endif
|
||||
cpu_cycles = (*cpufunctbl[opcode])(opcode, r);
|
||||
cpu_cycles &= cycles_mask;
|
||||
cpu_cycles |= cycles_val;
|
||||
cpu_cycles = adjust_cycles(cpu_cycles);
|
||||
if (r->spcflags) {
|
||||
if (do_specialties (cpu_cycles, r))
|
||||
return;
|
||||
|
@ -1652,8 +1628,7 @@ static void m68k_run_mmu (void)
|
|||
uae_u32 opcode = get_iword (®s, 0);
|
||||
do_cycles (cpu_cycles);
|
||||
cpu_cycles = (*cpufunctbl[opcode])(opcode, ®s);
|
||||
cpu_cycles &= cycles_mask;
|
||||
cpu_cycles |= cycles_val;
|
||||
cpu_cycles = adjust_cycles(cpu_cycles);
|
||||
if (regs.spcflags) {
|
||||
if (do_specialties (cpu_cycles, ®s))
|
||||
return;
|
||||
|
@ -1691,13 +1666,13 @@ void m68k_go (int may_quit)
|
|||
int hardreset = (quit_program == 3 ? 1 : 0) | hardboot;
|
||||
if (quit_program == 1)
|
||||
break;
|
||||
if(quit_program == 3)
|
||||
reinit_amiga();
|
||||
quit_program = 0;
|
||||
hardboot = 0;
|
||||
#ifdef SAVESTATE
|
||||
if (savestate_state == STATE_RESTORE)
|
||||
restore_state (savestate_fname);
|
||||
// else if (savestate_state == STATE_REWIND)
|
||||
// savestate_rewind ();
|
||||
#endif
|
||||
check_prefs_changed_adr24();
|
||||
customreset (hardreset);
|
||||
|
@ -1954,7 +1929,7 @@ void cpureset (void)
|
|||
uaecptr ksboot = 0xf80002 - 2; /* -2 = RESET hasn't increased PC yet */
|
||||
uae_u16 ins;
|
||||
|
||||
if (currprefs.cpu_compatible /*|| currprefs.cpu_cycle_exact*/) {
|
||||
if (currprefs.cpu_compatible) {
|
||||
customreset (0);
|
||||
return;
|
||||
}
|
||||
|
|
311
src/od-pandora/gui/CreateFilesysHardfile.cpp
Normal file
311
src/od-pandora/gui/CreateFilesysHardfile.cpp
Normal file
|
@ -0,0 +1,311 @@
|
|||
#include <guichan.hpp>
|
||||
#include <SDL/SDL_ttf.h>
|
||||
#include <guichan/sdl.hpp>
|
||||
#include "sdltruetypefont.hpp"
|
||||
#include "SelectorEntry.hpp"
|
||||
#include "UaeRadioButton.hpp"
|
||||
#include "UaeDropDown.hpp"
|
||||
#include "UaeCheckBox.hpp"
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "options.h"
|
||||
#include "memory.h"
|
||||
#include "uae.h"
|
||||
#include "autoconf.h"
|
||||
#include "filesys.h"
|
||||
#include "gui.h"
|
||||
#include "target.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
||||
#define DIALOG_WIDTH 620
|
||||
#define DIALOG_HEIGHT 202
|
||||
|
||||
static const char *harddisk_filter[] = { ".hdf", "\0" };
|
||||
|
||||
static bool dialogResult = false;
|
||||
static bool dialogFinished = false;
|
||||
static bool fileSelected = false;
|
||||
|
||||
static gcn::Window *wndCreateFilesysHardfile;
|
||||
static gcn::Button* cmdOK;
|
||||
static gcn::Button* cmdCancel;
|
||||
static gcn::Label *lblDevice;
|
||||
static gcn::TextField *txtDevice;
|
||||
static gcn::UaeCheckBox* chkAutoboot;
|
||||
static gcn::Label *lblBootPri;
|
||||
static gcn::TextField *txtBootPri;
|
||||
static gcn::Label *lblPath;
|
||||
static gcn::TextField *txtPath;
|
||||
static gcn::Button* cmdPath;
|
||||
static gcn::Label *lblSize;
|
||||
static gcn::TextField *txtSize;
|
||||
|
||||
|
||||
class CreateFilesysHardfileActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
{
|
||||
if(actionEvent.getSource() == cmdPath)
|
||||
{
|
||||
char tmp[MAX_PATH];
|
||||
strncpy(tmp, txtPath->getText().c_str(), MAX_PATH);
|
||||
wndCreateFilesysHardfile->releaseModalFocus();
|
||||
if(SelectFile("Create harddisk file", tmp, harddisk_filter, true))
|
||||
{
|
||||
txtPath->setText(tmp);
|
||||
fileSelected = true;
|
||||
}
|
||||
wndCreateFilesysHardfile->requestModalFocus();
|
||||
cmdPath->requestFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (actionEvent.getSource() == cmdOK)
|
||||
{
|
||||
if(txtDevice->getText().length() <= 0)
|
||||
{
|
||||
wndCreateFilesysHardfile->setCaption("Please enter a device name.");
|
||||
return;
|
||||
}
|
||||
if(!fileSelected)
|
||||
{
|
||||
wndCreateFilesysHardfile->setCaption("Please select a new filename.");
|
||||
return;
|
||||
}
|
||||
dialogResult = true;
|
||||
}
|
||||
dialogFinished = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
static CreateFilesysHardfileActionListener* createFilesysHardfileActionListener;
|
||||
|
||||
|
||||
static void InitCreateFilesysHardfile(void)
|
||||
{
|
||||
wndCreateFilesysHardfile = new gcn::Window("Create");
|
||||
wndCreateFilesysHardfile->setSize(DIALOG_WIDTH, DIALOG_HEIGHT);
|
||||
wndCreateFilesysHardfile->setPosition((GUI_WIDTH - DIALOG_WIDTH) / 2, (GUI_HEIGHT - DIALOG_HEIGHT) / 2);
|
||||
wndCreateFilesysHardfile->setBaseColor(gui_baseCol + 0x202020);
|
||||
wndCreateFilesysHardfile->setCaption("Create hardfile");
|
||||
wndCreateFilesysHardfile->setTitleBarHeight(TITLEBAR_HEIGHT);
|
||||
|
||||
createFilesysHardfileActionListener = new CreateFilesysHardfileActionListener();
|
||||
|
||||
cmdOK = new gcn::Button("Ok");
|
||||
cmdOK->setSize(BUTTON_WIDTH, BUTTON_HEIGHT);
|
||||
cmdOK->setPosition(DIALOG_WIDTH - DISTANCE_BORDER - 2 * BUTTON_WIDTH - DISTANCE_NEXT_X, DIALOG_HEIGHT - 2 * DISTANCE_BORDER - BUTTON_HEIGHT - 10);
|
||||
cmdOK->setBaseColor(gui_baseCol + 0x202020);
|
||||
cmdOK->setId("createHdfOK");
|
||||
cmdOK->addActionListener(createFilesysHardfileActionListener);
|
||||
|
||||
cmdCancel = new gcn::Button("Cancel");
|
||||
cmdCancel->setSize(BUTTON_WIDTH, BUTTON_HEIGHT);
|
||||
cmdCancel->setPosition(DIALOG_WIDTH - DISTANCE_BORDER - BUTTON_WIDTH, DIALOG_HEIGHT - 2 * DISTANCE_BORDER - BUTTON_HEIGHT - 10);
|
||||
cmdCancel->setBaseColor(gui_baseCol + 0x202020);
|
||||
cmdCancel->setId("createHdfCancel");
|
||||
cmdCancel->addActionListener(createFilesysHardfileActionListener);
|
||||
|
||||
lblDevice = new gcn::Label("Device Name:");
|
||||
lblDevice->setSize(100, LABEL_HEIGHT);
|
||||
lblDevice->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtDevice = new gcn::TextField();
|
||||
txtDevice->setSize(80, TEXTFIELD_HEIGHT);
|
||||
txtDevice->setId("createHdfDev");
|
||||
|
||||
chkAutoboot = new gcn::UaeCheckBox("Bootable", true);
|
||||
chkAutoboot->setId("createHdfAutoboot");
|
||||
|
||||
lblBootPri = new gcn::Label("Boot priority:");
|
||||
lblBootPri->setSize(100, LABEL_HEIGHT);
|
||||
lblBootPri->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtBootPri = new gcn::TextField();
|
||||
txtBootPri->setSize(40, TEXTFIELD_HEIGHT);
|
||||
txtBootPri->setId("createHdfBootPri");
|
||||
|
||||
lblSize = new gcn::Label("Size (MB):");
|
||||
lblSize->setSize(100, LABEL_HEIGHT);
|
||||
lblSize->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtSize = new gcn::TextField();
|
||||
txtSize->setSize(60, TEXTFIELD_HEIGHT);
|
||||
txtSize->setId("createHdfSize");
|
||||
|
||||
lblPath = new gcn::Label("Path:");
|
||||
lblPath->setSize(100, LABEL_HEIGHT);
|
||||
lblPath->setAlignment(gcn::Graphics::RIGHT);
|
||||
txtPath = new gcn::TextField();
|
||||
txtPath->setSize(438, TEXTFIELD_HEIGHT);
|
||||
txtPath->setEnabled(false);
|
||||
cmdPath = new gcn::Button("...");
|
||||
cmdPath->setSize(SMALL_BUTTON_WIDTH, SMALL_BUTTON_HEIGHT);
|
||||
cmdPath->setBaseColor(gui_baseCol + 0x202020);
|
||||
cmdPath->setId("createHdfPath");
|
||||
cmdPath->addActionListener(createFilesysHardfileActionListener);
|
||||
|
||||
int posY = DISTANCE_BORDER;
|
||||
wndCreateFilesysHardfile->add(lblDevice, DISTANCE_BORDER, posY);
|
||||
wndCreateFilesysHardfile->add(txtDevice, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
wndCreateFilesysHardfile->add(chkAutoboot, 235, posY + 1);
|
||||
wndCreateFilesysHardfile->add(lblBootPri, 335, posY);
|
||||
wndCreateFilesysHardfile->add(txtBootPri, 335 + lblBootPri->getWidth() + 8, posY);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
wndCreateFilesysHardfile->add(lblPath, DISTANCE_BORDER, posY);
|
||||
wndCreateFilesysHardfile->add(txtPath, DISTANCE_BORDER + lblPath->getWidth() + 8, posY);
|
||||
wndCreateFilesysHardfile->add(cmdPath, wndCreateFilesysHardfile->getWidth() - DISTANCE_BORDER - SMALL_BUTTON_WIDTH, posY);
|
||||
posY += txtPath->getHeight() + DISTANCE_NEXT_Y;
|
||||
wndCreateFilesysHardfile->add(lblSize, DISTANCE_BORDER, posY);
|
||||
wndCreateFilesysHardfile->add(txtSize, DISTANCE_BORDER + lblSize->getWidth() + 8, posY);
|
||||
|
||||
wndCreateFilesysHardfile->add(cmdOK);
|
||||
wndCreateFilesysHardfile->add(cmdCancel);
|
||||
|
||||
gui_top->add(wndCreateFilesysHardfile);
|
||||
|
||||
txtDevice->requestFocus();
|
||||
wndCreateFilesysHardfile->requestModalFocus();
|
||||
}
|
||||
|
||||
|
||||
static void ExitCreateFilesysHardfile(void)
|
||||
{
|
||||
wndCreateFilesysHardfile->releaseModalFocus();
|
||||
gui_top->remove(wndCreateFilesysHardfile);
|
||||
|
||||
delete lblDevice;
|
||||
delete txtDevice;
|
||||
delete chkAutoboot;
|
||||
delete lblBootPri;
|
||||
delete txtBootPri;
|
||||
delete lblPath;
|
||||
delete txtPath;
|
||||
delete cmdPath;
|
||||
delete lblSize;
|
||||
delete txtSize;
|
||||
|
||||
delete cmdOK;
|
||||
delete cmdCancel;
|
||||
delete createFilesysHardfileActionListener;
|
||||
|
||||
delete wndCreateFilesysHardfile;
|
||||
}
|
||||
|
||||
|
||||
static void CreateFilesysHardfileLoop(void)
|
||||
{
|
||||
while(!dialogFinished)
|
||||
{
|
||||
SDL_Event event;
|
||||
while(SDL_PollEvent(&event))
|
||||
{
|
||||
if (event.type == SDL_KEYDOWN)
|
||||
{
|
||||
switch(event.key.keysym.sym)
|
||||
{
|
||||
case SDLK_ESCAPE:
|
||||
dialogFinished = true;
|
||||
break;
|
||||
|
||||
case SDLK_UP:
|
||||
if(HandleNavigation(DIRECTION_UP))
|
||||
continue; // Don't change value when enter ComboBox -> don't send event to control
|
||||
break;
|
||||
|
||||
case SDLK_DOWN:
|
||||
if(HandleNavigation(DIRECTION_DOWN))
|
||||
continue; // Don't change value when enter ComboBox -> don't send event to control
|
||||
break;
|
||||
|
||||
case SDLK_LEFT:
|
||||
if(HandleNavigation(DIRECTION_LEFT))
|
||||
continue; // Don't change value when enter Slider -> don't send event to control
|
||||
break;
|
||||
|
||||
case SDLK_RIGHT:
|
||||
if(HandleNavigation(DIRECTION_RIGHT))
|
||||
continue; // Don't change value when enter Slider -> don't send event to control
|
||||
break;
|
||||
|
||||
case SDLK_PAGEDOWN:
|
||||
case SDLK_HOME:
|
||||
event.key.keysym.sym = SDLK_RETURN;
|
||||
gui_input->pushInput(event); // Fire key down
|
||||
event.type = SDL_KEYUP; // and the key up
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// Send event to guichan-controls
|
||||
//-------------------------------------------------
|
||||
gui_input->pushInput(event);
|
||||
}
|
||||
|
||||
// Now we let the Gui object perform its logic.
|
||||
uae_gui->logic();
|
||||
// Now we let the Gui object draw itself.
|
||||
uae_gui->draw();
|
||||
// Finally we update the screen.
|
||||
SDL_Flip(gui_screen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool CreateFilesysHardfile(void)
|
||||
{
|
||||
struct uaedev_config_info *uci;
|
||||
std::string strroot;
|
||||
char tmp[32];
|
||||
char zero = 0;
|
||||
|
||||
dialogResult = false;
|
||||
dialogFinished = false;
|
||||
|
||||
InitCreateFilesysHardfile();
|
||||
|
||||
CreateDefaultDevicename(tmp);
|
||||
txtDevice->setText(tmp);
|
||||
strroot.assign(currentDir);
|
||||
txtPath->setText(strroot);
|
||||
fileSelected = false;
|
||||
|
||||
txtBootPri->setText("0");
|
||||
txtSize->setText("100");
|
||||
|
||||
CreateFilesysHardfileLoop();
|
||||
ExitCreateFilesysHardfile();
|
||||
|
||||
if(dialogResult)
|
||||
{
|
||||
char buffer[512];
|
||||
int size = atoi(txtSize->getText().c_str());
|
||||
if(size < 1)
|
||||
size = 1;
|
||||
if(size > 2048)
|
||||
size = 2048;
|
||||
int bp = tweakbootpri(atoi(txtBootPri->getText().c_str()), 1, 0);
|
||||
extractPath((char *) txtPath->getText().c_str(), currentDir);
|
||||
|
||||
FILE *newFile = fopen(txtPath->getText().c_str(), "wb");
|
||||
if(!newFile)
|
||||
{
|
||||
ShowMessage("Create Hardfile", "Unable to create new file.", "", "Ok", "");
|
||||
return false;
|
||||
}
|
||||
fseek(newFile, size * 1024 * 1024 - 1, SEEK_SET);
|
||||
fwrite(&zero, 1, 1, newFile);
|
||||
fclose(newFile);
|
||||
|
||||
uci = add_filesys_config(&changed_prefs, -1, (char *) txtDevice->getText().c_str(),
|
||||
0, (char *) txtPath->getText().c_str(), 0,
|
||||
32, (size / 1024) + 1, 2, 512,
|
||||
bp, 0, 0, 0);
|
||||
if (uci)
|
||||
hardfile_do_disk_change (uci->configoffset, 1);
|
||||
}
|
||||
|
||||
return dialogResult;
|
||||
}
|
|
@ -35,6 +35,7 @@ static gcn::Button* cmdCancel;
|
|||
static gcn::Label *lblDevice;
|
||||
static gcn::TextField *txtDevice;
|
||||
static gcn::UaeCheckBox* chkReadWrite;
|
||||
static gcn::UaeCheckBox* chkAutoboot;
|
||||
static gcn::Label *lblBootPri;
|
||||
static gcn::TextField *txtBootPri;
|
||||
static gcn::Label *lblPath;
|
||||
|
@ -72,9 +73,14 @@ class FilesysHardfileActionListener : public gcn::ActionListener
|
|||
{
|
||||
if (actionEvent.getSource() == cmdOK)
|
||||
{
|
||||
if(txtDevice->getText().length() <= 0 || !fileSelected)
|
||||
if(txtDevice->getText().length() <= 0)
|
||||
{
|
||||
// ToDo: Message to user
|
||||
wndEditFilesysHardfile->setCaption("Please enter a device name.");
|
||||
return;
|
||||
}
|
||||
if(!fileSelected)
|
||||
{
|
||||
wndEditFilesysHardfile->setCaption("Please select a filename.");
|
||||
return;
|
||||
}
|
||||
dialogResult = true;
|
||||
|
@ -121,6 +127,9 @@ static void InitEditFilesysHardfile(void)
|
|||
chkReadWrite = new gcn::UaeCheckBox("Read/Write", true);
|
||||
chkReadWrite->setId("hdfRW");
|
||||
|
||||
chkAutoboot = new gcn::UaeCheckBox("Bootable", true);
|
||||
chkAutoboot->setId("hdfAutoboot");
|
||||
|
||||
lblBootPri = new gcn::Label("Boot priority:");
|
||||
lblBootPri->setSize(100, LABEL_HEIGHT);
|
||||
lblBootPri->setAlignment(gcn::Graphics::RIGHT);
|
||||
|
@ -171,9 +180,10 @@ static void InitEditFilesysHardfile(void)
|
|||
int posY = DISTANCE_BORDER;
|
||||
wndEditFilesysHardfile->add(lblDevice, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysHardfile->add(txtDevice, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
wndEditFilesysHardfile->add(chkReadWrite, 240, posY);
|
||||
wndEditFilesysHardfile->add(lblBootPri, 374, posY);
|
||||
wndEditFilesysHardfile->add(txtBootPri, 374 + lblBootPri->getWidth() + 8, posY);
|
||||
wndEditFilesysHardfile->add(chkReadWrite, 235, posY + 1);
|
||||
wndEditFilesysHardfile->add(chkAutoboot, 360, posY + 1);
|
||||
wndEditFilesysHardfile->add(lblBootPri, 460, posY);
|
||||
wndEditFilesysHardfile->add(txtBootPri, 460 + lblBootPri->getWidth() + 8, posY);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
wndEditFilesysHardfile->add(lblPath, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysHardfile->add(txtPath, DISTANCE_BORDER + lblPath->getWidth() + 8, posY);
|
||||
|
@ -208,6 +218,7 @@ static void ExitEditFilesysHardfile(void)
|
|||
delete lblDevice;
|
||||
delete txtDevice;
|
||||
delete chkReadWrite;
|
||||
delete chkAutoboot;
|
||||
delete lblBootPri;
|
||||
delete txtBootPri;
|
||||
delete lblPath;
|
||||
|
@ -295,6 +306,7 @@ bool EditFilesysHardfile(int unit_no)
|
|||
struct mountedinfo mi;
|
||||
struct uaedev_config_info *uci = &changed_prefs.mountconfig[unit_no];
|
||||
std::string strdevname, strroot;
|
||||
char tmp[32];
|
||||
|
||||
dialogResult = false;
|
||||
dialogFinished = false;
|
||||
|
@ -303,8 +315,6 @@ bool EditFilesysHardfile(int unit_no)
|
|||
|
||||
if(unit_no >= 0)
|
||||
{
|
||||
char tmp[32];
|
||||
|
||||
get_filesys_unitconfig(&changed_prefs, unit_no, &mi);
|
||||
strdevname.assign(uci->devname);
|
||||
txtDevice->setText(strdevname);
|
||||
|
@ -313,6 +323,7 @@ bool EditFilesysHardfile(int unit_no)
|
|||
fileSelected = true;
|
||||
|
||||
chkReadWrite->setSelected(!uci->readonly);
|
||||
chkAutoboot->setSelected(uci->bootpri != -128);
|
||||
snprintf(tmp, 32, "%d", uci->bootpri >= -127 ? uci->bootpri : -127);
|
||||
txtBootPri->setText(tmp);
|
||||
snprintf(tmp, 32, "%d", uci->surfaces);
|
||||
|
@ -326,7 +337,8 @@ bool EditFilesysHardfile(int unit_no)
|
|||
}
|
||||
else
|
||||
{
|
||||
txtDevice->setText("");
|
||||
CreateDefaultDevicename(tmp);
|
||||
txtDevice->setText(tmp);
|
||||
strroot.assign(currentDir);
|
||||
txtPath->setText(strroot);
|
||||
fileSelected = false;
|
||||
|
@ -342,16 +354,14 @@ bool EditFilesysHardfile(int unit_no)
|
|||
ExitEditFilesysHardfile();
|
||||
if(dialogResult)
|
||||
{
|
||||
if(unit_no >= 0)
|
||||
kill_filesys_unitconfig(&changed_prefs, unit_no);
|
||||
else
|
||||
int bp = tweakbootpri(atoi(txtBootPri->getText().c_str()), chkAutoboot->isSelected() ? 1 : 0, 0);
|
||||
extractPath((char *) txtPath->getText().c_str(), currentDir);
|
||||
|
||||
uci = add_filesys_config(&changed_prefs, -1, (char *) txtDevice->getText().c_str(),
|
||||
uci = add_filesys_config(&changed_prefs, unit_no, (char *) txtDevice->getText().c_str(),
|
||||
0, (char *) txtPath->getText().c_str(), !chkReadWrite->isSelected(),
|
||||
atoi(txtSectors->getText().c_str()), atoi(txtSurfaces->getText().c_str()),
|
||||
atoi(txtReserved->getText().c_str()), atoi(txtBlocksize->getText().c_str()),
|
||||
atoi(txtBootPri->getText().c_str()), 0, 0, 0);
|
||||
bp, 0, 0, 0);
|
||||
if (uci)
|
||||
hardfile_do_disk_change (uci->configoffset, 1);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ static gcn::Label *lblPath;
|
|||
static gcn::TextField *txtPath;
|
||||
static gcn::Button* cmdPath;
|
||||
static gcn::UaeCheckBox* chkReadWrite;
|
||||
static gcn::UaeCheckBox* chkAutoboot;
|
||||
static gcn::Label *lblBootPri;
|
||||
static gcn::TextField *txtBootPri;
|
||||
|
||||
|
@ -62,12 +63,12 @@ class FilesysVirtualActionListener : public gcn::ActionListener
|
|||
{
|
||||
if(txtDevice->getText().length() <= 0)
|
||||
{
|
||||
// ToDo: Message to user
|
||||
wndEditFilesysVirtual->setCaption("Please enter a device name.");
|
||||
return;
|
||||
}
|
||||
if(txtVolume->getText().length() <= 0)
|
||||
{
|
||||
// ToDo: Message to user
|
||||
wndEditFilesysVirtual->setCaption("Please enter a volume name.");
|
||||
return;
|
||||
}
|
||||
dialogResult = true;
|
||||
|
@ -133,6 +134,9 @@ static void InitEditFilesysVirtual(void)
|
|||
chkReadWrite = new gcn::UaeCheckBox("Read/Write", true);
|
||||
chkReadWrite->setId("virtRW");
|
||||
|
||||
chkAutoboot = new gcn::UaeCheckBox("Bootable", true);
|
||||
chkAutoboot->setId("virtAutoboot");
|
||||
|
||||
lblBootPri = new gcn::Label("Boot priority:");
|
||||
lblBootPri->setSize(84, LABEL_HEIGHT);
|
||||
lblBootPri->setAlignment(gcn::Graphics::RIGHT);
|
||||
|
@ -143,12 +147,13 @@ static void InitEditFilesysVirtual(void)
|
|||
int posY = DISTANCE_BORDER;
|
||||
wndEditFilesysVirtual->add(lblDevice, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysVirtual->add(txtDevice, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
wndEditFilesysVirtual->add(chkReadWrite, 260, posY);
|
||||
wndEditFilesysVirtual->add(chkReadWrite, 250, posY + 1);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
wndEditFilesysVirtual->add(lblVolume, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysVirtual->add(txtVolume, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
wndEditFilesysVirtual->add(lblBootPri, 260, posY);
|
||||
wndEditFilesysVirtual->add(txtBootPri, 260 + lblBootPri->getWidth() + 8, posY);
|
||||
wndEditFilesysVirtual->add(chkAutoboot, 250, posY + 1);
|
||||
wndEditFilesysVirtual->add(lblBootPri, 374, posY);
|
||||
wndEditFilesysVirtual->add(txtBootPri, 374 + lblBootPri->getWidth() + 8, posY);
|
||||
posY += txtDevice->getHeight() + DISTANCE_NEXT_Y;
|
||||
wndEditFilesysVirtual->add(lblPath, DISTANCE_BORDER, posY);
|
||||
wndEditFilesysVirtual->add(txtPath, DISTANCE_BORDER + lblDevice->getWidth() + 8, posY);
|
||||
|
@ -178,6 +183,7 @@ static void ExitEditFilesysVirtual(void)
|
|||
delete txtPath;
|
||||
delete cmdPath;
|
||||
delete chkReadWrite;
|
||||
delete chkAutoboot;
|
||||
delete lblBootPri;
|
||||
delete txtBootPri;
|
||||
|
||||
|
@ -252,8 +258,9 @@ static void EditFilesysVirtualLoop(void)
|
|||
bool EditFilesysVirtual(int unit_no)
|
||||
{
|
||||
struct mountedinfo mi;
|
||||
struct uaedev_config_info *uci = &changed_prefs.mountconfig[unit_no];
|
||||
struct uaedev_config_info *uci;
|
||||
std::string strdevname, strvolname, strroot;
|
||||
char tmp[32];
|
||||
|
||||
dialogResult = false;
|
||||
dialogFinished = false;
|
||||
|
@ -262,8 +269,7 @@ bool EditFilesysVirtual(int unit_no)
|
|||
|
||||
if(unit_no >= 0)
|
||||
{
|
||||
char tmp[32];
|
||||
|
||||
uci = &changed_prefs.mountconfig[unit_no];
|
||||
get_filesys_unitconfig(&changed_prefs, unit_no, &mi);
|
||||
|
||||
strdevname.assign(uci->devname);
|
||||
|
@ -273,13 +279,15 @@ bool EditFilesysVirtual(int unit_no)
|
|||
strroot.assign(uci->rootdir);
|
||||
txtPath->setText(strroot);
|
||||
chkReadWrite->setSelected(!uci->readonly);
|
||||
chkAutoboot->setSelected(uci->bootpri != -128);
|
||||
snprintf(tmp, 32, "%d", uci->bootpri >= -127 ? uci->bootpri : -127);
|
||||
txtBootPri->setText(tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
txtDevice->setText("");
|
||||
txtVolume->setText("");
|
||||
CreateDefaultDevicename(tmp);
|
||||
txtDevice->setText(tmp);
|
||||
txtVolume->setText(tmp);
|
||||
strroot.assign(currentDir);
|
||||
txtPath->setText(strroot);
|
||||
chkReadWrite->setSelected(true);
|
||||
|
@ -291,14 +299,12 @@ bool EditFilesysVirtual(int unit_no)
|
|||
|
||||
if(dialogResult)
|
||||
{
|
||||
if(unit_no >= 0)
|
||||
kill_filesys_unitconfig(&changed_prefs, unit_no);
|
||||
else
|
||||
int bp = tweakbootpri(atoi(txtBootPri->getText().c_str()), chkAutoboot->isSelected() ? 1 : 0, 0);
|
||||
extractPath((char *) txtPath->getText().c_str(), currentDir);
|
||||
|
||||
uci = add_filesys_config(&changed_prefs, -1, (char *) txtDevice->getText().c_str(),
|
||||
uci = add_filesys_config(&changed_prefs, unit_no, (char *) txtDevice->getText().c_str(),
|
||||
(char *) txtVolume->getText().c_str(), (char *) txtPath->getText().c_str(),
|
||||
!chkReadWrite->isSelected(), 0, 0, 0, 0, atoi(txtBootPri->getText().c_str()), 0, 0, 0);
|
||||
!chkReadWrite->isSelected(), 0, 0, 0, 0, bp, 0, 0, 0);
|
||||
if (uci)
|
||||
filesys_media_change (uci->rootdir, 1, uci);
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ static NavigationMap navMap[] =
|
|||
// active move left move right move up move down
|
||||
// main_window
|
||||
{ "Paths", "SystemROMs", "SystemROMs", "Reset", "Configurations" },
|
||||
{ "Configurations", "ConfigList", "ConfigList", "Paths", "CPU" },
|
||||
{ "CPU", "7 Mhz", "68000", "Configurations", "Chipset" },
|
||||
{ "Chipset", "BlitNormal", "OCS", "CPU", "ROM" },
|
||||
{ "Configurations", "ConfigList", "ConfigList", "Paths", "CPU and FPU" },
|
||||
{ "CPU and FPU", "7 Mhz", "68000", "Configurations", "Chipset" },
|
||||
{ "Chipset", "Fast copper", "OCS", "CPU and FPU", "ROM" },
|
||||
{ "ROM", "MainROM", "cboMainROM", "Chipset", "RAM" },
|
||||
{ "RAM", "Chipmem", "Chipmem", "ROM", "Floppy drives" },
|
||||
{ "Floppy drives", "cmdSel0", "DF0:", "RAM", "Hard drives" },
|
||||
|
@ -59,30 +59,32 @@ static NavigationMap navMap[] =
|
|||
|
||||
// active move left move right move up move down
|
||||
// PanelCPU
|
||||
{ "68000", "CPU", "FPUnone", "JIT", "68010" },
|
||||
{ "68010", "CPU", "68881", "68000", "68EC020" },
|
||||
{ "68EC020", "CPU", "68882", "68010", "68020" },
|
||||
{ "68020", "CPU", "CPU internal", "68EC020", "68040" },
|
||||
{ "68040", "CPU", "CPU internal", "68020", "CPUComp" },
|
||||
{ "CPUComp", "CPU", "CPU internal", "68040", "JIT" },
|
||||
{ "JIT", "CPU", "CPU internal", "CPUComp", "68000" },
|
||||
{ "68000", "CPU and FPU", "FPUnone", "JIT", "68010" },
|
||||
{ "68010", "CPU and FPU", "68881", "68000", "68020" },
|
||||
{ "68020", "CPU and FPU", "68882", "68010", "68030" },
|
||||
{ "68030", "CPU and FPU", "CPU internal", "68020", "68040" },
|
||||
{ "68040", "CPU and FPU", "CPU internal", "68030", "CPU24Bit" },
|
||||
{ "CPU24Bit", "CPU and FPU", "CPU internal", "68040", "CPUComp" },
|
||||
{ "CPUComp", "CPU and FPU", "CPU internal", "CPU24Bit", "JIT" },
|
||||
{ "JIT", "CPU and FPU", "CPU internal", "CPUComp", "68000" },
|
||||
{ "FPUnone", "68000", "7 Mhz", "CPU internal", "68881" },
|
||||
{ "68881", "68010", "14 Mhz", "FPUnone", "68882" },
|
||||
{ "68882", "68EC020", "28 Mhz", "68881", "CPU internal" },
|
||||
{ "CPU internal", "68020", "Fastest", "68882", "FPUnone" },
|
||||
{ "7 Mhz", "FPUnone", "CPU", "Fastest", "14 Mhz" },
|
||||
{ "14 Mhz", "68881", "CPU", "7 Mhz", "28 Mhz" },
|
||||
{ "28 Mhz", "68882", "CPU", "14 Mhz", "Fastest" },
|
||||
{ "Fastest", "CPU internal", "CPU", "28 Mhz", "7 Mhz" },
|
||||
{ "68882", "68020", "25 Mhz", "68881", "CPU internal" },
|
||||
{ "CPU internal", "68030", "Fastest", "68882", "FPUnone" },
|
||||
{ "7 Mhz", "FPUnone", "CPU and FPU", "Fastest", "14 Mhz" },
|
||||
{ "14 Mhz", "68881", "CPU and FPU", "7 Mhz", "25 Mhz" },
|
||||
{ "25 Mhz", "68882", "CPU and FPU", "14 Mhz", "Fastest" },
|
||||
{ "Fastest", "CPU internal", "CPU and FPU", "25 Mhz", "7 Mhz" },
|
||||
|
||||
// PanelChipset
|
||||
{ "OCS", "Chipset", "BlitNormal", "CollFull", "ECS" },
|
||||
{ "ECS", "Chipset", "Immediate", "OCS", "AGA" },
|
||||
{ "AGA", "Chipset", "Improved", "ECS", "NTSC" },
|
||||
{ "OCS", "Chipset", "BlitNormal", "CollFull", "ECS Agnus" },
|
||||
{ "ECS Agnus", "Chipset", "Immediate", "OCS", "Full ECS" },
|
||||
{ "Full ECS", "Chipset", "Immediate", "ECS Agnus", "AGA" },
|
||||
{ "AGA", "Chipset", "Chipset", "Full ECS", "NTSC" },
|
||||
{ "NTSC", "Chipset", "Chipset", "AGA", "CollNone" },
|
||||
{ "BlitNormal", "OCS", "Chipset", "CollFull", "Immediate" },
|
||||
{ "Immediate", "ECS", "Chipset", "BlitNormal", "Improved" },
|
||||
{ "Improved", "AGA", "Chipset", "Immediate", "CollNone" },
|
||||
{ "BlitNormal", "OCS", "Fast copper", "CollFull", "Immediate" },
|
||||
{ "Immediate", "ECS Agnus", "Fast copper", "BlitNormal", "CollNone" },
|
||||
{ "Fast copper", "BlitNormal", "Chipset", "CollFull", "CollNone" },
|
||||
{ "CollNone", "Chipset", "Chipset", "NTSC", "Sprites only" },
|
||||
{ "Sprites only", "Chipset", "Chipset", "CollNone", "CollPlay" },
|
||||
{ "CollPlay", "Chipset", "Chipset", "Sprites only", "CollFull" },
|
||||
|
@ -105,13 +107,14 @@ static NavigationMap navMap[] =
|
|||
//PanelFloppy
|
||||
{ "DF0:", "Floppy drives", "cboType0", "SaveForDisk", "cboDisk0" },
|
||||
{ "cboType0", "DF0:", "cmdEject0", "SaveForDisk", "cboDisk0" },
|
||||
{ "cmdEject0", "cboType0", "cmdSel0", "SaveForDisk", "cboDisk0" },
|
||||
{ "cmdSel0", "cmdEject0", "Floppy drives", "SaveForDisk", "cboDisk0" },
|
||||
{ "cboDisk0", "Floppy drives", "Floppy drives", "DF0:", "DF1:" },
|
||||
{ "DF1:", "Floppy drives", "cboType1", "cboDisk0", "cboDisk1" },
|
||||
{ "cboType1", "DF1:", "cmdEject1", "cboDisk0", "cboDisk1" },
|
||||
{ "cmdEject1", "cboType1", "cmdSel1", "cboDisk0", "cboDisk1" },
|
||||
{ "cmdSel1", "cmdEject1", "Floppy drives", "cboDisk0", "cboDisk1" },
|
||||
{ "cmdEject0", "cboType0", "cmdSel0", "CreateHD", "cboDisk0" },
|
||||
{ "cmdSel0", "cmdEject0", "Floppy drives", "CreateHD", "cboDisk0" },
|
||||
{ "cboDisk0", "Floppy drives", "Floppy drives", "DF0:", "LoadDiskCfg" },
|
||||
{ "LoadDiskCfg", "Floppy drives", "Floppy drives", "cboDisk0", "DF1:" },
|
||||
{ "DF1:", "Floppy drives", "cboType1", "LoadDiskCfg", "cboDisk1" },
|
||||
{ "cboType1", "DF1:", "cmdEject1", "LoadDiskCfg", "cboDisk1" },
|
||||
{ "cmdEject1", "cboType1", "cmdSel1", "LoadDiskCfg", "cboDisk1" },
|
||||
{ "cmdSel1", "cmdEject1", "Floppy drives", "LoadDiskCfg", "cboDisk1" },
|
||||
{ "cboDisk1", "Floppy drives", "Floppy drives", "DF1:", "DF2:" },
|
||||
{ "DF2:", "Floppy drives", "cboType2", "cboDisk1", "cboDisk2" },
|
||||
{ "cboType2", "DF2:", "cmdEject2", "cboDisk1", "cboDisk2" },
|
||||
|
@ -123,8 +126,10 @@ static NavigationMap navMap[] =
|
|||
{ "cmdEject3", "cboType3", "cmdSel3", "cboDisk2", "cboDisk3" },
|
||||
{ "cmdSel3", "cmdEject3", "Floppy drives", "cboDisk2", "cboDisk3" },
|
||||
{ "cboDisk3", "Floppy drives", "Floppy drives", "DF3:", "DriveSpeed" },
|
||||
{ "DriveSpeed", "", "", "cboDisk3", "SaveForDisk" },
|
||||
{ "SaveForDisk", "Floppy drives", "Floppy drives", "DriveSpeed", "DF0:" },
|
||||
{ "DriveSpeed", "", "", "cboDisk3", "CreateDD" },
|
||||
{ "SaveForDisk", "Floppy drives", "CreateDD", "DriveSpeed", "DF0:" },
|
||||
{ "CreateDD", "SaveForDisk", "CreateHD", "DriveSpeed", "cboType0" },
|
||||
{ "CreateHD", "CreateDD", "Floppy drives", "DriveSpeed", "cmdEject0" },
|
||||
|
||||
// active move left move right move up move down
|
||||
// PanelHD
|
||||
|
@ -139,7 +144,8 @@ static NavigationMap navMap[] =
|
|||
{ "cmdProp4", "Hard drives", "cmdDel4", "cmdProp3", "cmdAddDir" },
|
||||
{ "cmdDel4", "cmdProp4", "Hard drives", "cmdDel3", "cmdAddHDF" },
|
||||
{ "cmdAddDir", "Hard drives", "cmdAddHDF", "cmdProp4", "cmdProp0" },
|
||||
{ "cmdAddHDF", "cmdAddDir", "Hard drives", "cmdDel4", "cmdDel0" },
|
||||
{ "cmdAddHDF", "cmdAddDir", "cmdCreateHDF", "cmdDel4", "cmdDel0" },
|
||||
{ "cmdCreateHDF", "cmdAddHDF", "Hard drives", "cmdDel4", "cmdDel0" },
|
||||
|
||||
// PanelDisplay
|
||||
{ "sldWidth", "", "", "Frameskip", "sldHeight" },
|
||||
|
@ -197,17 +203,19 @@ static NavigationMap navMap[] =
|
|||
// active move left move right move up move down
|
||||
// EditFilesysVirtual
|
||||
{ "virtDev", "virtRW", "virtRW", "virtOK", "virtVol" },
|
||||
{ "virtVol", "virtBootpri", "virtBootpri", "virtDev", "virtPath" },
|
||||
{ "virtVol", "virtBootpri", "virtAutoboot", "virtDev", "virtPath" },
|
||||
{ "virtPath", "", "", "virtBootpri", "virtCancel" },
|
||||
{ "virtRW", "virtDev", "virtDev", "virtOK", "virtBootpri" },
|
||||
{ "virtBootpri", "virtVol", "virtVol", "virtRW", "virtPath" },
|
||||
{ "virtRW", "virtDev", "virtDev", "virtOK", "virtAutoboot" },
|
||||
{ "virtAutoboot", "virtVol", "virtBootpri", "virtRW", "virtPath" },
|
||||
{ "virtBootpri", "virtAutoboot", "virtVol", "virtRW", "virtPath" },
|
||||
{ "virtOK", "virtCancel", "virtCancel", "virtPath", "virtRW" },
|
||||
{ "virtCancel", "virtOK", "virtOK", "virtPath", "virtRW" },
|
||||
|
||||
// EditFilesysHardfile
|
||||
{ "hdfDev", "hdfBootPri", "hdfRW", "hdfOK", "hdfPath" },
|
||||
{ "hdfRW", "hdfDev", "hdfBootPri", "hdfOK", "hdfPath" },
|
||||
{ "hdfBootPri", "hdfRW", "hdfDev", "hdfCancel", "hdfPath" },
|
||||
{ "hdfRW", "hdfDev", "hdfAutoboot", "hdfOK", "hdfPath" },
|
||||
{ "hdfAutoboot", "hdfRW", "hdfBootPri", "hdfOK", "hdfPath" },
|
||||
{ "hdfBootPri", "hdfAutoboot", "hdfDev", "hdfCancel", "hdfPath" },
|
||||
{ "hdfSurface", "hdfReserved", "hdfReserved", "hdfPath", "hdfSectors" },
|
||||
{ "hdfReserved", "hdfSurface", "hdfSurface", "hdfPath", "hdfBlocksize" },
|
||||
{ "hdfSectors", "hdfBlocksize", "hdfBlocksize", "hdfSurface", "hdfOK" },
|
||||
|
@ -216,6 +224,15 @@ static NavigationMap navMap[] =
|
|||
{ "hdfOK", "hdfCancel", "hdfCancel", "hdfBlocksize", "hdfBootPri" },
|
||||
{ "hdfCancel", "hdfOK", "hdfOK", "hdfBlocksize", "hdfBootPri" },
|
||||
|
||||
// CreateFilesysHardfile
|
||||
{ "createHdfDev", "createHdfBootPri", "createHdfAutoboot", "createHdfOK", "createHdfPath" },
|
||||
{ "createHdfAutoboot", "createHdfDev", "createHdfBootPri", "createHdfOK", "createHdfPath" },
|
||||
{ "createHdfBootPri", "createHdfAutoboot", "createHdfDev", "createHdfOK", "createHdfPath" },
|
||||
{ "createHdfSize", "", "", "createHdfPath", "createHdfOK" },
|
||||
{ "createHdfPath", "", "", "createHdfBootPri", "createHdfSize" },
|
||||
{ "createHdfOK", "createHdfCancel", "createHdfCancel", "createHdfSize", "createHdfBootPri" },
|
||||
{ "createHdfCancel", "createHdfOK", "createHdfOK", "createHdfSize", "createHdfBootPri" },
|
||||
|
||||
{ "END", "", "", "", "" }
|
||||
};
|
||||
|
||||
|
|
|
@ -19,9 +19,10 @@
|
|||
static gcn::Window *grpCPU;
|
||||
static gcn::UaeRadioButton* optCPU68000;
|
||||
static gcn::UaeRadioButton* optCPU68010;
|
||||
static gcn::UaeRadioButton* optCPU68EC020;
|
||||
static gcn::UaeRadioButton* optCPU68020;
|
||||
static gcn::UaeRadioButton* optCPU68030;
|
||||
static gcn::UaeRadioButton* optCPU68040;
|
||||
static gcn::UaeCheckBox* chk24Bit;
|
||||
static gcn::UaeCheckBox* chkCPUCompatible;
|
||||
static gcn::UaeCheckBox* chkJIT;
|
||||
static gcn::Window *grpFPU;
|
||||
|
@ -58,19 +59,16 @@ class CPUButtonActionListener : public gcn::ActionListener
|
|||
changed_prefs.gfxmem_size = 0;
|
||||
changed_prefs.cpu_compatible = 0;
|
||||
}
|
||||
else if (actionEvent.getSource() == optCPU68EC020)
|
||||
else if (actionEvent.getSource() == optCPU68020)
|
||||
{
|
||||
changed_prefs.cpu_model = 68020;
|
||||
if(changed_prefs.fpu_model == 68040)
|
||||
changed_prefs.fpu_model = 68881;
|
||||
changed_prefs.address_space_24 = true;
|
||||
changed_prefs.z3fastmem_size = 0;
|
||||
changed_prefs.gfxmem_size = 0;
|
||||
changed_prefs.cpu_compatible = 0;
|
||||
}
|
||||
else if (actionEvent.getSource() == optCPU68020)
|
||||
else if (actionEvent.getSource() == optCPU68030)
|
||||
{
|
||||
changed_prefs.cpu_model = 68020;
|
||||
changed_prefs.cpu_model = 68030;
|
||||
if(changed_prefs.fpu_model == 68040)
|
||||
changed_prefs.fpu_model = 68881;
|
||||
changed_prefs.address_space_24 = false;
|
||||
|
@ -136,6 +134,17 @@ class CPUSpeedButtonActionListener : public gcn::ActionListener
|
|||
static CPUSpeedButtonActionListener* cpuSpeedButtonActionListener;
|
||||
|
||||
|
||||
class CPU24BitActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
{
|
||||
changed_prefs.address_space_24 = chk24Bit->isSelected();
|
||||
RefreshPanelCPU();
|
||||
}
|
||||
};
|
||||
static CPU24BitActionListener* cpu24BitActionListener;
|
||||
|
||||
class CPUCompActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
|
@ -179,6 +188,7 @@ static JITActionListener* jitActionListener;
|
|||
void InitPanelCPU(const struct _ConfigCategory& category)
|
||||
{
|
||||
cpuButtonActionListener = new CPUButtonActionListener();
|
||||
cpu24BitActionListener = new CPU24BitActionListener();
|
||||
cpuCompActionListener = new CPUCompActionListener();
|
||||
jitActionListener = new JITActionListener();
|
||||
|
||||
|
@ -186,13 +196,17 @@ void InitPanelCPU(const struct _ConfigCategory& category)
|
|||
optCPU68000->addActionListener(cpuButtonActionListener);
|
||||
optCPU68010 = new gcn::UaeRadioButton("68010", "radiocpugroup");
|
||||
optCPU68010->addActionListener(cpuButtonActionListener);
|
||||
optCPU68EC020 = new gcn::UaeRadioButton("68EC020", "radiocpugroup");
|
||||
optCPU68EC020->addActionListener(cpuButtonActionListener);
|
||||
optCPU68020 = new gcn::UaeRadioButton("68020", "radiocpugroup");
|
||||
optCPU68020->addActionListener(cpuButtonActionListener);
|
||||
optCPU68030 = new gcn::UaeRadioButton("68030", "radiocpugroup");
|
||||
optCPU68030->addActionListener(cpuButtonActionListener);
|
||||
optCPU68040 = new gcn::UaeRadioButton("68040", "radiocpugroup");
|
||||
optCPU68040->addActionListener(cpuButtonActionListener);
|
||||
|
||||
chk24Bit = new gcn::UaeCheckBox("24-bit addressing", true);
|
||||
chk24Bit->setId("CPU24Bit");
|
||||
chk24Bit->addActionListener(cpu24BitActionListener);
|
||||
|
||||
chkCPUCompatible = new gcn::UaeCheckBox("More compatible", true);
|
||||
chkCPUCompatible->setId("CPUComp");
|
||||
chkCPUCompatible->addActionListener(cpuCompActionListener);
|
||||
|
@ -205,13 +219,14 @@ void InitPanelCPU(const struct _ConfigCategory& category)
|
|||
grpCPU->setPosition(DISTANCE_BORDER, DISTANCE_BORDER);
|
||||
grpCPU->add(optCPU68000, 5, 10);
|
||||
grpCPU->add(optCPU68010, 5, 40);
|
||||
grpCPU->add(optCPU68EC020, 5, 70);
|
||||
grpCPU->add(optCPU68020, 5, 100);
|
||||
grpCPU->add(optCPU68020, 5, 70);
|
||||
grpCPU->add(optCPU68030, 5, 100);
|
||||
grpCPU->add(optCPU68040, 5, 130);
|
||||
grpCPU->add(chkCPUCompatible, 5, 170);
|
||||
grpCPU->add(chkJIT, 5, 200);
|
||||
grpCPU->add(chk24Bit, 5, 170);
|
||||
grpCPU->add(chkCPUCompatible, 5, 200);
|
||||
grpCPU->add(chkJIT, 5, 230);
|
||||
grpCPU->setMovable(false);
|
||||
grpCPU->setSize(160, 245);
|
||||
grpCPU->setSize(160, 275);
|
||||
grpCPU->setBaseColor(gui_baseCol);
|
||||
|
||||
category.panel->add(grpCPU);
|
||||
|
@ -251,7 +266,7 @@ void InitPanelCPU(const struct _ConfigCategory& category)
|
|||
opt14Mhz = new gcn::UaeRadioButton("14 Mhz", "radiocpuspeedgroup");
|
||||
opt14Mhz->addActionListener(cpuSpeedButtonActionListener);
|
||||
|
||||
opt28Mhz = new gcn::UaeRadioButton("28 Mhz", "radiocpuspeedgroup");
|
||||
opt28Mhz = new gcn::UaeRadioButton("25 Mhz", "radiocpuspeedgroup");
|
||||
opt28Mhz->addActionListener(cpuSpeedButtonActionListener);
|
||||
|
||||
optFastest = new gcn::UaeRadioButton("Fastest", "radiocpuspeedgroup");
|
||||
|
@ -277,13 +292,15 @@ void ExitPanelCPU(void)
|
|||
{
|
||||
delete optCPU68000;
|
||||
delete optCPU68010;
|
||||
delete optCPU68EC020;
|
||||
delete optCPU68020;
|
||||
delete optCPU68030;
|
||||
delete optCPU68040;
|
||||
delete chk24Bit;
|
||||
delete chkCPUCompatible;
|
||||
delete chkJIT;
|
||||
delete grpCPU;
|
||||
delete cpuButtonActionListener;
|
||||
delete cpu24BitActionListener;
|
||||
delete cpuCompActionListener;
|
||||
delete jitActionListener;
|
||||
|
||||
|
@ -305,23 +322,19 @@ void ExitPanelCPU(void)
|
|||
|
||||
void RefreshPanelCPU(void)
|
||||
{
|
||||
if(changed_prefs.address_space_24)
|
||||
{
|
||||
if(changed_prefs.cpu_model == 68000)
|
||||
optCPU68000->setSelected(true);
|
||||
else if(changed_prefs.cpu_model == 68010)
|
||||
optCPU68010->setSelected(true);
|
||||
else if(changed_prefs.cpu_model == 68020)
|
||||
optCPU68EC020->setSelected(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(changed_prefs.cpu_model == 68020 || changed_prefs.cpu_model == 68030)
|
||||
optCPU68020->setSelected(true);
|
||||
else if(changed_prefs.cpu_model == 68030)
|
||||
optCPU68030->setSelected(true);
|
||||
else if(changed_prefs.cpu_model == 68040)
|
||||
optCPU68040->setSelected(true);
|
||||
}
|
||||
|
||||
chk24Bit->setSelected(changed_prefs.address_space_24);
|
||||
chk24Bit->setEnabled(changed_prefs.cpu_model == 68020);
|
||||
chkCPUCompatible->setSelected(changed_prefs.cpu_compatible > 0);
|
||||
chkCPUCompatible->setEnabled(changed_prefs.cpu_model == 68000);
|
||||
chkJIT->setSelected(changed_prefs.cachesize > 0);
|
||||
|
|
|
@ -19,13 +19,15 @@
|
|||
|
||||
static gcn::Window *grpChipset;
|
||||
static gcn::UaeRadioButton* optOCS;
|
||||
static gcn::UaeRadioButton* optECSAgnus;
|
||||
static gcn::UaeRadioButton* optECS;
|
||||
static gcn::UaeRadioButton* optAGA;
|
||||
static gcn::UaeCheckBox* chkNTSC;
|
||||
static gcn::Window *grpBlitter;
|
||||
static gcn::UaeRadioButton* optBlitNormal;
|
||||
static gcn::UaeRadioButton* optBlitImmed;
|
||||
static gcn::UaeRadioButton* optBlitImproved;
|
||||
static gcn::Window *grpCopper;
|
||||
static gcn::UaeCheckBox* chkFastCopper;
|
||||
static gcn::Window *grpCollisionLevel;
|
||||
static gcn::UaeRadioButton* optCollNone;
|
||||
static gcn::UaeRadioButton* optCollSprites;
|
||||
|
@ -39,6 +41,8 @@ class ChipsetButtonActionListener : public gcn::ActionListener
|
|||
void action(const gcn::ActionEvent& actionEvent)
|
||||
{
|
||||
if (actionEvent.getSource() == optOCS)
|
||||
changed_prefs.chipset_mask = 0;
|
||||
else if (actionEvent.getSource() == optECSAgnus)
|
||||
changed_prefs.chipset_mask = CSMASK_ECS_AGNUS;
|
||||
else if (actionEvent.getSource() == optECS)
|
||||
changed_prefs.chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE;
|
||||
|
@ -69,13 +73,23 @@ class NTSCButtonActionListener : public gcn::ActionListener
|
|||
static NTSCButtonActionListener* ntscButtonActionListener;
|
||||
|
||||
|
||||
class FastCopperActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
{
|
||||
changed_prefs.fast_copper = chkFastCopper->isSelected();
|
||||
}
|
||||
};
|
||||
static FastCopperActionListener* fastCopperActionListener;
|
||||
|
||||
|
||||
class BlitterButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
{
|
||||
changed_prefs.immediate_blits = optBlitImmed->isSelected();
|
||||
changed_prefs.pandora_partial_blits = optBlitImproved->isSelected();
|
||||
}
|
||||
};
|
||||
static BlitterButtonActionListener* blitterButtonActionListener;
|
||||
|
@ -107,7 +121,10 @@ void InitPanelChipset(const struct _ConfigCategory& category)
|
|||
optOCS = new gcn::UaeRadioButton("OCS", "radiochipsetgroup");
|
||||
optOCS->addActionListener(chipsetButtonActionListener);
|
||||
|
||||
optECS = new gcn::UaeRadioButton("ECS", "radiochipsetgroup");
|
||||
optECSAgnus = new gcn::UaeRadioButton("ECS Agnus", "radiochipsetgroup");
|
||||
optECSAgnus->addActionListener(chipsetButtonActionListener);
|
||||
|
||||
optECS = new gcn::UaeRadioButton("Full ECS", "radiochipsetgroup");
|
||||
optECS->addActionListener(chipsetButtonActionListener);
|
||||
|
||||
optAGA = new gcn::UaeRadioButton("AGA", "radiochipsetgroup");
|
||||
|
@ -119,11 +136,12 @@ void InitPanelChipset(const struct _ConfigCategory& category)
|
|||
grpChipset = new gcn::Window("Chipset");
|
||||
grpChipset->setPosition(DISTANCE_BORDER, DISTANCE_BORDER);
|
||||
grpChipset->add(optOCS, 5, 10);
|
||||
grpChipset->add(optECS, 5, 40);
|
||||
grpChipset->add(optAGA, 5, 70);
|
||||
grpChipset->add(chkNTSC, 5, 110);
|
||||
grpChipset->add(optECSAgnus, 5, 40);
|
||||
grpChipset->add(optECS, 5, 70);
|
||||
grpChipset->add(optAGA, 5, 100);
|
||||
grpChipset->add(chkNTSC, 5, 140);
|
||||
grpChipset->setMovable(false);
|
||||
grpChipset->setSize(100, 155);
|
||||
grpChipset->setSize(120, 185);
|
||||
grpChipset->setBaseColor(gui_baseCol);
|
||||
|
||||
category.panel->add(grpChipset);
|
||||
|
@ -137,20 +155,30 @@ void InitPanelChipset(const struct _ConfigCategory& category)
|
|||
optBlitImmed = new gcn::UaeRadioButton("Immediate", "radiocblittergroup");
|
||||
optBlitImmed->addActionListener(blitterButtonActionListener);
|
||||
|
||||
optBlitImproved = new gcn::UaeRadioButton("Improved", "radiocblittergroup");
|
||||
optBlitImproved->addActionListener(blitterButtonActionListener);
|
||||
|
||||
grpBlitter = new gcn::Window("Blitter");
|
||||
grpBlitter->setPosition(DISTANCE_BORDER + grpChipset->getWidth() + DISTANCE_NEXT_X, DISTANCE_BORDER);
|
||||
grpBlitter->add(optBlitNormal, 5, 10);
|
||||
grpBlitter->add(optBlitImmed, 5, 40);
|
||||
grpBlitter->add(optBlitImproved, 5, 70);
|
||||
grpBlitter->setMovable(false);
|
||||
grpBlitter->setSize(120, 115);
|
||||
grpBlitter->setSize(120, 85);
|
||||
grpBlitter->setBaseColor(gui_baseCol);
|
||||
|
||||
category.panel->add(grpBlitter);
|
||||
|
||||
fastCopperActionListener = new FastCopperActionListener();
|
||||
|
||||
chkFastCopper = new gcn::UaeCheckBox("Fast copper");
|
||||
chkFastCopper->addActionListener(fastCopperActionListener);
|
||||
|
||||
grpCopper = new gcn::Window("Copper");
|
||||
grpCopper->setPosition(grpBlitter->getX() + grpBlitter->getWidth() + DISTANCE_NEXT_X, DISTANCE_BORDER);
|
||||
grpCopper->add(chkFastCopper, 5, 10);
|
||||
grpCopper->setMovable(false);
|
||||
grpCopper->setSize(120, 55);
|
||||
grpCopper->setBaseColor(gui_baseCol);
|
||||
|
||||
category.panel->add(grpCopper);
|
||||
|
||||
collisionButtonActionListener = new CollisionButtonActionListener();
|
||||
|
||||
optCollNone = new gcn::UaeRadioButton("None", "radioccollisiongroup");
|
||||
|
@ -187,6 +215,7 @@ void InitPanelChipset(const struct _ConfigCategory& category)
|
|||
void ExitPanelChipset(void)
|
||||
{
|
||||
delete optOCS;
|
||||
delete optECSAgnus;
|
||||
delete optECS;
|
||||
delete optAGA;
|
||||
delete chkNTSC;
|
||||
|
@ -196,10 +225,13 @@ void ExitPanelChipset(void)
|
|||
|
||||
delete optBlitNormal;
|
||||
delete optBlitImmed;
|
||||
delete optBlitImproved;
|
||||
delete grpBlitter;
|
||||
delete blitterButtonActionListener;
|
||||
|
||||
delete chkFastCopper;
|
||||
delete grpCopper;
|
||||
delete fastCopperActionListener;
|
||||
|
||||
delete optCollNone;
|
||||
delete optCollSprites;
|
||||
delete optCollPlayfield;
|
||||
|
@ -211,8 +243,10 @@ void ExitPanelChipset(void)
|
|||
|
||||
void RefreshPanelChipset(void)
|
||||
{
|
||||
if (changed_prefs.chipset_mask == CSMASK_ECS_AGNUS)
|
||||
if (changed_prefs.chipset_mask == 0)
|
||||
optOCS->setSelected(true);
|
||||
else if (changed_prefs.chipset_mask == CSMASK_ECS_AGNUS)
|
||||
optECSAgnus->setSelected(true);
|
||||
else if (changed_prefs.chipset_mask == (CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE))
|
||||
optECS->setSelected(true);
|
||||
else if (changed_prefs.chipset_mask == (CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE | CSMASK_AGA))
|
||||
|
@ -222,11 +256,11 @@ void RefreshPanelChipset(void)
|
|||
|
||||
if(changed_prefs.immediate_blits)
|
||||
optBlitImmed->setSelected(true);
|
||||
else if (changed_prefs.pandora_partial_blits)
|
||||
optBlitImproved->setSelected(true);
|
||||
else
|
||||
optBlitNormal->setSelected(true);
|
||||
|
||||
chkFastCopper->setSelected(changed_prefs.fast_copper);
|
||||
|
||||
if(changed_prefs.collision_level == 0)
|
||||
optCollNone->setSelected(true);
|
||||
else if(changed_prefs.collision_level == 1)
|
||||
|
|
|
@ -39,6 +39,7 @@ bool LoadConfigByName(const char *name)
|
|||
txtDesc->setText(config->Description);
|
||||
target_cfgfile_load(&changed_prefs, config->FullPath, 0, 0);
|
||||
strncpy(last_active_config, config->Name, MAX_PATH);
|
||||
DisableResume();
|
||||
RefreshAllPanels();
|
||||
}
|
||||
|
||||
|
@ -107,6 +108,7 @@ class ConfigButtonActionListener : public gcn::ActionListener
|
|||
i = lstConfigs->getSelected();
|
||||
target_cfgfile_load(&changed_prefs, ConfigFilesList[i]->FullPath, 0, 0);
|
||||
strncpy(last_active_config, ConfigFilesList[i]->Name, MAX_PATH);
|
||||
DisableResume();
|
||||
RefreshAllPanels();
|
||||
}
|
||||
else if(actionEvent.getSource() == cmdSave)
|
||||
|
@ -175,6 +177,7 @@ class ConfigsListActionListener : public gcn::ActionListener
|
|||
//-----------------------------------------------
|
||||
target_cfgfile_load(&changed_prefs, ConfigFilesList[selected_item]->FullPath, 0, 0);
|
||||
strncpy(last_active_config, ConfigFilesList[selected_item]->Name, MAX_PATH);
|
||||
DisableResume();
|
||||
RefreshAllPanels();
|
||||
uae_reset(1);
|
||||
gui_running = false;
|
||||
|
|
|
@ -31,12 +31,15 @@ static gcn::Label* lblDriveSpeedInfo;
|
|||
static gcn::Slider* sldDriveSpeed;
|
||||
static gcn::UaeCheckBox* chkLoadConfig;
|
||||
static gcn::Button *cmdSaveForDisk;
|
||||
static gcn::Button *cmdCreateDDDisk;
|
||||
static gcn::Button *cmdCreateHDDisk;
|
||||
|
||||
static const char *diskfile_filter[] = { ".adf", ".adz", ".zip", ".gz", ".dms", "\0" };
|
||||
static const char *drivespeedlist[] = { "100% (compatible)", "200%", "400%", "800%" };
|
||||
static const int drivespeedvalues[] = { 100, 200, 400, 800 };
|
||||
|
||||
static void AdjustDropDownControls(void);
|
||||
static bool bLoadConfigForDisk = true;
|
||||
|
||||
|
||||
class DriveTypeListModel : public gcn::ListModel
|
||||
|
@ -114,14 +117,15 @@ class DFxCheckActionListener : public gcn::ActionListener
|
|||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
{
|
||||
if(actionEvent.getSource() == chkLoadConfig)
|
||||
bLoadConfigForDisk = chkLoadConfig->isSelected();
|
||||
else
|
||||
{
|
||||
for(int i=0; i<4; ++i)
|
||||
{
|
||||
if (actionEvent.getSource() == chkDFx[i])
|
||||
{
|
||||
// Patch done on RASPBERRY, but should be needed for everybody
|
||||
changed_prefs.nr_floppies = chkDFx[0]->isSelected()+chkDFx[1]->isSelected()+chkDFx[2]->isSelected()+chkDFx[3]->isSelected();
|
||||
// Patch done on RASPBERRY, but should be needed for everybody
|
||||
//---------------------------------------
|
||||
// Drive enabled/disabled
|
||||
//---------------------------------------
|
||||
|
@ -138,6 +142,7 @@ class DFxCheckActionListener : public gcn::ActionListener
|
|||
// ToDo: set write protect for floppy
|
||||
}
|
||||
}
|
||||
}
|
||||
RefreshPanelFloppy();
|
||||
}
|
||||
};
|
||||
|
@ -201,6 +206,7 @@ class DFxButtonActionListener : public gcn::ActionListener
|
|||
cmdDFxSelect[i]->requestFocus();
|
||||
}
|
||||
}
|
||||
RefreshPanelFloppy();
|
||||
}
|
||||
};
|
||||
static DFxButtonActionListener* dfxButtonActionListener;
|
||||
|
@ -255,6 +261,7 @@ class DiskFileActionListener : public gcn::ActionListener
|
|||
}
|
||||
}
|
||||
}
|
||||
RefreshPanelFloppy();
|
||||
}
|
||||
};
|
||||
static DiskFileActionListener* diskFileActionListener;
|
||||
|
@ -301,6 +308,50 @@ class SaveForDiskActionListener : public gcn::ActionListener
|
|||
static SaveForDiskActionListener* saveForDiskActionListener;
|
||||
|
||||
|
||||
class CreateDiskActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
{
|
||||
if(actionEvent.getSource() == cmdCreateDDDisk)
|
||||
{
|
||||
// Create 3.5'' DD Disk
|
||||
char tmp[MAX_PATH];
|
||||
char diskname[MAX_PATH];
|
||||
strncpy(tmp, currentDir, MAX_PATH);
|
||||
if(SelectFile("Create 3.5'' DD disk file", tmp, diskfile_filter, true))
|
||||
{
|
||||
extractFileName(tmp, diskname);
|
||||
removeFileExtension(diskname);
|
||||
diskname[31] = '\0';
|
||||
disk_creatediskfile(tmp, 0, DRV_35_DD, diskname);
|
||||
AddFileToDiskList(tmp, 1);
|
||||
extractPath(tmp, currentDir);
|
||||
}
|
||||
cmdCreateDDDisk->requestFocus();
|
||||
}
|
||||
else if(actionEvent.getSource() == cmdCreateHDDisk)
|
||||
{
|
||||
// Create 3.5'' HD Disk
|
||||
char tmp[MAX_PATH];
|
||||
char diskname[MAX_PATH];
|
||||
strncpy(tmp, currentDir, MAX_PATH);
|
||||
if(SelectFile("Create 3.5'' HD disk file", tmp, diskfile_filter, true))
|
||||
{
|
||||
extractFileName(tmp, diskname);
|
||||
removeFileExtension(diskname);
|
||||
diskname[31] = '\0';
|
||||
disk_creatediskfile(tmp, 0, DRV_35_HD, diskname);
|
||||
AddFileToDiskList(tmp, 1);
|
||||
extractPath(tmp, currentDir);
|
||||
}
|
||||
cmdCreateHDDisk->requestFocus();
|
||||
}
|
||||
}
|
||||
};
|
||||
static CreateDiskActionListener* createDiskActionListener;
|
||||
|
||||
|
||||
void InitPanelFloppy(const struct _ConfigCategory& category)
|
||||
{
|
||||
int posX;
|
||||
|
@ -313,6 +364,7 @@ void InitPanelFloppy(const struct _ConfigCategory& category)
|
|||
diskFileActionListener = new DiskFileActionListener();
|
||||
driveSpeedSliderActionListener = new DriveSpeedSliderActionListener();
|
||||
saveForDiskActionListener = new SaveForDiskActionListener();
|
||||
createDiskActionListener = new CreateDiskActionListener();
|
||||
|
||||
for(i=0; i<4; ++i)
|
||||
{
|
||||
|
@ -362,6 +414,7 @@ void InitPanelFloppy(const struct _ConfigCategory& category)
|
|||
{
|
||||
chkLoadConfig = new gcn::UaeCheckBox("Load config with same name as disk");
|
||||
chkLoadConfig->setId("LoadDiskCfg");
|
||||
chkLoadConfig->addActionListener(dfxCheckActionListener);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -376,11 +429,23 @@ void InitPanelFloppy(const struct _ConfigCategory& category)
|
|||
lblDriveSpeedInfo = new gcn::Label(drivespeedlist[0]);
|
||||
|
||||
cmdSaveForDisk = new gcn::Button("Save config for disk");
|
||||
cmdSaveForDisk->setSize(BUTTON_WIDTH * 2, BUTTON_HEIGHT);
|
||||
cmdSaveForDisk->setSize(160, BUTTON_HEIGHT);
|
||||
cmdSaveForDisk->setBaseColor(gui_baseCol);
|
||||
cmdSaveForDisk->setId("SaveForDisk");
|
||||
cmdSaveForDisk->addActionListener(saveForDiskActionListener);
|
||||
|
||||
cmdCreateDDDisk = new gcn::Button("Create 3.5'' DD disk");
|
||||
cmdCreateDDDisk->setSize(160, BUTTON_HEIGHT);
|
||||
cmdCreateDDDisk->setBaseColor(gui_baseCol);
|
||||
cmdCreateDDDisk->setId("CreateDD");
|
||||
cmdCreateDDDisk->addActionListener(createDiskActionListener);
|
||||
|
||||
cmdCreateHDDisk = new gcn::Button("Create 3.5'' HD disk");
|
||||
cmdCreateHDDisk->setSize(160, BUTTON_HEIGHT);
|
||||
cmdCreateHDDisk->setBaseColor(gui_baseCol);
|
||||
cmdCreateHDDisk->setId("CreateHD");
|
||||
cmdCreateHDDisk->addActionListener(createDiskActionListener);
|
||||
|
||||
for(i=0; i<4; ++i)
|
||||
{
|
||||
posX = DISTANCE_BORDER;
|
||||
|
@ -388,7 +453,7 @@ void InitPanelFloppy(const struct _ConfigCategory& category)
|
|||
posX += 100;
|
||||
category.panel->add(cboDFxType[i], posX, posY);
|
||||
posX += cboDFxType[i]->getWidth() + 2 * DISTANCE_NEXT_X;
|
||||
// category.panel->add(chkDFxWriteProtect[i], posX, posY);
|
||||
category.panel->add(chkDFxWriteProtect[i], posX, posY);
|
||||
posX += chkDFxWriteProtect[i]->getWidth() + 4 * DISTANCE_NEXT_X;
|
||||
// category.panel->add(cmdDFxInfo[i], posX, posY);
|
||||
posX += cmdDFxInfo[i]->getWidth() + DISTANCE_NEXT_X;
|
||||
|
@ -414,7 +479,10 @@ void InitPanelFloppy(const struct _ConfigCategory& category)
|
|||
category.panel->add(lblDriveSpeedInfo, posX, posY);
|
||||
posY += sldDriveSpeed->getHeight() + DISTANCE_NEXT_Y;
|
||||
|
||||
category.panel->add(cmdSaveForDisk, DISTANCE_BORDER, category.panel->getHeight() - DISTANCE_BORDER - BUTTON_HEIGHT);
|
||||
posY = category.panel->getHeight() - DISTANCE_BORDER - BUTTON_HEIGHT;
|
||||
category.panel->add(cmdSaveForDisk, DISTANCE_BORDER, posY);
|
||||
category.panel->add(cmdCreateDDDisk, cmdSaveForDisk->getX() + cmdSaveForDisk->getWidth() + DISTANCE_NEXT_X, posY);
|
||||
category.panel->add(cmdCreateHDDisk, cmdCreateDDDisk->getX() + cmdCreateDDDisk->getWidth() + DISTANCE_NEXT_X, posY);
|
||||
|
||||
RefreshPanelFloppy();
|
||||
}
|
||||
|
@ -437,6 +505,8 @@ void ExitPanelFloppy(void)
|
|||
delete sldDriveSpeed;
|
||||
delete lblDriveSpeedInfo;
|
||||
delete cmdSaveForDisk;
|
||||
delete cmdCreateDDDisk;
|
||||
delete cmdCreateHDDisk;
|
||||
|
||||
delete dfxCheckActionListener;
|
||||
delete driveTypeActionListener;
|
||||
|
@ -444,6 +514,7 @@ void ExitPanelFloppy(void)
|
|||
delete diskFileActionListener;
|
||||
delete driveSpeedSliderActionListener;
|
||||
delete saveForDiskActionListener;
|
||||
delete createDiskActionListener;
|
||||
}
|
||||
|
||||
|
||||
|
@ -477,23 +548,31 @@ static void AdjustDropDownControls(void)
|
|||
void RefreshPanelFloppy(void)
|
||||
{
|
||||
int i;
|
||||
bool prevAvailable = true;
|
||||
|
||||
AdjustDropDownControls();
|
||||
|
||||
changed_prefs.nr_floppies = 0;
|
||||
for(i=0; i<4; ++i)
|
||||
{
|
||||
bool driveEnabled = changed_prefs.dfxtype[i] != DRV_NONE;
|
||||
chkDFx[i]->setSelected(driveEnabled);
|
||||
cboDFxType[i]->setSelected(changed_prefs.dfxtype[i] + 1);
|
||||
chkDFxWriteProtect[i]->setSelected(false);
|
||||
chkDFxWriteProtect[i]->setSelected(disk_getwriteprotect(changed_prefs.df[i]));
|
||||
chkDFx[i]->setEnabled(prevAvailable);
|
||||
cboDFxType[i]->setEnabled(prevAvailable);
|
||||
|
||||
cmdDFxInfo[i]->setEnabled(driveEnabled);
|
||||
cmdDFxEject[i]->setEnabled(driveEnabled);
|
||||
cmdDFxSelect[i]->setEnabled(driveEnabled);
|
||||
cboDFxFile[i]->setEnabled(driveEnabled);
|
||||
|
||||
prevAvailable = driveEnabled;
|
||||
if(driveEnabled)
|
||||
changed_prefs.nr_floppies = i + 1;
|
||||
}
|
||||
|
||||
chkLoadConfig->setSelected(true);
|
||||
chkLoadConfig->setSelected(bLoadConfigForDisk);
|
||||
|
||||
for(i=0; i<4; ++i)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "gui_handling.h"
|
||||
|
||||
|
||||
#define MAX_HD_DEVICES 5
|
||||
enum { COL_DEVICE, COL_VOLUME, COL_PATH, COL_READWRITE, COL_SIZE, COL_BOOTPRI, COL_COUNT };
|
||||
|
||||
static const char *column_caption[] = {
|
||||
|
@ -41,6 +40,22 @@ static gcn::Button* listCmdProps[MAX_HD_DEVICES];
|
|||
static gcn::ImageButton* listCmdDelete[MAX_HD_DEVICES];
|
||||
static gcn::Button* cmdAddDirectory;
|
||||
static gcn::Button* cmdAddHardfile;
|
||||
static gcn::Button* cmdCreateHardfile;
|
||||
|
||||
|
||||
static int GetHDType(int index)
|
||||
{
|
||||
int type;
|
||||
struct uaedev_config_info *uci;
|
||||
struct mountedinfo mi;
|
||||
|
||||
type = get_filesys_unitconfig(&changed_prefs, index, &mi);
|
||||
if (type < 0) {
|
||||
uci = &changed_prefs.mountconfig[index];
|
||||
type = uci->ishdf ? FILESYS_HARDFILE : FILESYS_VIRTUAL;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
class HDRemoveActionListener : public gcn::ActionListener
|
||||
|
@ -72,8 +87,7 @@ class HDEditActionListener : public gcn::ActionListener
|
|||
{
|
||||
if (actionEvent.getSource() == listCmdProps[i])
|
||||
{
|
||||
int type = is_hardfile (i);
|
||||
if(type == FILESYS_VIRTUAL)
|
||||
if (GetHDType(i) == FILESYS_VIRTUAL)
|
||||
EditFilesysVirtual(i);
|
||||
else
|
||||
EditFilesysHardfile(i);
|
||||
|
@ -113,6 +127,19 @@ class AddHardfileActionListener : public gcn::ActionListener
|
|||
AddHardfileActionListener* addHardfileActionListener;
|
||||
|
||||
|
||||
class CreateHardfileActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
void action(const gcn::ActionEvent& actionEvent)
|
||||
{
|
||||
CreateFilesysHardfile();
|
||||
cmdCreateHardfile->requestFocus();
|
||||
RefreshPanelHD();
|
||||
}
|
||||
};
|
||||
CreateHardfileActionListener* createHardfileActionListener;
|
||||
|
||||
|
||||
void InitPanelHD(const struct _ConfigCategory& category)
|
||||
{
|
||||
int row, col;
|
||||
|
@ -124,6 +151,7 @@ void InitPanelHD(const struct _ConfigCategory& category)
|
|||
hdEditActionListener = new HDEditActionListener();
|
||||
addVirtualHDActionListener = new AddVirtualHDActionListener();
|
||||
addHardfileActionListener = new AddHardfileActionListener();
|
||||
createHardfileActionListener = new CreateHardfileActionListener();
|
||||
|
||||
for(col=0; col<COL_COUNT; ++col)
|
||||
lblList[col] = new gcn::Label(column_caption[col]);
|
||||
|
@ -170,6 +198,12 @@ void InitPanelHD(const struct _ConfigCategory& category)
|
|||
cmdAddHardfile->setId("cmdAddHDF");
|
||||
cmdAddHardfile->addActionListener(addHardfileActionListener);
|
||||
|
||||
cmdCreateHardfile = new gcn::Button("Create Hardfile");
|
||||
cmdCreateHardfile->setBaseColor(gui_baseCol);
|
||||
cmdCreateHardfile->setSize(BUTTON_WIDTH + 20, BUTTON_HEIGHT);
|
||||
cmdCreateHardfile->setId("cmdCreateHDF");
|
||||
cmdCreateHardfile->addActionListener(createHardfileActionListener);
|
||||
|
||||
posX = DISTANCE_BORDER + 2 + SMALL_BUTTON_WIDTH + 34;
|
||||
for(col=0; col<COL_COUNT; ++col)
|
||||
{
|
||||
|
@ -197,6 +231,7 @@ void InitPanelHD(const struct _ConfigCategory& category)
|
|||
posY = category.panel->getHeight() - DISTANCE_BORDER - BUTTON_HEIGHT;
|
||||
category.panel->add(cmdAddDirectory, DISTANCE_BORDER, posY);
|
||||
category.panel->add(cmdAddHardfile, DISTANCE_BORDER + cmdAddDirectory->getWidth() + DISTANCE_NEXT_X, posY);
|
||||
category.panel->add(cmdCreateHardfile, cmdAddHardfile->getX() + cmdAddHardfile->getWidth() + DISTANCE_NEXT_X, posY);
|
||||
|
||||
RefreshPanelHD();
|
||||
}
|
||||
|
@ -220,11 +255,13 @@ void ExitPanelHD(void)
|
|||
|
||||
delete cmdAddDirectory;
|
||||
delete cmdAddHardfile;
|
||||
delete cmdCreateHardfile;
|
||||
|
||||
delete hdRemoveActionListener;
|
||||
delete hdEditActionListener;
|
||||
delete addVirtualHDActionListener;
|
||||
delete addHardfileActionListener;
|
||||
delete createHardfileActionListener;
|
||||
}
|
||||
|
||||
|
||||
|
@ -235,7 +272,6 @@ void RefreshPanelHD(void)
|
|||
struct mountedinfo mi;
|
||||
struct uaedev_config_info *uci;
|
||||
int nosize = 0, type;
|
||||
int units = nr_units();
|
||||
|
||||
for(row=0; row<MAX_HD_DEVICES; ++row)
|
||||
{
|
||||
|
@ -291,3 +327,22 @@ void RefreshPanelHD(void)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int count_HDs(struct uae_prefs *p)
|
||||
{
|
||||
int row;
|
||||
struct uaedev_config_info *uci;
|
||||
int cnt = 0;
|
||||
|
||||
for(row=0; row<MAX_HD_DEVICES; ++row)
|
||||
{
|
||||
uci = &p->mountconfig[row];
|
||||
if(uci->devname && uci->devname[0])
|
||||
{
|
||||
++cnt;
|
||||
}
|
||||
}
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "sysdeps.h"
|
||||
#include "config.h"
|
||||
#include "uae.h"
|
||||
#include "fsdb.h"
|
||||
#include "gui.h"
|
||||
#include "gui_handling.h"
|
||||
|
||||
|
@ -24,6 +25,7 @@
|
|||
|
||||
static bool dialogResult = false;
|
||||
static bool dialogFinished = false;
|
||||
static bool createNew = false;
|
||||
static char workingDir[MAX_PATH];
|
||||
static const char **filefilter;
|
||||
|
||||
|
@ -33,6 +35,8 @@ static gcn::Button* cmdCancel;
|
|||
static gcn::ListBox* lstFiles;
|
||||
static gcn::ScrollArea* scrAreaFiles;
|
||||
static gcn::TextField *txtCurrent;
|
||||
static gcn::Label *lblFilename;
|
||||
static gcn::TextField *txtFilename;
|
||||
|
||||
|
||||
class SelectFileListModel : public gcn::ListModel
|
||||
|
@ -85,12 +89,30 @@ class FileButtonActionListener : public gcn::ActionListener
|
|||
{
|
||||
int selected_item;
|
||||
selected_item = lstFiles->getSelected();
|
||||
if(createNew)
|
||||
{
|
||||
char tmp[MAX_PATH];
|
||||
if(txtFilename->getText().length() <= 0)
|
||||
return;
|
||||
strcpy(tmp, workingDir);
|
||||
strcat(tmp, "/");
|
||||
strcat(tmp, txtFilename->getText().c_str());
|
||||
if(strstr(tmp, filefilter[0]) == NULL)
|
||||
strcat(tmp, filefilter[0]);
|
||||
if(my_existsfile(tmp) == 1)
|
||||
return; // File already exists
|
||||
strcpy(workingDir, tmp);
|
||||
dialogResult = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(fileList->isDir(selected_item))
|
||||
return; // Directory selected -> Ok not possible
|
||||
strcat(workingDir, "/");
|
||||
strcat(workingDir, fileList->getElementAt(selected_item).c_str());
|
||||
dialogResult = true;
|
||||
}
|
||||
}
|
||||
dialogFinished = true;
|
||||
}
|
||||
};
|
||||
|
@ -144,7 +166,7 @@ class SelectFileActionListener : public gcn::ActionListener
|
|||
strcat(foldername, fileList->getElementAt(selected_item).c_str());
|
||||
if(fileList->isDir(selected_item))
|
||||
checkfoldername(foldername);
|
||||
else
|
||||
else if(!createNew)
|
||||
{
|
||||
strncpy(workingDir, foldername, sizeof(workingDir));
|
||||
dialogResult = true;
|
||||
|
@ -199,6 +221,22 @@ static void InitSelectFile(const char *title)
|
|||
scrAreaFiles->setScrollbarWidth(20);
|
||||
scrAreaFiles->setBaseColor(gui_baseCol + 0x202020);
|
||||
|
||||
if(createNew)
|
||||
{
|
||||
scrAreaFiles->setSize(DIALOG_WIDTH - 2 * DISTANCE_BORDER - 4, 272 - TEXTFIELD_HEIGHT - DISTANCE_NEXT_Y);
|
||||
lblFilename = new gcn::Label("Filename:");
|
||||
lblFilename->setSize(80, LABEL_HEIGHT);
|
||||
lblFilename->setAlignment(gcn::Graphics::LEFT);
|
||||
lblFilename->setPosition(DISTANCE_BORDER, scrAreaFiles->getY() + scrAreaFiles->getHeight() + DISTANCE_NEXT_Y);
|
||||
txtFilename = new gcn::TextField();
|
||||
txtFilename->setSize(120, TEXTFIELD_HEIGHT);
|
||||
txtFilename->setId("Filename");
|
||||
txtFilename->setPosition(lblFilename->getX() + lblFilename->getWidth() + DISTANCE_NEXT_X, lblFilename->getY());
|
||||
|
||||
wndSelectFile->add(lblFilename);
|
||||
wndSelectFile->add(txtFilename);
|
||||
}
|
||||
|
||||
wndSelectFile->add(cmdOK);
|
||||
wndSelectFile->add(cmdCancel);
|
||||
wndSelectFile->add(txtCurrent);
|
||||
|
@ -225,6 +263,11 @@ static void ExitSelectFile(void)
|
|||
delete scrAreaFiles;
|
||||
delete selectFileActionListener;
|
||||
delete fileList;
|
||||
if(createNew)
|
||||
{
|
||||
delete lblFilename;
|
||||
delete txtFilename;
|
||||
}
|
||||
|
||||
delete wndSelectFile;
|
||||
}
|
||||
|
@ -254,6 +297,11 @@ static void SelectFileLoop(void)
|
|||
else if(activeWidget == cmdCancel)
|
||||
cmdOK->requestFocus();
|
||||
else if(activeWidget == cmdOK)
|
||||
if(createNew)
|
||||
txtFilename->requestFocus();
|
||||
else
|
||||
lstFiles->requestFocus();
|
||||
else if(activeWidget == txtFilename)
|
||||
lstFiles->requestFocus();
|
||||
continue;
|
||||
}
|
||||
|
@ -264,6 +312,11 @@ static void SelectFileLoop(void)
|
|||
gcn::FocusHandler* focusHdl = gui_top->_getFocusHandler();
|
||||
gcn::Widget* activeWidget = focusHdl->getFocused();
|
||||
if(activeWidget == lstFiles)
|
||||
if(createNew)
|
||||
txtFilename->requestFocus();
|
||||
else
|
||||
cmdOK->requestFocus();
|
||||
else if(activeWidget == txtFilename)
|
||||
cmdOK->requestFocus();
|
||||
else if(activeWidget == cmdCancel)
|
||||
lstFiles->requestFocus();
|
||||
|
@ -301,10 +354,11 @@ static void SelectFileLoop(void)
|
|||
static int Already_init = 0;
|
||||
#endif
|
||||
|
||||
bool SelectFile(const char *title, char *value, const char *filter[])
|
||||
bool SelectFile(const char *title, char *value, const char *filter[], bool create)
|
||||
{
|
||||
dialogResult = false;
|
||||
dialogFinished = false;
|
||||
createNew = create;
|
||||
filefilter = filter;
|
||||
|
||||
|
||||
|
|
|
@ -59,4 +59,19 @@ namespace gcn
|
|||
{
|
||||
return mDroppedDown;
|
||||
}
|
||||
|
||||
void UaeDropDown::setEnabled(bool enabled)
|
||||
{
|
||||
if(mEnabled != enabled)
|
||||
{
|
||||
mEnabled = enabled;
|
||||
if(mEnabled)
|
||||
mBackgroundColor = mBackgroundColorBackup;
|
||||
else
|
||||
{
|
||||
mBackgroundColorBackup = mBackgroundColor;
|
||||
mBackgroundColor = mBackgroundColor - 0x303030;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,15 @@ namespace gcn
|
|||
|
||||
virtual void keyPressed(KeyEvent& keyEvent);
|
||||
|
||||
virtual void setEnabled(bool enabled);
|
||||
|
||||
void clearSelected(void);
|
||||
|
||||
bool isDroppedDown(void);
|
||||
|
||||
protected:
|
||||
Color mBackgroundColorBackup;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -86,12 +86,15 @@ void RefreshPanelSavestate(void);
|
|||
|
||||
void RefreshAllPanels(void);
|
||||
|
||||
void DisableResume(void);
|
||||
|
||||
void InGameMessage(const char *msg);
|
||||
bool ShowMessage(const char *title, const char *line1, const char *line2, const char *button1, const char *button2);
|
||||
bool SelectFolder(const char *title, char *value);
|
||||
bool SelectFile(const char *title, char *value, const char *filter[]);
|
||||
bool SelectFile(const char *title, char *value, const char *filter[], bool create = false);
|
||||
bool EditFilesysVirtual(int unit_no);
|
||||
bool EditFilesysHardfile(int unit_no);
|
||||
bool CreateFilesysHardfile(void);
|
||||
|
||||
bool LoadConfigByName(const char *name);
|
||||
ConfigFileInfo* SearchConfigInList(const char *name);
|
||||
|
@ -102,6 +105,11 @@ extern void FilterFiles(std::vector<std::string> *files, const char *filter[]);
|
|||
enum { DIRECTION_NONE, DIRECTION_UP, DIRECTION_DOWN, DIRECTION_LEFT, DIRECTION_RIGHT };
|
||||
bool HandleNavigation(int direction);
|
||||
|
||||
#define MAX_HD_DEVICES 5
|
||||
extern void CreateDefaultDevicename(char *name);
|
||||
extern bool DevicenameExists(const char *name);
|
||||
extern int tweakbootpri (int bp, int ab, int dnm);
|
||||
|
||||
extern char *screenshot_filename;
|
||||
extern int currentStateNum;
|
||||
extern int delay_savestate_frame;
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#include "gui.h"
|
||||
#include "target.h"
|
||||
#include "gui_handling.h"
|
||||
#include "memory.h"
|
||||
#include "autoconf.h"
|
||||
|
||||
bool gui_running = false;
|
||||
static int last_active_panel = 1;
|
||||
|
@ -20,7 +22,7 @@ static int last_active_panel = 1;
|
|||
ConfigCategory categories[] = {
|
||||
{ "Paths", "data/paths.ico", NULL, NULL, InitPanelPaths, ExitPanelPaths, RefreshPanelPaths },
|
||||
{ "Configurations", "data/file.ico", NULL, NULL, InitPanelConfig, ExitPanelConfig, RefreshPanelConfig },
|
||||
{ "CPU", "data/cpu.ico", NULL, NULL, InitPanelCPU, ExitPanelCPU, RefreshPanelCPU },
|
||||
{ "CPU and FPU", "data/cpu.ico", NULL, NULL, InitPanelCPU, ExitPanelCPU, RefreshPanelCPU },
|
||||
{ "Chipset", "data/cpu.ico", NULL, NULL, InitPanelChipset, ExitPanelChipset, RefreshPanelChipset },
|
||||
{ "ROM", "data/chip.ico", NULL, NULL, InitPanelROM, ExitPanelROM, RefreshPanelROM },
|
||||
{ "RAM", "data/chip.ico", NULL, NULL, InitPanelRAM, ExitPanelRAM, RefreshPanelRAM },
|
||||
|
@ -51,6 +53,29 @@ gcn::SDLGraphics* gui_graphics;
|
|||
gcn::SDLInput* gui_input;
|
||||
gcn::SDLImageLoader* gui_imageLoader;
|
||||
|
||||
namespace widgets
|
||||
{
|
||||
// Main buttons
|
||||
gcn::Button* cmdQuit;
|
||||
gcn::Button* cmdReset;
|
||||
gcn::Button* cmdRestart;
|
||||
gcn::Button* cmdStart;
|
||||
}
|
||||
|
||||
|
||||
int gui_check_boot_rom(struct uae_prefs *p)
|
||||
{
|
||||
if(count_HDs(p) > 0)
|
||||
return 1;
|
||||
if(p->gfxmem_size)
|
||||
return 1;
|
||||
if (p->chipmem_size > 2 * 1024 * 1024)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
namespace sdl
|
||||
{
|
||||
void gui_init()
|
||||
|
@ -142,12 +167,12 @@ namespace sdl
|
|||
//-------------------------------------------------
|
||||
// Reset Amiga
|
||||
//-------------------------------------------------
|
||||
uae_reset(0);
|
||||
uae_reset(1);
|
||||
gui_running = false;
|
||||
break;
|
||||
|
||||
case SDLK_LCTRL:
|
||||
if(emulating)
|
||||
if(emulating && widgets::cmdStart->isEnabled())
|
||||
{
|
||||
//------------------------------------------------
|
||||
// Continue emulation
|
||||
|
@ -213,15 +238,9 @@ namespace sdl
|
|||
|
||||
}
|
||||
|
||||
|
||||
namespace widgets
|
||||
{
|
||||
// Main buttons
|
||||
gcn::Button* cmdQuit;
|
||||
gcn::Button* cmdReset;
|
||||
gcn::Button* cmdRestart;
|
||||
gcn::Button* cmdStart;
|
||||
|
||||
|
||||
class MainButtonActionListener : public gcn::ActionListener
|
||||
{
|
||||
public:
|
||||
|
@ -262,7 +281,7 @@ namespace widgets
|
|||
}
|
||||
else if(actionEvent.getSource() == cmdStart)
|
||||
{
|
||||
if(emulating)
|
||||
if(emulating && widgets::cmdStart->isEnabled())
|
||||
{
|
||||
//------------------------------------------------
|
||||
// Continue emulation
|
||||
|
@ -475,9 +494,27 @@ void RefreshAllPanels(void)
|
|||
}
|
||||
|
||||
|
||||
void DisableResume(void)
|
||||
{
|
||||
if(emulating)
|
||||
{
|
||||
widgets::cmdStart->setEnabled(false);
|
||||
gcn::Color backCol;
|
||||
backCol.r = 128;
|
||||
backCol.g = 128;
|
||||
backCol.b = 128;
|
||||
widgets::cmdStart->setForegroundColor(backCol);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void run_gui(void)
|
||||
{
|
||||
int boot_rom_on_enter;
|
||||
|
||||
gui_running = true;
|
||||
boot_rom_on_enter = gui_check_boot_rom(&currprefs);
|
||||
|
||||
try
|
||||
{
|
||||
sdl::gui_init();
|
||||
|
@ -510,5 +547,8 @@ void run_gui(void)
|
|||
// Prepare everything for Reset of Amiga
|
||||
//--------------------------------------------------
|
||||
currprefs.nr_floppies = changed_prefs.nr_floppies;
|
||||
|
||||
if(boot_rom_on_enter != gui_check_boot_rom(&changed_prefs))
|
||||
quit_program = -3; // Hardreset required...
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,34 +85,34 @@ void inputmode_redraw(void)
|
|||
}
|
||||
|
||||
|
||||
void set_joyConf(void)
|
||||
void set_joyConf(struct uae_prefs *p)
|
||||
{
|
||||
if(changed_prefs.pandora_joyConf == 0)
|
||||
if(p->pandora_joyConf == 0)
|
||||
{
|
||||
changed_prefs.pandora_button1 = GP2X_BUTTON_X;
|
||||
changed_prefs.pandora_button2 = GP2X_BUTTON_A;
|
||||
changed_prefs.pandora_jump = -1;
|
||||
changed_prefs.pandora_autofireButton1 = GP2X_BUTTON_B;
|
||||
p->pandora_button1 = GP2X_BUTTON_X;
|
||||
p->pandora_button2 = GP2X_BUTTON_A;
|
||||
p->pandora_jump = -1;
|
||||
p->pandora_autofireButton1 = GP2X_BUTTON_B;
|
||||
}
|
||||
else if(changed_prefs.pandora_joyConf == 1)
|
||||
else if(p->pandora_joyConf == 1)
|
||||
{
|
||||
changed_prefs.pandora_button1 = GP2X_BUTTON_B;
|
||||
changed_prefs.pandora_button2 = GP2X_BUTTON_A;
|
||||
changed_prefs.pandora_jump = -1;
|
||||
changed_prefs.pandora_autofireButton1 = GP2X_BUTTON_X;
|
||||
p->pandora_button1 = GP2X_BUTTON_B;
|
||||
p->pandora_button2 = GP2X_BUTTON_A;
|
||||
p->pandora_jump = -1;
|
||||
p->pandora_autofireButton1 = GP2X_BUTTON_X;
|
||||
}
|
||||
else if(changed_prefs.pandora_joyConf == 2)
|
||||
else if(p->pandora_joyConf == 2)
|
||||
{
|
||||
changed_prefs.pandora_button1 = GP2X_BUTTON_Y;
|
||||
changed_prefs.pandora_button2 = GP2X_BUTTON_A;
|
||||
changed_prefs.pandora_jump = GP2X_BUTTON_X;
|
||||
changed_prefs.pandora_autofireButton1 = GP2X_BUTTON_B;
|
||||
p->pandora_button1 = GP2X_BUTTON_Y;
|
||||
p->pandora_button2 = GP2X_BUTTON_A;
|
||||
p->pandora_jump = GP2X_BUTTON_X;
|
||||
p->pandora_autofireButton1 = GP2X_BUTTON_B;
|
||||
}
|
||||
else if(changed_prefs.pandora_joyConf == 3)
|
||||
{
|
||||
changed_prefs.pandora_button1 = GP2X_BUTTON_B;
|
||||
changed_prefs.pandora_button2 = GP2X_BUTTON_A;
|
||||
changed_prefs.pandora_jump = GP2X_BUTTON_X;
|
||||
changed_prefs.pandora_autofireButton1 = GP2X_BUTTON_Y;
|
||||
p->pandora_button1 = GP2X_BUTTON_B;
|
||||
p->pandora_button2 = GP2X_BUTTON_A;
|
||||
p->pandora_jump = GP2X_BUTTON_X;
|
||||
p->pandora_autofireButton1 = GP2X_BUTTON_Y;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
void inputmode_init(void);
|
||||
void inputmode_redraw(void);
|
||||
|
||||
void set_joyConf(void);
|
||||
void set_joyConf(struct uae_prefs *p);
|
||||
|
||||
extern int show_inputmode;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "sd-pandora/sound.h"
|
||||
#include "custom.h"
|
||||
#include "od-pandora/gp2x.h"
|
||||
#include "cfgfile.h"
|
||||
#include "uae.h"
|
||||
#include "disk.h"
|
||||
#include "../inputmode.h"
|
||||
|
@ -305,13 +304,6 @@ static void SetPresetMode(int mode, struct uae_prefs *p)
|
|||
|
||||
static void SetDefaultMenuSettings(struct uae_prefs *p)
|
||||
{
|
||||
int i;
|
||||
|
||||
free_mountinfo();
|
||||
for(i=0; i<MOUNT_CONFIG_SIZE; ++i)
|
||||
kill_filesys_unitconfig(p, i);
|
||||
p->mountitems = 0;
|
||||
|
||||
kickstart = 1;
|
||||
|
||||
SetPresetMode(2, p);
|
||||
|
@ -504,12 +496,11 @@ int loadconfig_old(struct uae_prefs *p, const char *orgpath)
|
|||
fscanf(f,"custom_L=%d\n",&p->pandora_custom_L);
|
||||
fscanf(f,"custom_R=%d\n",&p->pandora_custom_R);
|
||||
fscanf(f,"cpu=%d\n", &cpu_level);
|
||||
if(cpu_level > M68000)
|
||||
if(cpu_level > 0) // M68000
|
||||
// Was old format
|
||||
cpu_level = M68020;
|
||||
cpu_level = 2; // M68020
|
||||
fscanf(f,"chipset=%d\n", &p->chipset_mask);
|
||||
p->immediate_blits = (p->chipset_mask & 0x100) == 0x100;
|
||||
p->pandora_partial_blits = (p->chipset_mask & 0x200) == 0x200;
|
||||
switch (p->chipset_mask & 0xff)
|
||||
{
|
||||
case 1: p->chipset_mask = CSMASK_ECS_AGNUS | CSMASK_ECS_DENISE; break;
|
||||
|
@ -528,7 +519,7 @@ int loadconfig_old(struct uae_prefs *p, const char *orgpath)
|
|||
if(p->m68k_speed >= 2)
|
||||
{
|
||||
// 1200: set to 68020 with 14 MHz
|
||||
cpu_level = M68020;
|
||||
cpu_level = 2; // M68020
|
||||
p->m68k_speed--;
|
||||
if(p->m68k_speed > 2)
|
||||
p->m68k_speed = 2;
|
||||
|
@ -570,14 +561,20 @@ int loadconfig_old(struct uae_prefs *p, const char *orgpath)
|
|||
disk_eject(3);
|
||||
fscanf(f,"df0=%s\n",&filebuffer);
|
||||
replace(filebuffer,' ','|');
|
||||
if(DISK_validate_filename(filebuffer, 0, NULL, NULL))
|
||||
strcpy(p->df[0], filebuffer);
|
||||
else
|
||||
p->df[0][0] = 0;
|
||||
disk_insert(0, filebuffer);
|
||||
if(p->nr_floppies > 1)
|
||||
{
|
||||
memset(filebuffer, 0, 256);
|
||||
fscanf(f,"df1=%s\n",&filebuffer);
|
||||
replace(filebuffer,' ','|');
|
||||
if(DISK_validate_filename(filebuffer, 0, NULL, NULL))
|
||||
strcpy(p->df[1], filebuffer);
|
||||
else
|
||||
p->df[1][0] = 0;
|
||||
disk_insert(1, filebuffer);
|
||||
}
|
||||
if(p->nr_floppies > 2)
|
||||
|
@ -585,7 +582,10 @@ int loadconfig_old(struct uae_prefs *p, const char *orgpath)
|
|||
memset(filebuffer, 0, 256);
|
||||
fscanf(f,"df2=%s\n",&filebuffer);
|
||||
replace(filebuffer,' ','|');
|
||||
if(DISK_validate_filename(filebuffer, 0, NULL, NULL))
|
||||
strcpy(p->df[2], filebuffer);
|
||||
else
|
||||
p->df[2][0] = 0;
|
||||
disk_insert(2, filebuffer);
|
||||
}
|
||||
if(p->nr_floppies > 3)
|
||||
|
@ -593,7 +593,10 @@ int loadconfig_old(struct uae_prefs *p, const char *orgpath)
|
|||
memset(filebuffer, 0, 256);
|
||||
fscanf(f,"df3=%s\n",&filebuffer);
|
||||
replace(filebuffer,' ','|');
|
||||
if(DISK_validate_filename(filebuffer, 0, NULL, NULL))
|
||||
strcpy(p->df[3], filebuffer);
|
||||
else
|
||||
p->df[3][0] = 0;
|
||||
disk_insert(3, filebuffer);
|
||||
}
|
||||
|
||||
|
@ -656,7 +659,7 @@ int loadconfig_old(struct uae_prefs *p, const char *orgpath)
|
|||
SetPresetMode(presetModeId, p);
|
||||
|
||||
CheckKickstart(p);
|
||||
set_joyConf();
|
||||
set_joyConf(p);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "autoconf.h"
|
||||
#include "uae.h"
|
||||
#include "options.h"
|
||||
#include "td-sdl/thread.h"
|
||||
#include "gui.h"
|
||||
#include "events.h"
|
||||
#include "memory.h"
|
||||
|
@ -32,6 +33,9 @@
|
|||
#include "joystick.h"
|
||||
#include "disk.h"
|
||||
#include "savestate.h"
|
||||
#include "newcpu.h"
|
||||
#include "traps.h"
|
||||
#include "native2amiga.h"
|
||||
#include <SDL.h>
|
||||
#include "gp2x.h"
|
||||
|
||||
|
@ -72,6 +76,52 @@ static int lastCpuSpeed = 600;
|
|||
extern "C" int main( int argc, char *argv[] );
|
||||
|
||||
|
||||
void reinit_amiga(void)
|
||||
{
|
||||
write_log("reinit_amiga() called\n");
|
||||
DISK_free ();
|
||||
memory_cleanup ();
|
||||
#ifdef FILESYS
|
||||
filesys_cleanup ();
|
||||
#endif
|
||||
#ifdef AUTOCONFIG
|
||||
expansion_cleanup ();
|
||||
#endif
|
||||
|
||||
currprefs = changed_prefs;
|
||||
/* force sound settings change */
|
||||
currprefs.produce_sound = 0;
|
||||
|
||||
framecnt = 1;
|
||||
#ifdef AUTOCONFIG
|
||||
rtarea_setup ();
|
||||
#endif
|
||||
#ifdef FILESYS
|
||||
rtarea_init ();
|
||||
hardfile_install();
|
||||
#endif
|
||||
|
||||
#ifdef AUTOCONFIG
|
||||
expansion_init ();
|
||||
#endif
|
||||
#ifdef FILESYS
|
||||
filesys_install ();
|
||||
#endif
|
||||
memory_init ();
|
||||
memory_reset ();
|
||||
|
||||
#ifdef AUTOCONFIG
|
||||
emulib_install ();
|
||||
native2amiga_install ();
|
||||
#endif
|
||||
|
||||
custom_init (); /* Must come after memory_init */
|
||||
DISK_init ();
|
||||
|
||||
init_m68k();
|
||||
}
|
||||
|
||||
|
||||
void sleep_millis (int ms)
|
||||
{
|
||||
usleep(ms * 1000);
|
||||
|
@ -119,6 +169,12 @@ void logging_cleanup( void )
|
|||
}
|
||||
|
||||
|
||||
uae_u8 *target_load_keyfile (struct uae_prefs *p, char *path, int *sizep, char *name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void target_quit (void)
|
||||
{
|
||||
}
|
||||
|
@ -134,7 +190,6 @@ void target_default_options (struct uae_prefs *p, int type)
|
|||
p->pandora_horizontal_offset = 0;
|
||||
p->pandora_vertical_offset = 0;
|
||||
p->pandora_cpu_speed = 600;
|
||||
p->pandora_partial_blits = 0;
|
||||
|
||||
p->pandora_joyConf = 0;
|
||||
p->pandora_joyPort = 0;
|
||||
|
@ -167,7 +222,6 @@ void target_default_options (struct uae_prefs *p, int type)
|
|||
|
||||
void target_save_options (struct zfile *f, struct uae_prefs *p)
|
||||
{
|
||||
cfgfile_write (f, "pandora.blitter_in_partial_mode=%d\n", p->pandora_partial_blits);
|
||||
cfgfile_write (f, "pandora.cpu_speed=%d\n", p->pandora_cpu_speed);
|
||||
cfgfile_write (f, "pandora.joy_conf=%d\n", p->pandora_joyConf);
|
||||
cfgfile_write (f, "pandora.joy_port=%d\n", p->pandora_joyPort);
|
||||
|
@ -196,8 +250,7 @@ void target_save_options (struct zfile *f, struct uae_prefs *p)
|
|||
|
||||
int target_parse_option (struct uae_prefs *p, char *option, char *value)
|
||||
{
|
||||
int result = (cfgfile_intval (option, value, "blitter_in_partial_mode", &p->pandora_partial_blits, 1)
|
||||
|| cfgfile_intval (option, value, "cpu_speed", &p->pandora_cpu_speed, 1)
|
||||
int result = (cfgfile_intval (option, value, "cpu_speed", &p->pandora_cpu_speed, 1)
|
||||
|| cfgfile_intval (option, value, "joy_conf", &p->pandora_joyConf, 1)
|
||||
|| cfgfile_intval (option, value, "joy_port", &p->pandora_joyPort, 1)
|
||||
|| cfgfile_intval (option, value, "stylus_offset", &p->pandora_stylusOffset, 1)
|
||||
|
@ -224,6 +277,13 @@ int target_parse_option (struct uae_prefs *p, char *option, char *value)
|
|||
}
|
||||
|
||||
|
||||
void fetch_saveimagepath (char *out, int size, int dir)
|
||||
{
|
||||
strncpy(out, start_path_data, size);
|
||||
strncat(out, "/savestates/", size);
|
||||
}
|
||||
|
||||
|
||||
void fetch_configurationpath (char *out, int size)
|
||||
{
|
||||
strncpy(out, config_path, size);
|
||||
|
@ -267,10 +327,10 @@ int target_cfgfile_load (struct uae_prefs *p, char *filename, int type, int isde
|
|||
int i;
|
||||
int result = 0;
|
||||
|
||||
free_mountinfo();
|
||||
for(i=0; i<MOUNT_CONFIG_SIZE; ++i)
|
||||
kill_filesys_unitconfig(p, i);
|
||||
p->mountitems = 0;
|
||||
filesys_prepare_reset();
|
||||
while(p->mountitems > 0)
|
||||
kill_filesys_unitconfig(p, 0);
|
||||
discard_prefs(p, type);
|
||||
|
||||
char *ptr = strstr(filename, ".uae");
|
||||
if(ptr > 0)
|
||||
|
@ -280,7 +340,7 @@ int target_cfgfile_load (struct uae_prefs *p, char *filename, int type, int isde
|
|||
}
|
||||
if(result)
|
||||
{
|
||||
set_joyConf();
|
||||
set_joyConf(p);
|
||||
extractFileName(filename, last_loaded_config);
|
||||
}
|
||||
else
|
||||
|
@ -288,8 +348,11 @@ int target_cfgfile_load (struct uae_prefs *p, char *filename, int type, int isde
|
|||
|
||||
if(result)
|
||||
{
|
||||
for(int i=0; i < p->nr_floppies; ++i)
|
||||
for(i=0; i < p->nr_floppies; ++i)
|
||||
{
|
||||
if(!DISK_validate_filename(p->df[i], 0, NULL, NULL))
|
||||
p->df[i][0] = 0;
|
||||
disk_insert(i, p->df[i]);
|
||||
if(strlen(p->df[i]) > 0)
|
||||
AddFileToDiskList(p->df[i], 1);
|
||||
}
|
||||
|
@ -595,6 +658,7 @@ int main (int argc, char *argv[])
|
|||
}
|
||||
|
||||
alloc_AmigaMem();
|
||||
RescanROMs();
|
||||
real_main (argc, argv);
|
||||
free_AmigaMem();
|
||||
|
||||
|
|
|
@ -187,6 +187,7 @@ static void open_screen(struct uae_prefs *p)
|
|||
}
|
||||
if(prSDLScreen != NULL)
|
||||
{
|
||||
InitAmigaVidMode(p);
|
||||
init_row_map();
|
||||
}
|
||||
}
|
||||
|
@ -198,7 +199,6 @@ void update_display(struct uae_prefs *p)
|
|||
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
|
||||
InitAmigaVidMode(p);
|
||||
framecnt = 1; // Don't draw frame before reset done
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ void unlockscr (void)
|
|||
SDL_UnlockSurface(prSDLScreen);
|
||||
}
|
||||
|
||||
void flush_block ()
|
||||
void flush_screen ()
|
||||
{
|
||||
if (show_inputmode)
|
||||
inputmode_redraw();
|
||||
|
@ -278,6 +278,7 @@ void flush_block ()
|
|||
{
|
||||
SDL_Flip(prSDLScreen);
|
||||
last_synctime = read_processor_time();
|
||||
gfxvidinfo.bufmem = (uae_u8 *)prSDLScreen->pixels;
|
||||
}
|
||||
|
||||
if(last_synctime - next_synctime > time_per_frame - 1000)
|
||||
|
@ -349,8 +350,6 @@ static void graphics_subinit (void)
|
|||
|
||||
InitAmigaVidMode(&currprefs);
|
||||
}
|
||||
lastmx = lastmy = 0;
|
||||
newmousecounters = 0;
|
||||
}
|
||||
|
||||
STATIC_INLINE int bitsInMask (unsigned long mask)
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "keyboard.h"
|
||||
#include "disk.h"
|
||||
#include "savestate.h"
|
||||
#include "filesys.h"
|
||||
#include "autoconf.h"
|
||||
#include <SDL.h>
|
||||
|
||||
|
||||
|
@ -56,6 +58,7 @@ struct gui_msg {
|
|||
const char *msg;
|
||||
};
|
||||
struct gui_msg gui_msglist[] = {
|
||||
{ NUMSG_NEEDEXT2, "The software uses a non-standard floppy disk format. You may need to use a custom floppy disk image file instead of a standard one. This message will not appear again." },
|
||||
{ NUMSG_NOROM, "Could not load system ROM, trying system ROM replacement." },
|
||||
{ NUMSG_NOROMKEY, "Could not find system ROM key file." },
|
||||
{ NUMSG_KSROMCRCERROR, "System ROM checksum incorrect. The system ROM image file may be corrupt." },
|
||||
|
@ -112,8 +115,10 @@ static void ClearAvailableROMList(void)
|
|||
static void addrom(struct romdata *rd, char *path)
|
||||
{
|
||||
AvailableROM *tmp;
|
||||
char tmpName[MAX_DPATH];
|
||||
tmp = new AvailableROM();
|
||||
strncpy(tmp->Name, rd->name, MAX_PATH);
|
||||
getromname(rd, tmpName);
|
||||
strncpy(tmp->Name, tmpName, MAX_PATH);
|
||||
strncpy(tmp->Path, path, MAX_PATH);
|
||||
tmp->ROMType = rd->type;
|
||||
lstAvailableROMs.push_back(tmp);
|
||||
|
@ -124,7 +129,7 @@ struct romscandata {
|
|||
int keysize;
|
||||
};
|
||||
|
||||
static struct romdata *scan_single_rom_2 (struct zfile *f, uae_u8 *keybuf, int keysize)
|
||||
static struct romdata *scan_single_rom_2 (struct zfile *f)
|
||||
{
|
||||
uae_u8 buffer[20] = { 0 };
|
||||
uae_u8 *rombuf;
|
||||
|
@ -143,8 +148,6 @@ static struct romdata *scan_single_rom_2 (struct zfile *f, uae_u8 *keybuf, int k
|
|||
size = 262144;
|
||||
} else if (!memcmp (buffer, "AMIROMTYPE1", 11)) {
|
||||
cl = 1;
|
||||
if (keybuf == 0)
|
||||
cl = -1;
|
||||
size -= 11;
|
||||
} else {
|
||||
zfile_fseek (f, 0, SEEK_SET);
|
||||
|
@ -154,7 +157,7 @@ static struct romdata *scan_single_rom_2 (struct zfile *f, uae_u8 *keybuf, int k
|
|||
return 0;
|
||||
zfile_fread (rombuf, 1, size, f);
|
||||
if (cl > 0) {
|
||||
decode_cloanto_rom_do (rombuf, size, size, keybuf, keysize);
|
||||
if(decode_cloanto_rom_do (rombuf, size, size))
|
||||
cl = 0;
|
||||
}
|
||||
if (!cl)
|
||||
|
@ -163,11 +166,30 @@ static struct romdata *scan_single_rom_2 (struct zfile *f, uae_u8 *keybuf, int k
|
|||
return rd;
|
||||
}
|
||||
|
||||
static struct romdata *scan_single_rom (char *path)
|
||||
{
|
||||
struct zfile *z;
|
||||
char tmp[MAX_DPATH];
|
||||
struct romdata *rd;
|
||||
|
||||
strcpy (tmp, path);
|
||||
rd = getromdatabypath(path);
|
||||
if (rd && rd->crc32 == 0xffffffff)
|
||||
return rd;
|
||||
z = zfile_fopen (path, "rb");
|
||||
if (!z)
|
||||
return 0;
|
||||
return scan_single_rom_2 (z);
|
||||
}
|
||||
|
||||
static int isromext(char *path)
|
||||
{
|
||||
char *ext = strrchr (path, '.');
|
||||
char *ext;
|
||||
int i;
|
||||
|
||||
if (!path)
|
||||
return 0;
|
||||
ext = strrchr (path, '.');
|
||||
if (!ext)
|
||||
return 0;
|
||||
ext++;
|
||||
|
@ -182,23 +204,22 @@ static int isromext(char *path)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int scan_rom_2 (struct zfile *f, void *rsd)
|
||||
static int scan_rom_2 (struct zfile *f, void *dummy)
|
||||
{
|
||||
char *path = zfile_getname(f);
|
||||
struct romdata *rd;
|
||||
|
||||
if (!isromext(path))
|
||||
return 0;
|
||||
rd = scan_single_rom_2(f, ((struct romscandata *)rsd)->keybuf, ((struct romscandata *)rsd)->keysize);
|
||||
rd = scan_single_rom_2(f);
|
||||
if (rd)
|
||||
addrom (rd, path);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void scan_rom(char *path, uae_u8 *keybuf, int keysize)
|
||||
static void scan_rom(char *path)
|
||||
{
|
||||
struct romdata *rd;
|
||||
struct romscandata rsd = { keybuf, keysize };
|
||||
|
||||
if (!isromext(path)) {
|
||||
//write_log("ROMSCAN: skipping file '%s', unknown extension\n", path);
|
||||
|
@ -208,30 +229,27 @@ static void scan_rom(char *path, uae_u8 *keybuf, int keysize)
|
|||
if (rd)
|
||||
addrom(rd, path);
|
||||
else
|
||||
zfile_zopen (path, scan_rom_2, &rsd);
|
||||
zfile_zopen (path, scan_rom_2, 0);
|
||||
}
|
||||
|
||||
|
||||
void RescanROMs(void)
|
||||
{
|
||||
int keysize;
|
||||
uae_u8 *keybuf;
|
||||
std::vector<std::string> files;
|
||||
char path[MAX_DPATH];
|
||||
|
||||
ClearAvailableROMList();
|
||||
fetch_rompath(path, MAX_DPATH);
|
||||
|
||||
keybuf = load_keyfile (&changed_prefs, path, &keysize);
|
||||
load_keyring(&changed_prefs, path);
|
||||
ReadDirectory(path, NULL, &files);
|
||||
for(int i=0; i<files.size(); ++i)
|
||||
{
|
||||
char tmppath[MAX_PATH];
|
||||
strncpy(tmppath, path, MAX_PATH);
|
||||
strncat(tmppath, files[i].c_str(), MAX_PATH);
|
||||
scan_rom (tmppath, keybuf, keysize);
|
||||
scan_rom (tmppath);
|
||||
}
|
||||
free_keyfile (keybuf);
|
||||
}
|
||||
|
||||
static void ClearConfigFileList(void)
|
||||
|
@ -610,13 +628,7 @@ void gui_handle_events (void)
|
|||
|
||||
else if(triggerL)
|
||||
{
|
||||
if(keystate[SDLK_a])
|
||||
{
|
||||
keystate[SDLK_a]=0;
|
||||
currprefs.m68k_speed == 2 ? changed_prefs.m68k_speed = 0 : changed_prefs.m68k_speed++;
|
||||
check_prefs_changed_cpu();
|
||||
}
|
||||
else if(keystate[SDLK_c])
|
||||
if(keystate[SDLK_c])
|
||||
{
|
||||
keystate[SDLK_c]=0;
|
||||
currprefs.pandora_customControls = !currprefs.pandora_customControls;
|
||||
|
@ -1377,3 +1389,50 @@ void FilterFiles(std::vector<std::string> *files, const char *filter[])
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool DevicenameExists(const char *name)
|
||||
{
|
||||
int i;
|
||||
struct uaedev_config_info *uci;
|
||||
|
||||
for(i=0; i<MAX_HD_DEVICES; ++i)
|
||||
{
|
||||
uci = &changed_prefs.mountconfig[i];
|
||||
|
||||
if(uci->devname && uci->devname[0])
|
||||
{
|
||||
if(!strcmp(uci->devname, name))
|
||||
return true;
|
||||
if(uci->volname != 0 && !strcmp(uci->volname, name))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void CreateDefaultDevicename(char *name)
|
||||
{
|
||||
int freeNum = 0;
|
||||
bool foundFree = false;
|
||||
|
||||
while(!foundFree && freeNum < 10)
|
||||
{
|
||||
sprintf(name, "DH%d", freeNum);
|
||||
foundFree = !DevicenameExists(name);
|
||||
++freeNum;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int tweakbootpri (int bp, int ab, int dnm)
|
||||
{
|
||||
if (dnm)
|
||||
return -129;
|
||||
if (!ab)
|
||||
return -128;
|
||||
if (bp < -127)
|
||||
bp = -127;
|
||||
return bp;
|
||||
}
|
||||
|
|
|
@ -652,7 +652,7 @@ void picasso_handle_vsync (void)
|
|||
palette_changed = 0;
|
||||
}
|
||||
|
||||
flush_block ();
|
||||
flush_screen ();
|
||||
}
|
||||
|
||||
static int set_panning_called = 0;
|
||||
|
@ -1019,7 +1019,7 @@ static void FillBoardInfo (uaecptr amigamemptr, struct LibResolution *res, struc
|
|||
put_byte (amigamemptr + PSSO_ModeInfo_second_union, 14);
|
||||
|
||||
put_long (amigamemptr + PSSO_ModeInfo_PixelClock,
|
||||
dm->res.width * dm->res.height * (currprefs.gfx_refreshrate ? abs (currprefs.gfx_refreshrate) : 50));
|
||||
dm->res.width * dm->res.height * (currprefs.ntscmode ? 60 : 50));
|
||||
}
|
||||
|
||||
struct modeids {
|
||||
|
|
|
@ -1,3 +1,64 @@
|
|||
|
||||
#define SUPPORT_THREADS
|
||||
#define MAX_DPATH 256
|
||||
|
||||
/* #define DRIVESOUND */
|
||||
/* #define GFXFILTER */
|
||||
|
||||
/* #define DEBUGGER */
|
||||
#define FILESYS /* filesys emulation */
|
||||
#define UAE_FILESYS_THREADS
|
||||
#define AUTOCONFIG /* autoconfig support, fast ram, harddrives etc.. */
|
||||
#define JIT /* JIT compiler support */
|
||||
/* #define NATMEM_OFFSET natmem_offset */
|
||||
/* #define CATWEASEL */ /* Catweasel MK2/3 support */
|
||||
/* #define AHI */ /* AHI sound emulation */
|
||||
/* #define ENFORCER */ /* UAE Enforcer */
|
||||
#define ECS_DENISE /* ECS DENISE new features */
|
||||
#define AGA /* AGA chipset emulation (ECS_DENISE must be enabled) */
|
||||
/* #define CD32 */ /* CD32 emulation */
|
||||
/* #define CDTV */ /* CDTV emulation */
|
||||
/* #define PARALLEL_PORT */ /* parallel port emulation */
|
||||
/* #define SERIAL_PORT */ /* serial port emulation */
|
||||
/* #define SCSIEMU */ /* uaescsi.device emulation */
|
||||
/* #define UAESERIAL */ /* uaeserial.device emulation */
|
||||
#define FPUEMU /* FPU emulation */
|
||||
/* #define FPU_UAE */
|
||||
/* #define MMUEMU */
|
||||
#define CPUEMU_0 /* generic 680x0 emulation */
|
||||
#define CPUEMU_11 /* 68000+prefetch emulation */
|
||||
/* #define CPUEMU_12 */ /* cycle-exact cpu&blitter */
|
||||
/* #define ACTION_REPLAY */ /* Action Replay 1/2/3 support */
|
||||
#if !defined(RASPBERRY)
|
||||
#define PICASSO96 /* Picasso96 display card emulation */
|
||||
#endif
|
||||
/* #define BSDSOCKET */ /* bsdsocket.library emulation */
|
||||
/* #define CAPS */ /* CAPS-image support */
|
||||
/* #define FDI2RAW */ /* FDI 1.0 and 2.x image support */
|
||||
/* #define AVIOUTPUT */ /* Avioutput support */
|
||||
/* #define PROWIZARD */ /* Pro-Wizard module ripper */
|
||||
/* #define ARCADIA */ /* Arcadia arcade system */
|
||||
/* #define ARCHIVEACCESS */ /* ArchiveAccess decompression library */
|
||||
/* #define LOGITECHLCD */ /* Logitech G15 LCD */
|
||||
#define SAVESTATE /* State file support */
|
||||
/* #define A2091 */ /* A590/A2091 SCSI */
|
||||
/* #define NCR */ /* A4000T/A4091 SCSI */
|
||||
/* #define SANA2 */ /* SANA2 network driver */
|
||||
/* #define AMAX */ /* A-Max ROM adapater emulation */
|
||||
/* #define RETROPLATFORM */ /* Cloanto RetroPlayer support */
|
||||
|
||||
/* #define INPUT_RECORDER */ /* Use input recoder */
|
||||
|
||||
/* #define CUSTOM_SIMPLE */ /* simplified custom chipset emulation */
|
||||
/* #define CPUEMU_68000_ONLY */ /* drop 68010+ commands from CPUEMU_0 */
|
||||
/* #define ADDRESS_SPACE_24BIT */
|
||||
|
||||
#define SIZEOF_VOID_P 4
|
||||
|
||||
#if !defined(AHI)
|
||||
#undef ENFORCER
|
||||
#endif
|
||||
|
||||
/* src/sysconfig.h. Generated automatically by configure. */
|
||||
/* src/sysconfig.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
|
@ -144,8 +205,6 @@
|
|||
#define SIZEOF_FLOAT 4
|
||||
#define SIZEOF_DOUBLE 8
|
||||
|
||||
#define SIZEOF_VOID_P 4
|
||||
|
||||
#define HAVE_ISNAN
|
||||
#undef HAVE_ISINF
|
||||
|
||||
|
@ -260,9 +319,6 @@
|
|||
/* Define if you have the <dirent.h> header file. */
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define if you have the <dmedia/audio.h> header file. */
|
||||
/* #undef HAVE_DMEDIA_AUDIO_H */
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
|
@ -272,6 +328,9 @@
|
|||
/* Define if you have the <getopt.h> header file. */
|
||||
#define HAVE_GETOPT_H 1
|
||||
|
||||
/* Define if you have the <ggi/libggi.h> header file. */
|
||||
/* #undef HAVE_GGI_LIBGGI_H */
|
||||
|
||||
/* Define if you have the <libraries/cybergraphics.h> header file. */
|
||||
/* #undef HAVE_LIBRARIES_CYBERGRAPHICS_H */
|
||||
|
||||
|
@ -388,7 +447,6 @@
|
|||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 256
|
||||
#endif
|
||||
#define MAX_DPATH 256
|
||||
|
||||
#define WORDS_BIGENDIAN 1
|
||||
|
||||
|
|
|
@ -1,22 +1,17 @@
|
|||
/*
|
||||
* UAE - The Un*x Amiga Emulator
|
||||
*
|
||||
* Target specific stuff
|
||||
* Target specific stuff, Pandora version
|
||||
*
|
||||
* Copyright 1997 Bernd Schmidt
|
||||
*/
|
||||
|
||||
#define TARGET_NAME "pandora"
|
||||
|
||||
#define NO_MAIN_IN_MAIN_C
|
||||
|
||||
#define OPTIONSFILENAME "uaeconfig"
|
||||
|
||||
/* Just 0x0 and not 680x0, so that constants can fit in ARM instructions */
|
||||
#define M68000 0
|
||||
#define M68020 2
|
||||
|
||||
#define SIMULATE_SHIFT 0x200
|
||||
#define SIMULATE_RELEASED_SHIFT 0x400
|
||||
|
||||
extern int emulating;
|
||||
extern int uae4all_keystate[256];
|
||||
extern int stylusAdjustX;
|
||||
|
@ -33,3 +28,6 @@ void graphics_subshutdown (void);
|
|||
void pandora_stop_sound(void);
|
||||
|
||||
void keyboard_init(void);
|
||||
|
||||
void reinit_amiga(void);
|
||||
int count_HDs(struct uae_prefs *p);
|
||||
|
|
|
@ -11,6 +11,17 @@
|
|||
#define WRITE_LOG_BUF_SIZE 4096
|
||||
FILE *debugfile = NULL;
|
||||
|
||||
void console_out (const char *format,...)
|
||||
{
|
||||
va_list parms;
|
||||
char buffer[WRITE_LOG_BUF_SIZE];
|
||||
|
||||
va_start (parms, format);
|
||||
vsnprintf (buffer, WRITE_LOG_BUF_SIZE-1, format, parms);
|
||||
va_end (parms);
|
||||
printf(buffer);
|
||||
}
|
||||
|
||||
#ifdef WITH_LOGGING
|
||||
|
||||
void write_log (const char *format,...)
|
||||
|
|
|
@ -298,9 +298,11 @@ static void open_screen(struct uae_prefs *p)
|
|||
//dispmanxupdate = vc_dispmanx_update_start( 10 );
|
||||
}
|
||||
|
||||
|
||||
//InitAmigaVidMode(p);
|
||||
if(prSDLScreen != NULL)
|
||||
{
|
||||
InitAmigaVidMode(p);
|
||||
init_row_map();
|
||||
}
|
||||
//framecnt = 1; // Don't draw frame before reset done
|
||||
}
|
||||
|
||||
|
@ -311,7 +313,6 @@ void update_display(struct uae_prefs *p)
|
|||
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
|
||||
InitAmigaVidMode(p);
|
||||
framecnt = 1; // Don't draw frame before reset done
|
||||
}
|
||||
|
||||
|
@ -362,7 +363,7 @@ void unlockscr (void)
|
|||
}
|
||||
|
||||
|
||||
void flush_block ()
|
||||
void flush_screen ()
|
||||
{
|
||||
//SDL_UnlockSurface (prSDLScreen);
|
||||
|
||||
|
@ -489,8 +490,6 @@ static void graphics_subinit (void)
|
|||
|
||||
InitAmigaVidMode(&currprefs);
|
||||
}
|
||||
lastmx = lastmy = 0;
|
||||
newmousecounters = 0;
|
||||
}
|
||||
|
||||
STATIC_INLINE int bitsInMask (unsigned long mask)
|
||||
|
|
|
@ -52,7 +52,6 @@
|
|||
#include "zfile.h"
|
||||
#include "autoconf.h"
|
||||
#include "custom.h"
|
||||
#include "sd-pandora/sound.h"
|
||||
#include "newcpu.h"
|
||||
#include "savestate.h"
|
||||
#include "gui.h"
|
||||
|
@ -74,22 +73,10 @@ static void state_incompatible_warn(void)
|
|||
int dowarn = 0;
|
||||
int i;
|
||||
|
||||
#ifdef BSDSOCKET
|
||||
if (currprefs.socket_emu)
|
||||
dowarn = 1;
|
||||
#endif
|
||||
#ifdef UAESERIAL
|
||||
if (currprefs.uaeserial)
|
||||
dowarn = 1;
|
||||
#endif
|
||||
#ifdef SCSIEMU
|
||||
if (currprefs.scsi)
|
||||
dowarn = 1;
|
||||
#endif
|
||||
#ifdef CATWEASEL
|
||||
if (currprefs.catweasel)
|
||||
dowarn = 1;
|
||||
#endif
|
||||
#ifdef FILESYS
|
||||
for(i = 0; i < currprefs.mountitems; i++) {
|
||||
struct mountedinfo mi;
|
||||
|
@ -492,20 +479,6 @@ void restore_state (char *filename)
|
|||
end = restore_filesys (chunk);
|
||||
else if (!strcmp (name, "FSYC"))
|
||||
end = restore_filesys_common (chunk);
|
||||
#endif
|
||||
#ifdef CD32
|
||||
else if (!strcmp (name, "CD32"))
|
||||
end = restore_akiko (chunk);
|
||||
#endif
|
||||
#ifndef PANDORA
|
||||
else if (!strcmp (name, "GAYL"))
|
||||
end = restore_gayle (chunk);
|
||||
else if (!strcmp (name, "IDE "))
|
||||
end = restore_ide (chunk);
|
||||
else if (!strcmp (name, "CONF"))
|
||||
end = restore_configuration (chunk);
|
||||
else if (!strcmp (name, "LOG "))
|
||||
end = restore_log (chunk);
|
||||
#endif
|
||||
else {
|
||||
end = chunk + len;
|
||||
|
@ -598,23 +571,8 @@ int save_state (char *filename, const char *description)
|
|||
return 0;
|
||||
if (savestate_specialdump) {
|
||||
size_t pos;
|
||||
// if (savestate_specialdump == 2)
|
||||
// write_wavheader(f, 0, 22050);
|
||||
pos = zfile_ftell(f);
|
||||
save_rams (f, -1);
|
||||
// if (savestate_specialdump == 2) {
|
||||
// int len, len2, i;
|
||||
// uae_u8 *tmp;
|
||||
// len = zfile_ftell(f) - pos;
|
||||
// tmp = (uae_u8*)xmalloc(len);
|
||||
// zfile_fseek(f, pos, SEEK_SET);
|
||||
// len2 = zfile_fread(tmp, 1, len, f);
|
||||
// for (i = 0; i < len2; i++)
|
||||
// tmp[i] += 0x80;
|
||||
// write_wavheader(f, len, 22050);
|
||||
// zfile_fwrite(tmp, len2, 1, f);
|
||||
// xfree(tmp);
|
||||
// }
|
||||
zfile_fclose (f);
|
||||
return 1;
|
||||
}
|
||||
|
@ -705,11 +663,6 @@ int save_state (char *filename, const char *description)
|
|||
xfree (dst);
|
||||
} while ((dst = save_rom (0, &len, 0)));
|
||||
|
||||
#ifdef CD32
|
||||
dst = save_akiko (&len);
|
||||
save_chunk (f, dst, len, (char *)"CD32", 0);
|
||||
xfree (dst);
|
||||
#endif
|
||||
#ifdef FILESYS
|
||||
dst = save_filesys_common (&len);
|
||||
if (dst) {
|
||||
|
@ -723,39 +676,8 @@ int save_state (char *filename, const char *description)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
#ifndef PANDORA
|
||||
dst = save_gayle(&len);
|
||||
if (dst) {
|
||||
save_chunk (f, dst, len, "GAYL", 0);
|
||||
xfree(dst);
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
dst = save_ide (i, &len);
|
||||
if (dst) {
|
||||
save_chunk (f, dst, len, "IDE ", 0);
|
||||
xfree(dst);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* add fake END tag, makes it easy to strip CONF and LOG hunks */
|
||||
/* move this if you want to use CONF or LOG hunks when restoring state */
|
||||
zfile_fwrite (endhunk, 1, 8, f);
|
||||
|
||||
#ifndef PANDORA
|
||||
dst = save_configuration (&len);
|
||||
if (dst) {
|
||||
save_chunk (f, dst, len, "CONF", 1);
|
||||
xfree(dst);
|
||||
}
|
||||
dst = save_log (&len);
|
||||
if (dst) {
|
||||
save_chunk (f, dst, len, "LOG ", 1);
|
||||
xfree(dst);
|
||||
}
|
||||
|
||||
zfile_fwrite (endhunk, 1, 8, f);
|
||||
#endif
|
||||
|
||||
write_log ("Save of '%s' complete\n", filename);
|
||||
zfile_fclose (f);
|
||||
|
|
|
@ -26,18 +26,24 @@
|
|||
#include "savestate.h"
|
||||
|
||||
|
||||
extern unsigned long next_sample_evtime;
|
||||
|
||||
uae_u16 sndbuffer[4][(SNDBUFFER_LEN+32)*DEFAULT_SOUND_CHANNELS];
|
||||
uae_u16 *sndbufpt = sndbuffer[0];
|
||||
uae_u16 *render_sndbuff = sndbuffer[0];
|
||||
uae_u16 *finish_sndbuff = sndbuffer[0] + SNDBUFFER_LEN*2;
|
||||
|
||||
static int have_sound = 0;
|
||||
static int lastfreq;
|
||||
|
||||
static __inline__ void sound_default_evtime(void)
|
||||
extern unsigned int new_beamcon0;
|
||||
|
||||
static __inline__ void sound_default_evtime(int freq)
|
||||
{
|
||||
int pal = beamcon0 & 0x20;
|
||||
int pal = new_beamcon0 & 0x20;
|
||||
|
||||
if (freq < 0)
|
||||
freq = lastfreq;
|
||||
lastfreq = freq;
|
||||
|
||||
#ifndef PANDORA
|
||||
switch(m68k_speed)
|
||||
{
|
||||
|
@ -65,9 +71,9 @@ static __inline__ void sound_default_evtime(void)
|
|||
default: // MAXVPOS_PAL?
|
||||
#endif
|
||||
if (pal)
|
||||
scaled_sample_evtime = (MAXHPOS_PAL*313*VBLANK_HZ_PAL*CYCLE_UNIT)/currprefs.sound_freq;
|
||||
scaled_sample_evtime = (MAXHPOS_PAL * MAXVPOS_PAL * freq * CYCLE_UNIT + currprefs.sound_freq - 1) / currprefs.sound_freq;
|
||||
else
|
||||
scaled_sample_evtime = (MAXHPOS_NTSC*MAXVPOS_NTSC*VBLANK_HZ_NTSC*CYCLE_UNIT)/currprefs.sound_freq + 1;
|
||||
scaled_sample_evtime = (MAXHPOS_NTSC * MAXVPOS_NTSC * freq * CYCLE_UNIT + currprefs.sound_freq - 1) / currprefs.sound_freq;
|
||||
#ifndef PANDORA
|
||||
break;
|
||||
}
|
||||
|
@ -78,6 +84,8 @@ static __inline__ void sound_default_evtime(void)
|
|||
static int sounddev = -1, s_oldrate = 0, s_oldbits = 0, s_oldstereo = 0;
|
||||
static int sound_thread_active = 0, sound_thread_exit = 0;
|
||||
static sem_t sound_sem;
|
||||
static sem_t sound_out_sem;
|
||||
static int output_cnt = 0;
|
||||
|
||||
static void *sound_thread(void *unused)
|
||||
{
|
||||
|
@ -90,21 +98,24 @@ static void *sound_thread(void *unused)
|
|||
while (sem_val > 1)
|
||||
{
|
||||
sem_wait(&sound_sem);
|
||||
cnt++;
|
||||
sem_getvalue(&sound_sem, &sem_val);
|
||||
}
|
||||
|
||||
sem_wait(&sound_sem);
|
||||
if (sound_thread_exit) break;
|
||||
if (sound_thread_exit)
|
||||
break;
|
||||
|
||||
cnt = output_cnt;
|
||||
sem_post(&sound_out_sem);
|
||||
|
||||
if(currprefs.sound_stereo)
|
||||
write(sounddev, sndbuffer[cnt&3], SNDBUFFER_LEN*2);
|
||||
else
|
||||
write(sounddev, sndbuffer[cnt&3], SNDBUFFER_LEN);
|
||||
cnt++;
|
||||
}
|
||||
|
||||
sound_thread_active = 0;
|
||||
sem_post(&sound_out_sem);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -129,6 +140,7 @@ static int pandora_start_sound(int rate, int bits, int stereo)
|
|||
ret = sem_init(&sound_sem, 0, 0);
|
||||
if (ret != 0)
|
||||
write_log("sem_init() failed: %i, errno=%i\n", ret, errno);
|
||||
sem_init(&sound_out_sem, 0, 0);
|
||||
ret = pthread_create(&thr, NULL, sound_thread, NULL);
|
||||
if (ret != 0)
|
||||
write_log("pthread_create() failed: %i\n", ret);
|
||||
|
@ -172,12 +184,14 @@ static int pandora_start_sound(int rate, int bits, int stereo)
|
|||
void pandora_stop_sound(void)
|
||||
{
|
||||
if (sound_thread_exit)
|
||||
printf("don't call gp2x_stop_sound more than once!\n");
|
||||
printf("don't call pandora_stop_sound more than once!\n");
|
||||
if (sound_thread_active)
|
||||
{
|
||||
sound_thread_exit = 1;
|
||||
sem_post(&sound_sem);
|
||||
usleep(100*1000);
|
||||
sem_wait(&sound_out_sem);
|
||||
sem_destroy(&sound_sem);
|
||||
sem_destroy(&sound_out_sem);
|
||||
}
|
||||
|
||||
if (sounddev > 0)
|
||||
|
@ -190,7 +204,9 @@ static int wrcnt = 0;
|
|||
|
||||
void finish_sound_buffer (void)
|
||||
{
|
||||
output_cnt = wrcnt;
|
||||
sem_post(&sound_sem);
|
||||
sem_wait(&sound_out_sem);
|
||||
wrcnt++;
|
||||
sndbufpt = render_sndbuff = sndbuffer[wrcnt&3];
|
||||
if(currprefs.sound_stereo)
|
||||
|
@ -221,7 +237,7 @@ int setup_sound (void)
|
|||
|
||||
void update_sound (int freq)
|
||||
{
|
||||
sound_default_evtime();
|
||||
sound_default_evtime(freq);
|
||||
}
|
||||
|
||||
static int open_sound (void)
|
||||
|
@ -231,8 +247,6 @@ static int open_sound (void)
|
|||
|
||||
init_sound_table16 ();
|
||||
|
||||
sample_handler = currprefs.sound_stereo ? sample16s_handler : sample16_handler;
|
||||
|
||||
have_sound = 1;
|
||||
sound_available = 1;
|
||||
|
||||
|
@ -249,7 +263,7 @@ void close_sound (void)
|
|||
if (!have_sound)
|
||||
return;
|
||||
|
||||
// testing shows that reopenning sound device is not a good idea on gp2x (causes random sound driver crashes)
|
||||
// testing shows that reopenning sound device is not a good idea on pandora (causes random sound driver crashes)
|
||||
// we will close it on real exit instead
|
||||
//pandora_stop_sound();
|
||||
have_sound = 0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Minimalistic sound.c implementation
|
||||
* (c) notaz, 2007
|
||||
* Sdl sound.c implementation
|
||||
* (c) 2015
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -35,7 +35,7 @@ int changed_produce_sound=0;
|
|||
|
||||
#define SOUND_USE_SEMAPHORES
|
||||
#define SOUND_BUFFERS_COUNT 4
|
||||
static uae_u16 sndbuffer[SOUND_BUFFERS_COUNT][(SNDBUFFER_LEN+32)*DEFAULT_SOUND_CHANNELS];
|
||||
uae_u16 sndbuffer[SOUND_BUFFERS_COUNT][(SNDBUFFER_LEN+32)*DEFAULT_SOUND_CHANNELS];
|
||||
unsigned n_callback_sndbuff, n_render_sndbuff;
|
||||
uae_u16 *sndbufpt = sndbuffer[0];
|
||||
uae_u16 *render_sndbuff = sndbuffer[0];
|
||||
|
@ -76,10 +76,18 @@ void restart_sound_buffer(void) { }
|
|||
|
||||
|
||||
static int have_sound = 0;
|
||||
static int lastfreq;
|
||||
|
||||
void sound_default_evtime(void)
|
||||
extern unsigned int new_beamcon0;
|
||||
|
||||
void sound_default_evtime(int freq)
|
||||
{
|
||||
int pal = beamcon0 & 0x20;
|
||||
int pal = new_beamcon0 & 0x20;
|
||||
|
||||
if (freq < 0)
|
||||
freq = lastfreq;
|
||||
lastfreq = freq;
|
||||
|
||||
#if !( defined(PANDORA) || defined(ANDROIDSDL) )
|
||||
switch(m68k_speed)
|
||||
{
|
||||
|
@ -106,10 +114,17 @@ void sound_default_evtime(void)
|
|||
case 1:
|
||||
default: // MAXVPOS_PAL?
|
||||
#endif
|
||||
#if 1
|
||||
if (pal)
|
||||
scaled_sample_evtime = (MAXHPOS_PAL * MAXVPOS_PAL * freq * CYCLE_UNIT + currprefs.sound_freq - 1) / currprefs.sound_freq;
|
||||
else
|
||||
scaled_sample_evtime = (MAXHPOS_NTSC * MAXVPOS_NTSC * freq * CYCLE_UNIT + currprefs.sound_freq - 1) / currprefs.sound_freq;
|
||||
#else
|
||||
if (pal)
|
||||
scaled_sample_evtime=(MAXHPOS_PAL*313*VBLANK_HZ_PAL*CYCLE_UNIT)/currprefs.sound_freq;
|
||||
else
|
||||
scaled_sample_evtime=(MAXHPOS_NTSC*MAXVPOS_NTSC*VBLANK_HZ_NTSC*CYCLE_UNIT)/currprefs.sound_freq + 1;
|
||||
#endif
|
||||
#if !( defined(PANDORA) || defined(ANDROIDSDL) )
|
||||
break;
|
||||
}
|
||||
|
@ -286,7 +301,7 @@ int setup_sound (void)
|
|||
|
||||
void update_sound (int freq)
|
||||
{
|
||||
sound_default_evtime();
|
||||
sound_default_evtime(freq);
|
||||
}
|
||||
|
||||
|
||||
|
@ -302,7 +317,6 @@ static int open_sound (void)
|
|||
|
||||
init_sound_table16 ();
|
||||
|
||||
|
||||
have_sound = 1;
|
||||
sound_available = 1;
|
||||
|
||||
|
@ -326,7 +340,7 @@ void close_sound (void)
|
|||
if (!have_sound)
|
||||
return;
|
||||
|
||||
// testing shows that reopenning sound device is not a good idea on gp2x (causes random sound driver crashes)
|
||||
// testing shows that reopenning sound device is not a good idea (causes random sound driver crashes)
|
||||
// we will close it on real exit instead
|
||||
#ifdef RASPBERRY
|
||||
//pandora_stop_sound();
|
||||
|
|
|
@ -31,12 +31,14 @@ typedef SDL_Thread *uae_thread_id;
|
|||
STATIC_INLINE int uae_start_thread (const char *name, void *(*f) (void *), void *arg, uae_thread_id *foo)
|
||||
{
|
||||
*foo = SDL_CreateThread ((int (*)(void *))f, arg);
|
||||
write_log("uae_start_thread: %s, id=%d\n", name, *foo);
|
||||
return *foo == 0;
|
||||
}
|
||||
|
||||
STATIC_INLINE int uae_start_thread_fast (void *(*f) (void *), void *arg, uae_thread_id *foo)
|
||||
{
|
||||
*foo = SDL_CreateThread ((int (*)(void *))f, arg);
|
||||
write_log("uae_start_thread_fast: arg=0x%08X, id=%d\n", arg, *foo);
|
||||
return *foo == 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ static uaecptr m68k_return_trapaddr;
|
|||
static uaecptr exit_trap_trapaddr;
|
||||
|
||||
/* For IPC between main thread and trap context */
|
||||
static uae_sem_t trap_mutex;
|
||||
static uae_sem_t trap_mutex = 0;
|
||||
static ExtendedTrapContext *current_context;
|
||||
|
||||
|
||||
|
@ -240,6 +240,7 @@ static void *trap_thread (void *arg)
|
|||
/* Good bye, cruel world... */
|
||||
|
||||
/* dummy return value */
|
||||
write_log("trap_thread: exit (arg=0x%08X)\n", arg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -474,5 +475,8 @@ void init_extended_traps (void)
|
|||
exit_trap_trapaddr = here();
|
||||
calltrap (deftrap2 ((TrapHandler)exit_trap_handler, TRAPFLAG_NO_RETVAL, "exit_trap"));
|
||||
|
||||
if(trap_mutex != 0)
|
||||
uae_sem_destroy(&trap_mutex);
|
||||
trap_mutex = 0;
|
||||
uae_sem_init (&trap_mutex, 0, 1);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue