Win32 SDL2 builds on Cygwin against Mingw SDL2 libs, new docs and log cleanup

This commit is contained in:
Dagen Brock 2018-07-17 15:47:44 -05:00
parent 92af077e38
commit 47b837e34c
99 changed files with 366 additions and 548 deletions

View File

@ -2,6 +2,8 @@ stages:
- build
- package
build-ubuntu-x:
tags:
- ubuntu
@ -23,14 +25,14 @@ package-ubuntu-x:
script:
- cp src/config.txt .
- 'echo "# CI_BUILD_ID: $CI_BUILD_ID" >> config.txt'
- cp COPYING.txt doc/
- cp LICENSE.txt doc/
artifacts:
paths:
- gsplusx
- config.txt
- doc/gsplusmanual.txt
- doc/gsplusmanual.pdf
- doc/COPYING.txt
- doc/LICENSE.txt
@ -45,6 +47,9 @@ build-ubuntu-sdl:
- make clean ; make
build-ubuntu-sdl2:
tags:
- ubuntu
@ -67,16 +72,17 @@ package-ubuntu-sdl2:
script:
- cp src/config.txt .
- 'echo "# CI_BUILD_ID: $CI_BUILD_ID" >> config.txt'
- cp COPYING.txt doc/
- cp LICENSE.txt doc/
- mv gsplus-ubuntu-sdl gsplus
artifacts:
paths:
- gsplus
- config.txt
- doc/README.txt
- doc/gsplusmanual.txt
- doc/gsplusmanual.pdf
- doc/COPYING.txt
- doc/LICENSE.txt
build-osx:
@ -130,7 +136,7 @@ package-win32:
script:
- cp src/config.txt .
- 'echo "# CI_BUILD_ID: $CI_BUILD_ID" >> config.txt'
- cp COPYING.txt doc/
- cp LICENSE.txt doc/
- cp /bin/cyggcc_s-1.dll .
- cp /bin/cygstdc++-6.dll .
- cp /bin/cygwin1.dll .
@ -140,74 +146,87 @@ package-win32:
paths:
- gsplus32.exe
- config.txt
- doc/gsplusmanual.txt
- doc/gsplusmanual.pdf
- doc/README.txt
- doc/COPYING.txt
- doc/LICENSE.txt
- cyggcc_s-1.dll
- cygstdc++-6.dll
- cygwin1.dll
- cygfreetype-6.dll
build-win-sdl:
build-win-sdl2:
tags:
- windows
stage: build
script:
- cd src
- ln -s vars_win32_sdl vars
- ln -s vars_win32_sdl2 vars
- make clean
- make
- cp parallel.rom ..
- cp /cygdrive/c/cygwin/bin/cygbz2-1.dll ..
- cp /cygdrive/c/cygwin/bin/cygfreetype-6.dll ..
- cp /cygdrive/c/cygwin/bin/cyggcc_s-1.dll ..
- cp /cygdrive/c/cygwin/bin/cygjpeg-8.dll ..
- cp /cygdrive/c/cygwin/bin/cygpng16-16.dll ..
- cp /cygdrive/c/cygwin/bin/cygjpeg-8.dll ..
- cp /cygdrive/c/cygwin/bin/cygstdc++-6.dll ..
- cp /cygdrive/c/cygwin/bin/cygwin1.dll ..
- cp /cygdrive/c/cygwin/bin/cygz.dll ..
- cp /cygdrive/c/mingw/i686-w64-mingw32/bin/SDL2.dll ..
- cp /cygdrive/c/mingw/i686-w64-mingw32/bin/SDL2_image.dll ..
artifacts:
paths:
- gsplus.exe
- parallel.rom
- cygbz2-1.dll
- cygfreetype-6.dll
- cyggcc_s-1.dll
- cygjpeg-8.dll
- cygpng16-16.dll
- cygjpeg-8.dll
- cygstdc++-6.dll
- cygwin1.dll
- cygz.dll
- SDL2.dll
- SDL2_image.dll
expire_in: 5 minutes
package-win-sdl:
package-win-sdl2:
tags:
- windows
stage: package
script:
- pwd
- ls -al
- cp src/config.txt .
- 'echo "# CI_BUILD_ID: $CI_BUILD_ID" >> config.txt'
- cp COPYING.txt doc/
- cp /bin/cyggcc_s-1.dll .
- cp /bin/cygstdc++-6.dll .
- cp /bin/cygwin1.dll .
- cp /bin/cygfreetype-6.dll .
- cp /bin/cygbz2-1.dll .
- cp /bin/cygpng16-16.dll .
- cp /bin/cygz.dll .
- cp /bin/cygSDL2-2-0-0.dll .
- cp /bin/cygSDL2_image-2-0-0.dll .
- cp /bin/cygjpeg-8.dll .
- cp /bin/cygtiff-6.dll .
- cp /bin/cygjbig-2.dll .
- cp /bin/cyglzma-5.dll .
- cp /bin/cygwebp-5.dll .
- cp /cygdrive/c/mingw/bin/SDL2.dll .
- cp LICENSE.txt doc/
artifacts:
paths:
- gsplus.exe
- config.txt
- doc/gsplusmanual.txt
- doc/gsplusmanual.pdf
- doc/COPYING.txt
- doc/LICENSE.txt
- doc/README.txt
- parallel.rom
- cygbz2-1.dll
- cygfreetype-6.dll
- cyggcc_s-1.dll
- cygjpeg-8.dll
- cygpng16-16.dll
- cygjpeg-8.dll
- cygstdc++-6.dll
- cygwin1.dll
- cygfreetype-6.dll
- cygbz2-1.dll
- cygpng16-16.dll
- cygz.dll
- cygSDL2-2-0-0.dll
- cygSDL2_image-2-0-0.dll
- cygjpeg-8.dll
- cygtiff-6.dll
- cygjbig-2.dll
- cyglzma-5.dll
- cygwebp-5.dll
- SDL2.dll
- SDL2_image.dll

View File

@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>gsplus</string>
<key>CFBundleGetInfoString</key>
<string>0.14s, Copyright 2018 Dagen Brock</string>
<string>0.14, Copyright 2018 Dagen Brock</string>
<key>CFBundleIconFile</key>
<string>gsp-icons.icns</string>
<key>CFBundleIdentifier</key>
@ -20,7 +20,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.12s</string>
<string>0.14</string>
<key>CFBundleSignature</key>
<string>gsplus</string>
<key>CFBundleVersion</key>

BIN
assets/gsback.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

BIN
assets/gsback.psd Normal file

Binary file not shown.

View File

@ -1,30 +1,25 @@
# Mac OSX - SDL2 version
#
# might need to install cli tools if you haven't already.
# This should build a `gsplus` executable and copy it to the project root dir.
# You can run it, though as always you need to supply an Apple IIgs ROM file.
# Have fun, and please note any errors on the issues page of the project.
# Prerequisite: You must install Xcode on your system from the App Store
# Also, install Xcode cli tools.
xcode-select --install
# Install 'brew' if you don't already have it installed.
# Install 'brew'.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# then install dependencies
# Use brew to install dependencies.
brew install sdl2
brew install sdl2_image
brew install freetype
# build
# Build.
git clone git@github.com:digarok/gsplus.git
cd gsplus/src
ln -s vars_osx_sdl2 vars
make clean ; make
#Note that installing freetype via brew will install the library, but I think
# maybe you have to install the source and build it to link it in properly.
# You could use /usr/local/src instead of /tmp
cd /tmp
curl --remote-name --location http://sourceforge.net/projects/freetype/files/freetype2/2.6.2/freetype-2.6.2.tar.gz
tar -xzvf freetype-2.6.2.tar.gz
cd freetype-2.6.2
./configure --prefix=/usr/local/freetype-2.6.2
make
make install
ln -s freetype-2.6.2 /usr/local/freetype

View File

@ -0,0 +1,28 @@
# Win32 - SDL2 version
#
# This should build a `gsplus.exe` executable and copy it to the project root dir.
# You can run it, though as always you need to supply an Apple IIgs ROM file.
# Have fun, and please note any errors on the issues page of the project.
# Prerequisites: You must install Cygwin on your system.
# I install Cygwin with all "Devel" and "Perl" packages.
# I also search for and add any FreeType libs.
# You will not use the Cygwin SDL2/image libraries as they are deprecated.
# Instead you must download the mingw64-w64 libraries and link against those.
wget https://www.libsdl.org/release/SDL2-devel-2.0.8-mingw.tar.gz
tar -xvzf SDL2-devel-2.0.8-mingw.tar.gz
cd SDL2-2.0.8
mkdir /cygdrive/c/mingw
mv i686-w64-mingw32/ /cygdrive/c/mingw/
cd ..
wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.3-mingw.tar.gz
tar -xvzf SDL2_image-devel-2.0.3-mingw.tar.gz
rsync -a SDL2_image-2.0.3/i686-w64-mingw32/ /cygdrive/c/mingw/i686-w64-mingw32/
# Build.
git clone git@github.com:digarok/gsplus.git
cd gsplus/src
ln -s vars_win32_sdl2 vars
make clean ; make

View File

@ -1,6 +1,4 @@
## SOME NOTES ON SETTING UP GITLAB RUNNER TO BUILD ON LINUX/UBUNTU
# Based on: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-repository.md
## STEP 1 - Install Gitlab Runner
sudo apt-get install -y curl

View File

@ -1,5 +1,4 @@
## SOME NOTES ON SETTING UP GITLAB RUNNER TO BUILD ON LINUX/UBUNTU
# Based on: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/osx.md
## STEP 1 - Install Gitlab Runner
sudo curl --output /usr/local/bin/gitlab-ci-multi-runner https://gitlab-ci-multi-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-ci-multi-runner-darwin-amd64
@ -25,12 +24,9 @@ gitlab-ci-multi-runner register -n \
--description "MBP" \
--tag-list "osx"
# maybe also needs
gitlab-ci-multi-runner install
# maybe also needs
gitlab-ci-multi-runner install
# to run correctly
# you can always check with
gitlab-ci-multi-runner status

View File

@ -1,38 +1,16 @@
## SOME NOTES ON SETTING UP GITLAB RUNNER TO BUILD ON WIN32 FOR SDL2 BUILDS
## PREREQUISITE AKA SETTING UP A FRESH VM OR DEV COMPUTER
#
# Install your Win7/Win10 VM
# Install VirtualBox additions in your VM
#
# (optional) add build user
# (optional, but seems to help) add build user
# Make user an admin, give it service privs
# ... Local Security Policy -> Local Policies -> User Rights Assignment -> Log on as a service
#
# install Cygwin
# install Cygwin & SDL2 Libraries according to the steps in the Quickstart doc
# add cygwin bin dir to env path
#
# install git for windows w/ git bash http://git-scm.com/download/win
git config --global user.name "Dagen Brock"
git config --global user.email "dagenbrock@gmail.com"
# (set up your key(s))
# Add your ~/.ssh/id_rsa using git bash (or cygwin) so that
# gitlab runner can check out your project
#
# The project is currently being build in Cygwin.
# I install Cygwin with all "Devel" and "Perl" packages.
# I also search for and add any SDL2 or FreeType libs just in case.
# UPDATE FOR PROPER SDL2 BUILDS ON WINDOWS!!!
# I used to link the libraries that were installed with all this environment,
# but I had problems with it ever having a working driver. Now we download
# the devel libraries for SDL2 and link to them directly.
# Latest is something like: SDL2-devel-2.0.8-mingw.tar.gz
# Unpack that where CI can see it on the builder, our standard is c:\mingw
# So something like:
tar -xvzf SDL2-devel-2.0.8-mingw.tar.gz
cd SDL2-2.0.8
mkdir /cygdrive/c/mingw
mv x86_64-w64-mingw32/* /cygdrive/c/mingw/
## SOME NOTES ON SETTING UP GITLAB RUNNER TO BUILD ON WINDOWS
@ -56,13 +34,11 @@ gitlab-runner-windows-386.exe register -n \
--tag-list "windows"
## STEP 3 - Install Service
# Note the use of ".\IEUser" to indicate local account!
gitlab-ci-multi-runner-windows-386.exe install --user .\IEUser --password Passw0rd!
gitlab-ci-multi-runner-windows-386.exe install --user .\Builder --password Bu1ld3r!
# Note the use of ".\builder" to indicate local account!
gitlab-runner-windows-386.exe install --user .\builder --password builder
## STEP 4 - Start service
gitlab-ci-multi-runner-windows-386.exe start
gitlab-runner-windows-386.exe start
## STEP 4.5 - if you get a "failed due to logon" message above, you may need to grant "logon as a service" privs
#To add the "Log on as a service" right to an account on your local computer

Binary file not shown.

View File

@ -1,191 +0,0 @@
GSplus gsp_icon_512.png
Modern cross-platform Apple IIgs emulator and tools,
based on KEGS & GSPort
________________
Screenshot.png Manual Version:
GSplus 0.14 (config release)
Downloads:
Latest downloads always available at https://apple2.gs/plus
________________
Overview & Purpose
This project is an attempt to build a better Apple IIgs emulator by modernizing the KEGS/GSport emulator family and extending it into a platform for gamers, enthusiasts and developers.
The first steps were a release of a new SDL2 driver. SDL or "Simple DirectMedia Layer" enables the writing of one cross-platform driver to handle input and output (video, mouse, keyboard, audio, joystick). This helps the goal of providing first-class support for all of the major platforms supported by SDL, including Mac OSX, Windows and Linux.
Part of this effort has also led to the development of an automated build and packaging pipeline using Gitlab CI. This helps our team of one continue to develop on primarily a single platform, while still ensuring that it works across many operating systems
Currently, the main supported platforms are Linux, OSX and Windows.
Getting started
1. Download the emulator package from https://apple2.gs/plus and put it in a folder.
2. Download the Apple IIgs Firmware ROMs, for either a ROM01 or ROM03 machine.
(If you have a real IIgs, there are ways to save it from your machine too.)
Try: ftp://ftp.apple.asimov.net/pub/apple_II/emulators/rom_images/
1. Put the ROM image in the same folder where you run the emulator from.
It will search for: "ROM", "ROM.01", "ROM.03"
If your ROM file has some other name, launch gsplus and hit F4 to go to the config menu to choose your ROM under "ROM File Selection"
... or ...
1. Edit your config:
You can manually edit the config.txt file (or use the F4 menu.)
1. You can set disks using a slot/number syntax like:
s5d1 = images/ArkanoidII.po
s6d1 = images/ProDOS_2_4_1.dsk
s7d1 = images/gsos.2mg
2. You can also manually set your ROM path like:
g_cfg_rom_path = ../roms/gsrom03
1. Download some Apple IIgs software.
I recommend the excellent Apple IIgs dedicated site:
http://www.whatisthe2gs.apple2.org.za/
If you have a real IIgs, you can transfer your disks using ADTPro
http://adtpro.sourceforge.net/
2. Boot the Apple IIgs by running the emulator
Windows: gsplus32.exe
Mac*/Ubuntu: ./gsplus
* Yes, you can drag it into your Applications folder on a Mac, but be aware that it is still meant to be launched from a command line. If you put it in Applications, you should be able to run it with the terminal command:
/Applications/GSplus.app/Contents/MacOS/gsplus
If the config file cant be found, it will try to create a config.txt file for you, with all of the defaults.
1. Note: You can also specify a config file. This is very useful as you can have specific disks/setting pre-set in a config file and launch directly into your favorite game with that config. They can be named anything you want, though the officially recognized extensions are .txt and .gsp.
Examples:
Windows: gsplus32.exe -config arkanoid.gsp
Mac/Ubuntu: ./gsplus -config choplifter_config.txt
________________
Emulator Hot-Keys
There are several keys used to interact with the emulator while it is running. Heres a quick list of the main hot-keys and what they do.
F4 - configuration menu - set lots of options here!
F5 - paste from host OS into emulator
F6 - toggle system speed (1, 2.8, 8, ∞ MHz )
F7 - toggle fast disk emulation
F9 - invert paddles
F10 - toggle a2vid_palette (?)
F11 - toggle fullscreen mode *
F12 - hit RESET (e.g. - to do “Ctrl-Reset” on an Apple II, you hit “Ctrl-F12”)
Shift-F5 - take a screenshot *
Shift-F10 - toggle status line *
Shift-F11 - toggle simulated scanlines *
* not available on all platforms
Other Input/Output
1. Mouse and keyboard should automatically work
2. Joystick with SDL2 driver is known to be working. It simply uses the “first” joystick and the first analog pad on that stick plus the first two buttons. The axes and buttons are not yet configurable. Better info forthcoming.
3. There are drivers for serial controller, ImageWriter (II?) printer, and networking. I may have broken some of this functionality to get builds working. Im not currently familiar with the state of these drivers or their usage. More info will be added as I take time to research more of the modules.
4. You can also drag-and-drop disk images onto the emulator window and it will try to automount the disk! (SDL versions)
Configuration Menu
Configuration options are loaded from, and saved to, a configuration text file. The default configuration file is config.txt. If you are just starting out, its recommended to use the configuration menu versus editing the file yourself.
Enter the configuration menu at any time while running GSplus by hitting <F4>.
Screen Shot 2016-05-01 at 9.10.00 AM.png
Most important options are:
Disk Configuration menu - options to “mount” and “eject” disks images
ROM File Selection menu - if you dont have it correctly pointing to a valid ROM 1 or ROM 3 image, it will not boot
________________
Command-line Options
This is from source, some are experimental and not all may be built on your system.
-badrd Halt on bad reads
-noignbadacc Dont ignore bad memory accesses
-noignhalt Dont ignore code red halts
-joystick Ignore joystick option
-bw Force B/W hires modes
-dhr140 Use simple double-hires color map
-fullscreen Attempt to start emulator in fullscreen
-mem value Set memory size to value
-skip value Set skip_amt to value
-audio value Set audio enable to value
-arate value Set preferred audio rate to value
-enet value Set ethernet to value
-config value Set config file to value
-debugport value Set debugport to value
-ssdir value Set screenshot save directory to value
-scanline value Enable scanline simulator at value %
-x value Open emulator window at x value
-y value Open emulator window at y value
-v value Set verbose flags to value
Note: The final argument, if not a flag, will be tried as a mountable device.
________________
Debugger Commands - BROKEN!!!
Sorry, the debugger is currently broken due to a change in debugging frameworks.
The documentation below is accurate, but does not currently work.
Enter from the debugger prompt (Shift-F6)
GSplus CLI Debugger help (courtesy Fredric Devernay)
General command syntax: [bank]/[address][command]
e.g. 'e1/0010B' to set a breakpoint at the interrupt jump pt
Enter all addresses using lower-case. As with the IIgs monitor, you can omit the bank number after having set it: 'e1/0010B' followed by '14B' will set breakpoints at e1/0010 and e1/0014
g Go
[bank]/[addr]g Go from [bank]/[address]
s Step one instruction
[bank]/[addr]s Step one instr at [bank]/[address]
[bank]/[addr]B Set breakpoint at [bank]/[address]
B Show all breakpoints
[bank]/[addr]D Delete breakpoint at [bank]/[address]
[bank]/[addr1].[addr2] View memory
[bank]/[addr]L Disassemble memory
P Dump the trace to 'pc_log_out'
Z Dump SCC state
I Dump IWM state
[drive].[track]I Dump IWM state
E Dump Ensoniq state
[osc]E Dump oscillator [osc] state
R Dump dtime array and events
T Show toolbox log
[bank]/[addr]T Dump tools using ptr [bank]/[addr] as 'tool_set_info'
[mode]V XOR verbose with 1=DISK, 2=IRQ,4=CLK,8=SHADOW,10=IWM,20=DOC,
40=ABD,80=SCC, 100=TEST, 200=VIDEO
[mode]H XOR halt_on with 1=SCAN_INT,2=IRQ, 4=SHADOW_REG, 8=C70D_WRITES
r Reset
[0/1]=m Changes m bit for l listings
[0/1]=x Changes x bit for l listings
[t]=z Stops at absolute time t (obsolete)
S show_bankptr_bank0 & smartport errs
P show_pmhz
A show_a2_line_stuff show_adb_log
Ctrl-e Dump registers
[bank]/[addr1].[addr2]us[file] Save mem area to [file]
[bank]/[addr1].[addr2]ul[file] Load mem area from [file]
v Show video information
q Exit Debugger (and GSplus)
________________
Project Info
Homepage and Downloads
This project has a homepage at http://apple2.gs/plus/
The homepage hosts the latest build for a variety of OSes.
Development Repository
Main page and full source code repository: https://github.com/digarok/gsplus
Release Changelog
Version 0.13 - Jan. 22 2017
Scanline simulator
Drag-and-drop disk images and it will try to automount
Fixes and improvements to logging
Win32 icon parity with other versions
Experimental host FST support
Various bug fixes
Version 0.12s - Nov. 12, 2016
First official alpha release with packages
“S” in version is because it introduces new Socket Debugger, large effort
Version 0.11 - 2015 - 2016
Not publicly released
Features first major contribution - SDL2 driver supporting displays, sound and joysticks
________________
Credits & Thanks
Thanks to Kent Dickey who originally wrote the open source KEGS, “Kents Emulated GS”
Thanks to the GSPort developers which is the fork used to create GSplus.
Thanks to the other GSplus contributors, especially Kelvin Sherlock who has added quite a few of the latest features.

View File

@ -1,6 +1,7 @@
DEXTRAS=gsplus-osx/
DDIR=gsplus-osx/GSplus.app
DDIR=$DEXTRAS/GSplus.app
ADIR=assets
mkdir -p $DEXTRAS/license
mkdir -p $DDIR/Contents/MacOS
mkdir -p $DDIR/Contents/Resources
@ -12,8 +13,8 @@ dylibbundler -od -b -x $DDIR/Contents/MacOS/gsplus -d $DDIR/Contents/libs/
# files to include in dmg
cp doc/gsplusmanual.pdf $DEXTRAS
cp doc/gsplusmanual.txt $DEXTRAS
cp doc/README.txt $DEXTRAS
cp COPYING.txt $DEXTRAS
cp LICENSE.txt $DEXTRAS/license
cp COPYRIGHT.txt $DEXTRAS/license
# packaging now in DMG script

View File

@ -6,17 +6,16 @@ test -f GSplus-Install.dmg && rm GSplus-Install.dmg
./create-dmg \
--volname "GSplus" \
--volicon "../assets/gsp-dmg-icons.icns" \
--background "../assets/gsp_dmg_bg_600x500.png" \
--background "../assets/gsback.png" \
--window-pos 200 120 \
--window-size 600 500 \
--icon-size 100 \
--icon GSplus.app 180 130 \
--window-size 710 600 \
--icon-size 64 \
--icon GSplus.app 250 210 \
--hide-extension GSplus.app \
--app-drop-link 410 130 \
--icon README.txt 105 330 \
--icon gsplusmanual.pdf 225 330 \
--icon gsplusmanual.txt 365 330 \
--icon COPYING.txt 495 330 \
--app-drop-link 440 210 \
--icon README.txt 225 350 \
--icon gsplusmanual.pdf 350 350 \
--icon license 470 350 \
GSplus-Install.dmg \
../gsplus-osx/
cp GSplus-Install.dmg ..

View File

@ -69,16 +69,8 @@ gsplus32.exe: $(OBJECTS) compile_time.o
# Mingw32 / Cygwin builds: The SDL version (builds, but non-functioning)
gsplus.exe: $(OBJECTS) compile_time.o
#g++ $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(EXTRA_LIBS) -lwinmm -lgdi32 -ldsound -lcomctl32 -lws2_32 -lshell32
g++ $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(EXTRA_LIBS) -lSDLmain -mwindows
#mkdir -p ../GSplus.app/lib
#cp -f gsplus.exe ../GSplus.app/GSplus.exe
#cp -f ../config.template ../GSplus.app/config.txt
#cp -f ../lib/*.ttf ../GSplus.app/lib
#cp -f ../lib/arch/win32/*.dll ../GSplus.app
#cp -f ../lib/NoBoot.po ../GSplus.app
#cp -f GSplus.bat ../GSplus.app/GSplus.bat
#cp -f parallel.rom ../GSplus.app
#cp -f ../COPYING.txt ../GSplus.app
#g++ $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(EXTRA_LIBS) -mwindows
g++ $(CCOPTS) $(LDOPTS) $(OBJECTS) compile_time.o $(LDFLAGS) -o $(NAME)$(SUFFIX) $(EXTRA_LIBS) -lwinmm -lgdi32 -ldsound -lcomctl32 -lws2_32 -lshell32
cp gsplus.exe ..
# NOT CURRENTLY SUPPORTED

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* adb_mode bit 3 and bit 2 (faster repeats for arrows and space/del) not done*/
@ -1452,7 +1452,7 @@ adb_key_event(int a2code, int is_up)
/* ESC pressed, see if ctrl & cmd key down */
if(CTRL_DOWN && CMD_DOWN) {
/* Desk mgr int */
printf("Desk mgr int!\n");
glog("Desk mgr int!");
g_adb_interrupt_byte |= 0x20;
adb_add_data_int();
@ -1491,7 +1491,7 @@ adb_key_event(int a2code, int is_up)
special = (ascii >> 8) & 0xff;
if(ascii < 0) {
printf("ascii1: %d, a2code: %02x, pos: %d\n", ascii,a2code,pos);
glogf("ascii1: %d, a2code: %02x, pos: %d", ascii,a2code,pos);
ascii = 0;
special = 0;
}

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/*

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include <os2.h>

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "../../defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
int g_preferred_rate = 48000;

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/** This module implements AARP, a necessary protocol for ELAP communication. **/

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
struct at_addr_t;

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
typedef byte at_node_t;

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/** This module is the "heart" of the bridge and provides the connection between the ELAP and LLAP ports. **/

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/**

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/** This module implements the ELAP port of the bridge. **/

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/** ELAP port of the AppleTalk Bridge **/

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* Ethernet addresses are 6 bytes */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/** This module implements the LLAP port of the bridge. **/

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
struct packet_t;

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include <stdbool.h>

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/*

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/** This module implements queues for storing and transferring packets within the bridge. **/

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
struct packet_t

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
char g_compile_time[] = "Compiled: " __DATE__ " " __TIME__ ;

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"
@ -195,7 +195,7 @@ extern Cfg_menu g_cfg_main_menu[];
#define KNMP(a) &a, #a, 0
// This first menu is not a menu, but a list of config options that are
// This first menu is not a menu, but a list of config options that are
// represented here so they will be parsed correctly out of the config files.
Cfg_menu g_cfg_uiless_menu[] = {
{ "", KNMP(g_audio_enable), CFGTYPE_INT },
@ -647,11 +647,10 @@ cfg_text_screen_dump()
int i, j;
filename = "gsplus.screen.dump";
glogf("Writing text screen to the file %s\n", filename);
glogf("Writing text screen to the file %s", filename);
ofile = fopen(filename, "w");
if(ofile == 0) {
fatal_printf("Could not write to file %s, (%d)\n", filename,
errno);
fatal_printf("Could not write to file %s, (%d)\n", filename, errno);
return;
}
@ -819,7 +818,7 @@ config_parse_option(char *buf, int pos, int len, int line)
*strptr = gsplus_malloc_str(&buf[pos]);
break;
default:
glogf("Config file variable %s is unknown type: %d\n", nameptr, type);
glogf("Config file variable %s is unknown type: %d", nameptr, type);
}
}
@ -968,7 +967,7 @@ config_load_roms()
"read %d bytes\n", &g_cfg_tmp_path[0], errno, len, ret);
continue;
}
glogf("Read: %d bytes of ROM in slot %d from file %s.\n", ret, i, &g_cfg_tmp_path[0]);
glogf("Read: %d bytes of ROM in slot %d from file %s.", ret, i, &g_cfg_tmp_path[0]);
fclose(file);
}
}
@ -2844,14 +2843,14 @@ Optionally boot from that slot.
if (slot > 0)
{
insert_disk(slot,0,filename,0,0,0,-1);
printf("Inserted disk in slot %d, drive 1. Filename: %s\n", slot, filename);
glogf("Inserted disk in slot %d, drive 1. Filename: %s", slot, filename);
if (should_boot) {
g_temp_boot_slot = slot;
printf("That slot has been set to boot.\n");
glog("That slot has been set to boot.");
}
}
else
printf("Unable to determine appropriate place to insert file %s.\n",filename);
glogf("Unable to determine appropriate place to insert file %s.",filename);
}
int
@ -2871,28 +2870,25 @@ Guess the image size. Return values:
rc = stat(filename, &stat_buf);
if(rc < 0)
{
printf("Can't get statistics on file %s; errno: %d\n",
filename, errno);
glogf("Can't get statistics on file %s; errno: %d", filename, errno);
rc = -1;
} else {
len = stat_buf.st_size;
printf("Found file %s, size %d; guessing ",
filename, len);
if (len < 140 * 1024) {
/* Not enough for a 140k image */
printf("small ProDOS image.\n");
glogf("Found file %s, size %d; guessing small ProDOS image.", filename, len);
rc = 0;
} else if (len < 140 * 1024 + 256 + 1) {
/* Reasonable size for 140k image, maybe in 2mg format */
printf("a 5-1/4\" image.\n");
glogf("Found file %s, size %d; guessing a 5-1/4\" image.", filename, len);
rc = 1;
} else if (len < 800 * 1024 + 256 + 1) {
/* Reasonable size for 800k image, maybe in 2mg format */
printf("a 3-1/2\" image.\n");
glogf("Found file %s, size %d; guessing a 3-1/2\" image.", filename, len);
rc = 2;
} else {
/* Let's pretend it's an HDV image */
printf("a hard drive image.\n");
glogf("Found file %s, size %d; guessing a hard drive image.", filename, len);
rc = 3;
}
}
@ -3104,7 +3100,7 @@ cfg_file_update_ptr(char *str)
}
*g_cfg_file_strptr = newstr;
if(g_cfg_file_strptr == &(g_cfg_rom_path)) {
printf("Updated ROM file\n");
glog("Updated ROM file");
load_roms_init_memory();
}
g_config_gsplus_update_needed = 1;
@ -3143,8 +3139,7 @@ cfg_file_selected(int select_dir)
(int)stat_buf.st_mode);
#endif
if(ret != 0) {
printf("stat %s returned %d, errno: %d\n", &g_cfg_file_path[0],
ret, errno);
glogf("stat %s returned %d, errno: %d", &g_cfg_file_path[0], ret, errno);
} else {
if(fmt == S_IFDIR && !select_dir) {
/* it's a directory */
@ -3228,7 +3223,6 @@ cfg_file_handle_key(int key)
}
break;
case 0x0d: /* return */
//glog("Selected disk image file");
cfg_file_selected(0);
break;
case 0x09: /* tab */
@ -3237,7 +3231,6 @@ cfg_file_handle_key(int key)
case 0x08: /* left arrow */
case 0x7f: /* delete key */
if(g_cfg_file_pathfield) {
// printf("left arrow/delete\n");
len = strlen(&g_cfg_file_curpath[0]) - 1;
if(len >= 0) {
g_cfg_file_curpath[len] = 0;
@ -3248,13 +3241,10 @@ cfg_file_handle_key(int key)
cfg_file_selected(g_cfg_file_dir_only);
break;
default:
glogf("Unhandled config key: 0x%02x\n", key);
glogf("Unhandled config key: 0x%02x", key);
}
#if 0
printf("curent: %d, topent: %d, last: %d\n",
g_cfg_dirlist.curent, g_cfg_dirlist.topent, g_cfg_dirlist.last);
#endif
}
void
config_control_panel()
{
@ -3281,7 +3271,6 @@ config_control_panel()
(0xf << BIT_ALL_STAT_TEXT_COLOR) | ALL_STAT_ALTCHARSET;
g_a2_new_all_stat[0] = g_cur_a2_stat;
g_new_a2_stat_cur_line = 0;
//cfg_printf("In config_control_panel\n");
for(i = 0; i < 20; i++) {
// Toss any queued-up keypresses
if(adb_read_c000() & 0x80) {
@ -3482,7 +3471,7 @@ config_control_panel()
}
break;
default:
glogf("Unhandled config key: 0x%02x\n", key);
glogf("Unhandled config key: 0x%02x", key);
}
} else if(key >= 0) {
cfg_file_handle_key(key);

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#define CONF_BUF_LEN 1024

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defcomm.h"
@ -63,7 +63,7 @@ void U_STACK_TRACE();
# include <libc.h>
#endif
#if !defined(_WIN32) && !defined (__OS2__) && !defined(UNDER_CE) // OG
#if !defined(_WIN32) && !defined(UNDER_CE) // OG
# include <unistd.h>
# include <sys/ioctl.h>
# include <sys/wait.h>

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#define SHIFT_PER_CHANGE 3

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defcomm.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#ifdef ASM

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include <stdio.h>
@ -654,7 +654,7 @@ read_line(char *buf, int len)
{
int space_left;
int ret;
#if !defined(_WIN32) && !defined (__OS2__)
#if !defined(_WIN32)
int flags, flags_save;
/* Unix */
@ -675,7 +675,6 @@ read_line(char *buf, int len)
while(space_left > 0) {
#ifdef _WIN32
ret = win_nonblock_read_stdin(0, buf, 1);
#elif defined(__OS2__)
#else
/* Unix */
ret = read(0, buf, 1);
@ -701,7 +700,7 @@ read_line(char *buf, int len)
}
buf = &buf[ret];
}
#if !defined(_WIN32) && !defined (__OS2__)
#if !defined(_WIN32)
(void)fcntl(0, F_SETFL, flags_save);
#endif
@ -780,7 +779,6 @@ dis_do_compare()
void
do_debug_unix()
{
#ifndef __OS2__
char localbuf[LINE_SIZE];
word32 offset, len;
int fd, ret;
@ -855,7 +853,6 @@ do_debug_unix()
printf("errno: %d\n", errno);
}
a1 = a1 + ret;
#endif
}
void

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
enum {

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
.code

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/*

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* char 0x00 (raw 0x40) */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
inst00_SYM /* brk */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
// Various ASCII codepage to unicode maps

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"
@ -263,7 +263,7 @@ iwm_flush_disk_to_unix(Disk *dsk)
return;
}
glogf("Writing disk %s to Unix\n", dsk->name_ptr);
glogf("Writing disk %s to Unix", dsk->name_ptr);
dsk->disk_dirty = 0;
num_dirty = 0;
@ -273,7 +273,7 @@ iwm_flush_disk_to_unix(Disk *dsk)
ret = disk_track_to_unix(dsk, j, &(buffer[0]));
if(ret != 1 && ret != 0) {
glogf("iwm_flush_disk_to_unix ret: %d, cannot write image to unix\n", ret);
glogf("iwm_flush_disk_to_unix ret: %d, cannot write image to unix", ret);
halt_printf("Adjusting image not to write through!\n");
dsk->write_through_to_unix = 0;
break;
@ -306,13 +306,12 @@ iwm_flush_disk_to_unix(Disk *dsk)
ret = fwrite(&(buffer[0]), 1, unix_len, dsk->file);
if(ret != unix_len) {
glogf("fwrite: %08x, errno:%d, qtrk: %02x, disk: %s\n", ret, errno, j, dsk->name_ptr);
glogf("fwrite: %08x, errno:%d, qtrk: %02x, disk: %s", ret, errno, j, dsk->name_ptr);
}
}
if(num_dirty == 0) {
halt_printf("Drive %s was dirty, but no track was dirty!\n",
dsk->name_ptr);
halt_printf("Drive %s was dirty, but no track was dirty!", dsk->name_ptr);
}
}
@ -333,7 +332,7 @@ iwm_vbl_update(int doit_3_persec)
if(iwm.motor_on && iwm.motor_off) {
if((word32)iwm.motor_off_vbl_count <= g_vbl_count) {
glogf("Disk timer expired, drive off: %08x\n", g_vbl_count);
glogf("Disk timer expired, drive off: %08x", g_vbl_count);
iwm.motor_on = 0;
iwm.motor_off = 0;
if (g_temp_boot_slot != 254) {
@ -381,16 +380,16 @@ iwm_vbl_update(int doit_3_persec)
void
iwm_show_stats()
{
glogf("IWM stats: q7,q6: %d, %d, reset,enable2: %d,%d, mode: %02x\n",
glogf("IWM stats: q7,q6: %d, %d, reset,enable2: %d,%d, mode: %02x",
iwm.q7, iwm.q6, iwm.reset, iwm.enable2, iwm.iwm_mode);
glogf("motor: %d,%d, motor35:%d drive: %d, c031:%02x phs: %d %d %d %d\n",
glogf("motor: %d,%d, motor35:%d drive: %d, c031:%02x phs: %d %d %d %d",
iwm.motor_on, iwm.motor_off, g_iwm_motor_on,
iwm.drive_select, g_c031_disk35,
iwm.iwm_phase[0], iwm.iwm_phase[1], iwm.iwm_phase[2],
iwm.iwm_phase[3]);
glogf("iwm.drive525[0].file: %p, [1].file: %p\n",
glogf("iwm.drive525[0].file: %p, [1].file: %p",
iwm.drive525[0].file, iwm.drive525[1].file);
glogf("iwm.drive525[0].last_phase: %d, [1].last_phase: %d\n",
glogf("iwm.drive525[0].last_phase: %d, [1].last_phase: %d",
iwm.drive525[0].last_phase, iwm.drive525[1].last_phase);
}
@ -579,7 +578,7 @@ iwm525_phase_change(int drive, int phase)
qtr_track = 0;
}
if(qtr_track > 4*34) {
glogf("Disk arm moved past track 34, moving it back\n");
glogf("Disk arm moved past track 34, moving it back");
qtr_track = 4*34;
}

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#define MAX_TRACKS (2*80)

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
int

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#ifdef ACTIVEIPHONE

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#ifdef ACTIVEIPHONE

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,13 +2,13 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"
#ifdef HAVE_TFE
#include "tfe/protos_tfe.h"
#include "tfe/protos_tfe.h"
#endif
extern char const g_gsplus_version_str[];
@ -134,21 +134,21 @@ Emustate_word32list g_emustate_word32list[] = {
//#ifdef _WINDOWS
// OG Added Transwarp ROM
// OG Added Transwarp ROM
#define TRANSWARP
int transwarp_low_val = 0;
#ifdef _WIN32
#ifdef _WIN32
__declspec(align(256))
#endif
unsigned char transwarpcode[][32]
#if !defined(_WIN32) && !defined(__OS2__)
#if !defined(_WIN32)
__attribute__ ((aligned(256)))
#endif
={
{
/*0xBCFF00*/ 'T','W','G','S',0,0,0,0,0,0,0,0,0,0,0,0,
/*0xBCFF10*/ 0x5C,0x40,0xFF,0xBC, // JMP GetMaxSpeed
/*0xBCFF14*/ 0x5C,0x60,0xFF,0xBC, // JMP GetNumISpeed
/*0xBCFF10*/ 0x5C,0x40,0xFF,0xBC, // JMP GetMaxSpeed
/*0xBCFF14*/ 0x5C,0x60,0xFF,0xBC, // JMP GetNumISpeed
/*0xBCFF18*/ 0x6B,0x00,0x00,0x00, // ???
/*0xBCFF1C*/ 0x6B,0x00,0x00,0x00 // ???
},
@ -160,7 +160,7 @@ __attribute__ ((aligned(256)))
/*0xBCFF30*/ 0x6B,0x00,0x00,0x00, // ???
/*0xBCFF34*/ 0x6B,0x00,0x00,0x00, // ???
/*0xBCFF38*/ 0x6B,0x00,0x00,0x00, // ???
/*0xBCFF3C*/ 0x6B,0x00,0x00,0x00 // GetTWConfig
/*0xBCFF3C*/ 0x6B,0x00,0x00,0x00 // GetTWConfig
},
{
/* 0xBCFF40*/ // GetMaxSpeed
@ -291,7 +291,7 @@ fixup_bank0_2000_4000()
} else if((g_c035_shadow_reg & 0x02) == 0) {
mem0wr += BANK_SHADOW;
}
} else {
if(RAMRD) {
mem0rd += 0x10000;
@ -406,13 +406,13 @@ fixup_intcx()
}
}
for(j = 0xc8; j < 0xd0; j++) {
/*c800 - cfff */
if(((g_c02d_int_crom & (1 << 3)) == 0) || INTCX)
{
if(((g_c02d_int_crom & (1 << 3)) == 0) || INTCX)
{
rom_inc = rom10000 + (j << 8);
}
else
else
{
rom_inc = rom10000 + (j << 8);
@ -436,7 +436,7 @@ fixup_wrdefram(int new_wrdefram)
byte *mem0wr;
byte *wrptr;
int j;
g_c08x_wrdefram = new_wrdefram;
if(g_c035_shadow_reg & 0x40) {
@ -1070,7 +1070,7 @@ setup_pageinfo()
word32 mem_size_pages;
/* first, set all of memory to point to itself */
mem_size_pages = g_mem_size_total >> 8;
mem0rd = &(g_memory_ptr[0]);
fixup_any_bank_any_page(0, mem_size_pages, mem0rd, mem0rd);
@ -2054,7 +2054,7 @@ io_write(word32 loc, int val, double *cyc_ptr)
if((val & 0xe6) != 0) {
halt_printf("write c041: %02x\n", val);
}
if (val & C041_EN_MOUSE)
{
// Enable Mega II mouse
@ -2470,7 +2470,7 @@ get_slow_mem(word32 loc, int duff_cycles)
int val;
loc = loc & 0x1ffff;
if((loc &0xf000) == 0xc000) {
return(io_read(loc &0xfff, duff_cycles));
}

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#ifdef ASM

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/*

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
// Various ASCII codepage to unicode maps

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
typedef struct l2byte_st L2byte;

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* to_pro.c */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* xdriver.c and macdriver.c and windriver.c */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* END_HDR */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
void show_simple_alert(char *str1, char *str2, char *str3, int num);

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* END_HDR */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
// $KmKId: protos_windriver.h,v 1.4 2004-03-23 17:27:26-05 kentd Exp $

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* END_HDR */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include <ctype.h>

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* This is an interface between the SCC emulation and the Virtual Imagewriter. */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* This is an interface between the SCC emulation and the LAP bridge. */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
void scc_llap_init();

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* This file contains the Mac serial calls */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* This file contains the socket calls */
@ -70,7 +70,7 @@ scc_socket_close_handle(SOCKET sockfd)
{
if (sockfd != -1)
{
#if defined(_WIN32) || defined (__OS2__)
#if defined(_WIN32)
return closesocket(sockfd); // NW: a Windows socket handle is not a file descriptor
#else
return close(sockfd);
@ -225,12 +225,10 @@ scc_socket_open_outgoing(int port, double dcycs)
sa_in.sin_port = htons(port_number);
hostentptr = gethostbyname((const char*)&scc_ptr->modem_cmd_str[0]); // OG Added Cast
if(hostentptr == 0) {
#if defined(_WIN32) || defined (__OS2__)
fatal_printf("Lookup host %s failed\n",
&scc_ptr->modem_cmd_str[0]);
#if defined(_WIN32)
fatal_printf("Lookup host %s failed\n", &scc_ptr->modem_cmd_str[0]);
#else
fatal_printf("Lookup host %s failed, herrno: %d\n",
&scc_ptr->modem_cmd_str[0], h_errno);
fatal_printf("Lookup host %s failed, herrno: %d\n", &scc_ptr->modem_cmd_str[0], h_errno);
#endif
scc_socket_close_handle(sockfd);
scc_socket_close(port, 1, dcycs);
@ -270,7 +268,7 @@ scc_socket_make_nonblock(int port, double dcycs)
Scc *scc_ptr;
SOCKET sockfd;
int ret;
#if defined(_WIN32) || defined (__OS2__)
#if defined(_WIN32)
u_long flags;
#else
int flags;
@ -279,7 +277,7 @@ scc_socket_make_nonblock(int port, double dcycs)
scc_ptr = &(scc_stat[port]);
sockfd = scc_ptr->sockfd;
#if defined(_WIN32) || defined (__OS2__)
#if defined(_WIN32)
flags = 1;
ret = ioctlsocket(sockfd, FIONBIO, &flags);
if(ret != 0) {
@ -388,7 +386,7 @@ scc_accept_socket(int port, double dcycs)
flags = 0;
ret = 0;
#if !defined(_WIN32) && !defined(__OS2__)
#if !defined(_WIN32)
/* For Linux, we need to set O_NONBLOCK on the rdwrfd */
flags = fcntl(rdwrfd, F_GETFL, 0);
if(flags == -1) {
@ -681,7 +679,7 @@ void
scc_socket_empty_writebuf(int port, double dcycs)
{
#ifdef SCC_SOCKETS
# if !defined(_WIN32) && !defined(__OS2__)
# if !defined(_WIN32)
struct sigaction newact, oldact;
# endif
Scc *scc_ptr;
@ -767,7 +765,7 @@ scc_socket_empty_writebuf(int port, double dcycs)
scc_ptr->out_char_dcycs = dcycs;
}
#if defined(_WIN32) || defined (__OS2__)
#if defined(_WIN32)
ret = send(rdwrfd, (const char*)&(scc_ptr->out_buf[rdptr]), len, 0); // OG Added Cast
# else
/* ignore SIGPIPE around writes to the socket, so we */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* This file contains the Win32 COM1/COM2 calls */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
// @todo: mouse clip bugs.. great western shootout. Paint 8/16. still in win32
@ -286,7 +286,8 @@ void dev_video_init_sdl() {
// Create an application window with the following settings:
char window_title[32];
sprintf(window_title, "GSplus v%-6s", g_gsplus_version_str);
int startx,starty = SDL_WINDOWPOS_UNDEFINED;
int startx = SDL_WINDOWPOS_UNDEFINED;
int starty = SDL_WINDOWPOS_UNDEFINED;
if (g_startx != WINDOWPOS_UNDEFINED) { startx = g_startx; }
if (g_starty != WINDOWPOS_UNDEFINED) { starty = g_starty; }
int more_flags = 0;
@ -303,7 +304,7 @@ void dev_video_init_sdl() {
if (g_resizeable) {
more_flags |= SDL_WINDOW_RESIZABLE;
}
window = SDL_CreateWindow(
window_title, // window title (GSport vX.X)
@ -315,7 +316,7 @@ void dev_video_init_sdl() {
SDL_WINDOW_OPENGL // flags - see below
| more_flags
);
// Check that the window was successfully created
if (window == NULL) {
@ -369,7 +370,7 @@ void dev_video_init_sdl() {
dstrect.w = BASE_WINDOW_WIDTH;
dstrect.h = X_A2_WINDOW_HEIGHT;
int pitch = BASE_WINDOW_WIDTH;
// UPDATE A RECT OF THE APPLE II SCREEN TEXTURE
SDL_UpdateTexture(overlay_texture, &dstrect, overlay_pixels, pitch*sizeof(Uint32) );

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "SDL.h"
@ -24,6 +24,10 @@ static /* volatile */ int snd_read = 0;
static int g_sound_paused;
static int g_zeroes_buffered;
static int g_zeroes_seen;
// newer SDL allows you to specify devices. for now, we use what it gives us,
// but this can be made configurable in the future
SDL_AudioDeviceID dev = 0;
void sdlsnd_init(word32 *shmaddr)
{
@ -48,7 +52,7 @@ sound_write_sdl(int real_samps, int size)
if (real_samps) {
shm_read = (g_sound_shm_pos - size + SOUND_SHM_SAMP_SIZE)%SOUND_SHM_SAMP_SIZE;
SDL_LockAudio();
SDL_LockAudioDevice(dev);
while(size > 0) {
if(g_playbuf_buffered >= snd_buf) {
printf("sound_write_sdl failed @%d, %d buffered, %d samples skipped\n",snd_write,g_playbuf_buffered, size);
@ -70,17 +74,17 @@ sound_write_sdl(int real_samps, int size)
assert((snd_buf+snd_write - snd_read)%snd_buf == g_playbuf_buffered%snd_buf);
assert(g_sound_shm_pos == shm_read);
SDL_UnlockAudio();
SDL_UnlockAudioDevice(dev);
}
if(g_sound_paused && (g_playbuf_buffered > 0)) {
glogf("Unpausing sound, %d buffered",g_playbuf_buffered);
g_sound_paused = 0;
SDL_PauseAudio(0);
SDL_PauseAudioDevice(dev, 0);
}
if(!g_sound_paused && (g_playbuf_buffered <= 0)) {
glog("Pausing sound");
g_sound_paused = 1;
SDL_PauseAudio(1);
SDL_PauseAudioDevice(dev, 1);
}
#endif
}
@ -124,9 +128,8 @@ sound_init_device_sdl()
long rate;
SDL_AudioSpec wanted;
//if(SDL_InitSubSystem(SDL_INIT_AUDIO)) {
if (SDL_Init(SDL_INIT_AUDIO) < 0) {
fprintf(stderr, "sdl: Couldn't init SDL_Audio: %s!\n", SDL_GetError());
if (SDL_Init(SDL_INIT_AUDIO) < 0) {
glogf("SDL2 Couldn't init SDL_INIT_AUDIO: %s!", SDL_GetError());
return 0;
}
@ -139,23 +142,28 @@ sound_init_device_sdl()
wanted.userdata = NULL;
/* Open audio, and get the real spec */
if(SDL_OpenAudio(&wanted, &spec) < 0) {
fprintf(stderr, "sdl: Couldn't open audio: %s!\n", SDL_GetError());
SDL_QuitSubSystem(SDL_INIT_AUDIO);
return 0;
dev = SDL_OpenAudioDevice(NULL, 0, &wanted, &spec, 0);
if (dev == 0) {
glogf("SDL2 Couldn't open audio: %s!", SDL_GetError());
SDL_QuitSubSystem(SDL_INIT_AUDIO);
return 0;
} else {
glogf("SDL2 opened audio device: %d", dev);
}
/* Check everything */
if(spec.channels != wanted.channels) {
fprintf(stderr, "sdl: Couldn't get stereo audio format!\n");
goto snd_error;
glogf("SDL2 Warning, couldn't get stereo audio format!");
//goto snd_error;
}
if(spec.format != wanted.format) {
fprintf(stderr, "sdl: Couldn't get a supported audio format!\n");
fprintf(stderr, "sdl: wanted %X, got %X\n",wanted.format,spec.format);
goto snd_error;
glog("SDL2 Warning, couldn't get a supported audio format!");
glogf("SDL2 wanted %X, got %X",wanted.format,spec.format);
//goto snd_error;
}
if(spec.freq != wanted.freq) {
fprintf(stderr, "sdl: wanted rate = %d, got rate = %d\n", wanted.freq, spec.freq);
glogf("SDL2 wanted rate = %d, got rate = %d", wanted.freq, spec.freq);
}
/* Set things as they really are */
rate = spec.freq;
@ -176,14 +184,14 @@ sound_init_device_sdl()
g_zeroes_seen = 0;
/* Let's start playing sound */
g_sound_paused = 0;
SDL_PauseAudio(0);
SDL_PauseAudioDevice(dev, 0);
set_audio_rate(rate);
return rate;
snd_error:
/* Oops! Something bad happened, cleanup. */
SDL_CloseAudio();
SDL_CloseAudioDevice(dev);
SDL_QuitSubSystem(SDL_INIT_AUDIO);
if(playbuf)
free((void*)playbuf);
@ -199,20 +207,9 @@ void
sound_shutdown_sdl()
{
#ifdef HAVE_SDL
SDL_CloseAudio();
SDL_CloseAudioDevice(dev);
if(playbuf)
free((void*)playbuf);
playbuf = 0;
#endif
}
void
sound_shutdown2()
{
sound_shutdown_sdl();
if (g_sound_shm_addr)
{
free(g_sound_shm_addr);
g_sound_shm_addr=NULL;
}
}

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include <assert.h>

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include <math.h>
@ -39,17 +39,17 @@ int g_accept_events = 0; // OG To know if the emulator is ready to accept extern
char g_argv0_path[256] = "./";
const char *g_gsplus_default_paths[] = { // probably overkill on the paths
"",
"./",
"",
"./",
"${HOME}/",
"${PWD}/",
"${HOME}/Library/GSplus/",
"/usr/local/lib/",
"/usr/lib/gsplus/",
"/usr/local/gsplus/",
"/usr/local/lib/gsplus/",
"/usr/lib/gsplus/",
"/usr/local/gsplus/",
"/usr/local/lib/gsplus/",
"/usr/share/gsplus/",
"/var/lib/",
"/var/lib/",
"${0}/",
0 };
@ -165,7 +165,7 @@ int g_imagewriter_paper = 0;
int g_imagewriter_banner = 0;
int g_config_iwm_vbl_count = 0;
const char g_gsplus_version_str[] = "0.14"; // skunkworks
const char g_gsplus_version_str[] = "0.14rc";
int g_pause=0; // OG Added pause
#define START_DCYCS (0.0)
@ -898,21 +898,21 @@ int gsplusmain(int argc, char **argv) {
int i;
char *final_arg = 0;
// just for fun
banner();
// OG Restoring globals
sim65816_initglobals();
moremem_init();
tmp1 = parse_cli_options(argc, argv);
// initialize ss dir to default value (current path)
strcpy(g_config_gsplus_screenshot_dir, "./");
check_engine_asm_defines();
@ -1196,11 +1196,11 @@ void setup_gsplus_file(char *outname, int maxlen, int ok_if_missing, int can_cre
// However, GSplus is promoting a notion of Config-as-a-VM
// where we want to encourage many configs. (See DGB video
// on YT regarding the GSVision UI experiment.)
glogf("Trying to create config (%s)", "${HOME}/.config.gsp");
gsport_expand_path(&(local_path[0]), "${HOME}/.config.gsp", 250);
strcpy(outname, &(local_path[0]));
// Ask user if it's OK to create the file (or just create it)
x_dialog_create_gsport_conf(*name_ptr);
@ -2605,7 +2605,6 @@ void
must_write(int fd, char *bufptr, int len)
{
int ret;
#ifndef __OS2__
while(len > 0) {
ret = write(fd, bufptr, len);
if(ret >= 0) {
@ -2615,9 +2614,6 @@ must_write(int fd, char *bufptr, int len)
return; // just get out
}
}
#else
printf("%s\n",bufptr);
#endif
}
void

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
.word inst00_SYM+1 /* brk */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,10 +2,10 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined (__OS2__)
#if !defined(_WIN32) && !defined(__CYGWIN__)
# include <sys/ipc.h>
# include <sys/shm.h>
#endif

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/* This file is included by video.c */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
/*tfe.c*/

View File

@ -39,7 +39,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#ifdef WIN32
#ifdef WIN32
#include <windows.h>
#include <windowsx.h>
#include <commctrl.h>
@ -82,10 +82,8 @@ void *lib_malloc(size_t size)
void *ptr = malloc(size);
#endif
#ifndef __OS2__
if (ptr == NULL && size > 0)
exit(-1);
#endif
#ifdef LIB_DEBUG
lib_debug_alloc(ptr, size, 3);
#endif
@ -123,10 +121,8 @@ void *lib_realloc(void *ptr, size_t size)
void *new_ptr = realloc(ptr, size);
#endif
#ifndef __OS2__
if (new_ptr == NULL)
exit(-1);
#endif
#ifdef LIB_DEBUG
lib_debug_free(ptr, 1, 0);
lib_debug_alloc(new_ptr, size, 1);
@ -182,7 +178,6 @@ unsigned long crc32_buf(const char *buffer, unsigned int len)
crc = 0xffffffff;
for (p = buffer; len > 0; ++p, --len)
crc = (crc >> 8) ^ crc32_table[(crc ^ *p) & 0xff];
return ~crc;
}

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

21
src/vars_win32_sdl2 Normal file
View File

@ -0,0 +1,21 @@
TARGET = gsplus.exe
NAME = gsplus
MINGW_HOME = /cygdrive/c/mingw/i686-w64-mingw32
FSTOBJ = win32_host_fst.o
OBJECTS = sdl2_driver.o $(OBJECTS1) $(FSTOBJ) sdl2snd_driver.o
CCOPTS = -O3 -DGSPLUS_LITTLE_ENDIAN -DHAVE_SDL -DWIN_SDL -DTOGGLE_STATUS -I$(MINGW_HOME)/include/SDL2 -DWINSDL_BORDERHACK
CPPOPTS = -O3 -DGSPLUS_LITTLE_ENDIAN -DHAVE_SDL -DWIN_SDL -DTOGGLE_STATUS -I/usr/include/freetype2 -I$(MINGW_HOME)/include/SDL2
SUFFIX = ".exe"
# working in cygwin
EXTRA_LIBS = -lcygwin -lSDL2main -lSDL2 -lfreetype -lcomdlg32 -lShlwapi -lIPHlpApi -lpthread -lSDL2_image -L$(MINGW_HOME)/lib/
EXTRA_LIBS = -lcygwin -lSDL2main -lSDL2 -lfreetype -lcomdlg32 -lShlwapi -lIPHlpApi -lpthread -lSDL2_image -L$(MINGW_HOME)/lib/ -Larch/win32 -lshell32
#XOPTS = -Wall -fomit-frame-pointer -march=i686
XLIBS =

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include <time.h>
@ -576,7 +576,7 @@ video_reset()
stat |= ALL_STAT_COLOR_C021;
}
if(g_config_control_panel) {
/* Don't update cur_a2_stat when in configuration panel */
/* Don't update cur_a2_stat when in configuration panel */
g_save_cur_a2_stat = stat;
} else {
g_cur_a2_stat = stat;
@ -596,7 +596,7 @@ int g_screen_redraw_skip_amt = -1;
word32 g_cycs_in_check_input = 0;
int g_needfullrefreshfornextframe = 1 ;
int g_needfullrefreshfornextframe = 1 ;
void video_update()
{
@ -644,8 +644,8 @@ void video_update()
g_vid_update_last_line = 0;
video_update_through_line(0);
}
// OG Notify host that video has been uodated
#if defined(ACTIVEGSPLUGIN) && defined(MAC)
{
@ -1642,7 +1642,7 @@ redraw_changed_gr(int start_offset, int start_line, int num_lines, int reparse,
(eff_line > end_line)) {
continue;
}
img_ptr[0] = val0_wd + palette_add;
img_ptr[1] = val0_wd + palette_add;
img_ptr[2] = val0_wd + palette_add;
@ -3202,7 +3202,7 @@ video_push_lines(Kimage *kimage_ptr, int start_line, int end_line, int left_pix,
int center = 0; // OG added variable to center screen
//OG add null pointer check when emulator is restarted
if (!kimage_ptr)
if (!kimage_ptr)
{
printf("warning : video_push_lines(kimage_ptr=null)\n");
return ;
@ -3235,7 +3235,7 @@ video_push_lines(Kimage *kimage_ptr, int start_line, int end_line, int left_pix,
center=EFF_BORDER_WIDTH - BORDER_WIDTH;
// OG shifting image to the center
x_push_kimage(kimage_ptr, g_video_act_margin_left + left_pix + center,
x_push_kimage(kimage_ptr, g_video_act_margin_left + left_pix + center,
g_video_act_margin_top + srcy, left_pix, srcy,
(right_pix - left_pix), 2*(end_line - start_line));
}
@ -3300,7 +3300,7 @@ video_push_border_sides()
/* redraw left sides */
// OG Left side can alos be "jagged" as a2 screen is now being centered
//video_push_border_sides_lines(0, 0, BORDER_WIDTH, 0, 200);
prev_line = -1;
@ -3365,10 +3365,20 @@ video_push_border_special()
dest_x = 0;
src_x = BASE_MARGIN_LEFT - g_video_act_margin_left;
/*
glogf("width: %d", kimage_ptr->width_act);
for (int i = 600; i< 700; i++) {
kimage_ptr->data_ptr[i*4] = 0xFF;
kimage_ptr->data_ptr[i*4+1] = 0xFF;
kimage_ptr->data_ptr[i*4+2] = 0x00;
}
*/
if(width > 0 && height > 0) {
x_push_kimage(kimage_ptr, dest_x, dest_y, src_x, src_y,
width, height);
#ifdef WINSDL_BORDERHACK
x_push_kimage(kimage_ptr, dest_x+72, dest_y, src_x, src_y, width, height);
#endif
x_push_kimage(kimage_ptr, dest_x, dest_y, src_x, src_y, width, height);
// glogf("X:%d Y: %d SX:%d SY:%D W:%d H:%d\n",dest_x, dest_y, src_x, src_y, width, height);
}
// Then fix top border: dest_x from 0 to 640+LEFT+RIGHT and
@ -3379,8 +3389,10 @@ video_push_border_special()
dest_y = 0;
src_y = BASE_MARGIN_BOTTOM;
if(width > 0 && height > 0) {
x_push_kimage(kimage_ptr, dest_x, dest_y, src_x, src_y,
width, height);
#ifdef WINSDL_BORDERHACK
x_push_kimage(kimage_ptr, dest_x+72, dest_y, src_x, src_y, width, height);
#endif
x_push_kimage(kimage_ptr, dest_x, dest_y, src_x, src_y, width, height);
}
}
@ -3418,21 +3430,21 @@ video_push_kimages()
if (x_calc_ratio(ratiox,ratioy))
{
line = 0;
line = 0;
while (1)
{
start = line;
cur_kim = g_a2_line_kimage[line];
while(line < 200 && g_a2_line_kimage[line] == cur_kim) line++;
cur_kim = g_a2_line_kimage[line];
while(line < 200 && g_a2_line_kimage[line] == cur_kim) line++;
if (cur_kim == &g_kimage_superhires)
right = 640;
else
right = 560;
video_push_lines(cur_kim, start, line,0,right);
if (line==200) break;
}
}
else
{

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#include "defc.h"

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#define WIN32_LEAN_AND_MEAN /* Tell windows we want less header gunk */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
#define WIN32_LEAN_AND_MEAN /* Tell windows we want less header gunk */

View File

@ -2,7 +2,7 @@
GSPLUS - Advanced Apple IIGS Emulator Environment
Based on the KEGS emulator written by Kent Dickey
See COPYRIGHT.txt for Copyright information
See COPYING.txt for license (GPL v2)
See LICENSE.txt for license (GPL v2)
*/
# if !defined(__CYGWIN__) && !defined(__POWERPC__)