git @ Cat's Eye Technologies linapple / cd9a349
Merge pull request #1 from iKarith/master Incorporate 2b version changes David Baucum authored 3 years ago GitHub committed 3 years ago
10 changed file(s) with 66 addition(s) and 139 deletion(s). Raw diff Collapse all Expand all
0 For LinApple version 2b has been made:
1 !! Fixed gcc version 4.8.4 <unistd.h> includes
2 !! Some cleanup on Makefile, INSTALL, README and some others
3
04 For LinApple version 2.0 has been made:
1
25 !! Fixed screen corruption bug for x64 systems
3
46 !! Fixed gcc 4.4 compilation error lacking <strings>
5
67 ++ FTP support. You can load disk images on Slots 6 (1 & 2) and Hard disks images, using FTP server such as apple.asimov.net
78 Press Alt+F3, Alt+Shift+F3 for load disk image through FTP
8
99 ++ Screen sizes are now flexible. You can set any screen size you wish, just be catious - not all screen sizes can work in full screen mode
10
1110 ++ .zip images support for FDD 140K (in read-only mode). Just first file in .zip archive will be read and inserted as an image.
1211 You can load .zip images directly from your file system (by F3/F4 keypress), or from FTP server (by pressing ALT+F3(F4)).
13
1412 -- Sound is still glitched. Needs repairing. Please help!
1513
16
1714 For LinApple version 1.1 has been added:
18
1915 ++ 1. Opening of compressed .gz files - in read-only mode. Works only for FDD 140Kb drives.
20
2116 ++ 2. Super quick load-save states (CTRL+0..9 - quick load state, CTRL+SHIFT+0..9 - quick save it) in current states directory.
22
2317 ++ 3. Add Mockingboard (but not Phasor??) support, without speech, as I could take it.
2418 But Mockingboard works! You may test it in such games as Berzap! (you need to switch Mockingboard on after pressing Ctrl+C in the game), in Willy Byte in the Digital Dimensions, in Pitfall II(tm), in UltimaIV and few others.
25
2619 ++ 4. VideoBenchmark added! Run `linapple -b' to see benchmark running and its result in console.
27
2820 ++ 5. Parallel Printer file name can be set in linapple.conf (default was Printer.txt in working directory)
0 Linapple - crossplatfom emulator of Apple][ (Apple2, Apple 2) series computer for Linux or other OSes with SDL support.
1
0 Linapple - crossplatfom emulator of Apple ][ (Apple2, Apple 2e) series computer for Linux or other OSes with SDL support.
21
32 [INSTALL]
43
5 You need SDL, cURL, zlib and libzip:
4 You need SDL, cURL, zlib and libzip libraries development versions with -dev or -devel suffixes.
65
76 For Debian/Ubuntu their names are:
8
97 libsdl1.2-dev - Simple Direct Media crossplatform library for video,audio, events etc.
108 libcurl4 - openssl-dev - cURL net functions
119 zlib1g-dev - access .gz files
1412 All these libraries are available for free around the world.
1513
1614 For example for Debian/Ubuntu to install:
17
18 $sudo apt-get install libsdl1.2-dev libcurl4-openssl-dev zlib1g-dev libzip-dev
19
15 $ sudo apt-get install libsdl1.2-dev libcurl4-openssl-dev zlib1g-dev libzip-dev
2016
2117 After being SDL, zlib, cURL and libzip installed you will be able to compile linapple from sources:
2218
2319 Untar the package (in .bz2 format):
24
25 $ tar xjf linapple-src_2a.tar.bz2
26
20 $ tar xjf linapple_src-2b.tar.bz2
2721
2822 Then go to src directory and compile.
29
30 $ cd linapple-src_2a/src
31
23 $ cd linapple_src-2b/src
3224 $ make
3325
34 If there was no errors, you may install it if you wish:
35
26 If there are no errors, you may install it if you wish:
3627 $ sudo make install
3728
38 It will be install in /usr/local/linapple folder, whre you can find linapple.conf file for changing some linapple settings,
39 and empty `images` and `ftp` folders, where Apple 2 images files and downloaded through FTP images are meant to be in.
29 It will be installed in /usr/local/linapple folder, whre you can find linapple.conf file for changing some linapple settings,
30 and empty `images` and `ftp` folders, where Apple 2 images files and downloaded through FTP cached images are meant to be in.
4031
41 But of course you are free to choose any directories of your choice.
42 Note: you should read/write permissions of these folders, or linapple could not work properly.
32 Of course you are free to choose any directories of your choice changing it in Makefile in src directory.
33 Note: you should read/write permissions for these folders, or linapple could not work properly.
4334
44 For linaaple ability to unpack .zip and .gz files on the fly (either from local disks or from FTP) you also need read/write access for linapple working
45 folder (which by default is /usr/local/linapple), for linapple unpacks these files as drive0.dsk and drive1.dsk for drive 1 and 2 respectively.
35 For linaaple ability to unpack .zip and .gz files on the fly (either from local disks or from FTP) you also need read/write access for linapple working folder (which by default is /usr/local/linapple), for linapple unpacks these files as drive0.dsk and drive1.dsk for drive 1 and 2 respectively.
4636
47
48 OK.
49 If you installed it, you are able to run emulator from any place, just run it like this:
50
37 OK. If you installed it, you are able to run emulator from any place, just run it like this:
5138 $ linapple
5239
53
5440 If you have chosen not to install it, go to the upper directory then and run the beast:
55
5641 $ cd ..
57
5842 $ ./linapple
59
6043
6144 If all files are on their places, you should see an X-Window with splash screen.
6245 Press F2 (or F3 before to choose some disk image in drive 1), and go to work.
6447 Note: linapple needs some files in its current working directory for proper working.
6548
6649 These files are:
67
6850 splash.bmp - splash screen
6951 charset40.bmp - charset for Apple][ (Apple 2e, etc.) text modes.
7052 font.bmp - font for Help screen and Disk Select screens.
7153 icon.bmp - nice icon, logo of Apple][ computer.
7254 linapple.conf - configuration file.
73 Master.dsk - disk image with Applesoft(tm) DOS 3.3 inside. See Apple license (on apple.com) for details.
55 Master.dsk - disk image with Applesoft(tm) DOS 3.3 inside. See Apple license (on apple.com) for details.
7456
75 Essentials are font.bmp and charset40.bmp, others can be omitted peacefully.
57 Essential are font.bmp and charset40.bmp, others can be omitted peacefully.
7658
77 P.S. You may play with some options in Makefile in src directory, if you know what you are to do. :)
59 P.S. You may play with some options in Makefile in src directory, if you know what you want to do.
7860
7961 Note: See README file for more detailed instructions on using linapple.
80
8162
8263 [UNINSTALL]
8364
8465 To uninstall previously installed linapple (by `sudo make install` command) you may write this:
85
8666 $ sudo make uninstall
8767
8868 This will remove by default entire `/usr/local/linapple` folder and `/usr/local/bin/linapple` script.
8969
90
9170 Also there is possible command for cleaning compiled binaries in src directory:
92
9371 $ make clean
9472
9573 Note: `linapple` executable in upper directory will remain intact.
9674
97
98
9975 [CONTACT]
10076
101 I will be glad to see your comments, suggestions and so on on my email: beotiger@gmail.com
77 I will be glad to see your comments, suggestions and so on on my email beotiger@gmail.com
10278
10379 Sincerely Yours,
104 Krez beom beotiger, December 2007 AD - March 2012 AD
105
106 beotiger@mail.ru
107 beotiger@gmail.com
80 beotiger, December 2007 AD - March 2012 AD - June 2015
81 http://beotiger.com beotiger@gmail.com
10882
10983 Let Apple 2 live forever!
110
0 *** LINAPPLE 2.0***
0 *** LINAPPLE 2b***
11
22 [INTRO]
33 What is linapple?
44 It is an emulator of Apple2 (Apple][, Apple 2, Apple 2e etc.) computer series for Linux or other OSes with SDL support.
5 (SDL means Simple Direct Media Layer written by Sam Lantinga and others).
56
6 (SDL means Simple DirectMedia Layer written by Sam Lantinga and others).
7
8 linapple works out of the box, just make it once and run whenever you wish.
7 Linapple works out of the box, just make it once and run whenever you wish.
98
109 Why not AppleLin? Yes, at first I think to call it such, but later linapple seemed better to me. And one point!
11
1210 This is my work for making it possible to have comprehensive emulator of Apple][ computer series in Linux.
13
1411 The original source is from AppleWin (http://applewin.berlios.de) by Tom Charlesworth and others.
15
1612 I just adapted it for: video+audio for SDL, other functions for POSIX compliant OS, which Linux is in particularly.
17
1813 Later some sort of Windows support had been added, so you may try to compile it under Windows.
19
20
2114
2215 [INSTALL]
2316
2417 I will show brief instructions for compiling and installing linapple here.
25
2618 Please, see INSTALL file for comprehensive installing tips.
27
28 After SDL1.2, zlib, libcurl and libzip are installed in your system, you can build sources.
19 After SDL1.2, zlib, libcurl and libzip (development versions with -dev or -devel suffixes) are installed in your system, you can build sources.
2920
3021 Unpack downloaded linapple archive and go to src directory:
31
3222 $ cd src
3323
3424 Then run:
35
3625 $ make
3726
3827 or
39
4028 $ sudo make install
4129
4230 If there is no errors, run:
43
4431 $ linapple
4532
4633 or without being installed:
47
4834 $ cd ..
4935 $ ./linapple
5036
5642 Where to install? Anywhere you feel fit, just let linapple be with some files it needs for comprehenceive working.
5743
5844 These files are:
59
6045 splash.bmp - splash screen
6146 charset40.bmp - charset for Apple][ (Apple 2e, etc.) text modes.
6247 font.bmp - font for Help screen and Disk Select screens.
6449 linapple.conf - configuration file.
6550 Master.dsk - disk image with Applesoft(tm) DOS 3.3 inside. See Apple license (on apple.com) for details.
6651
67
6852 [USING LINAPPLE]
6953
70 At first start you should see some nice splashscreen. Press F2 to start emualtion. Master.dsk should load, and you will see an DOS3.3(tm) prompt. By pressing F3 you may select an image file name (usually having extensions .dsk, .do, .po) into Slot 6 Drive 1. After selecting it, you either may reboot anew (by pressing F2 key) and try to boot from the inserted disk, or type any DOS3.3(tm) commands to view disk contents and to run any program located in it. Common DOS commands are `CATALOG' (like `ls' in Linux), `BRUN FILENAME' - running any binary (B) program, or `RUN FILENAME' - running any Basic program (A or I). Usually, most game images have alternative way to run programs in them. You may find a lot of disk images on largest and oldest ftp for Apple][ stuff ftp.apple.asimov.net.
54 At first start you should see some nice splashscreen. Press F2 to start emualtion. Master.dsk should load, and you will see an DOS3.3(tm) prompt. By pressing F3 you may select an image file name (usually having extensions .dsk, .do, .po) into Slot 6 Drive 1. After selecting it, you either can reboot anew (by pressing F2 key) and try to boot from the inserted disk, or type any DOS3.3(tm) commands to view disk contents and to run any program located in it. Common DOS commands are `CATALOG' (like `ls' in Linux), `BRUN FILENAME' - running any binary (B) program, or `RUN FILENAME' - running any Basic program (A or I). Usually, most game images have alternative way to run programs in them.
7155
72 From version 2 of linapple you are able to download such images directly from FTP! Use Alt+F3 or Alt+F4 for charging drive 1 and drive 2 for slot 6 (if you know what I am about :) ) - they are just common disk sources of Apple 2 computer for reading/writing its files, such as system, games, utilities and so on.
56 You may find a lot of disk images on may be the largest and the oldest ftp archive for various Apple ][ stuff - ftp.apple.asimov.net
57
58 From version 2 of linapple you are able to download such images directly from FTP! Use Alt+F3 or Alt+F4 for charging drive 1 and drive 2 for slot 6 (if you know what I am about :) ) - they are just common disk sources of Apple 2 computer for reading/writing its files, such as system, games, utilities and so on. Change `FTP Local Dir` parameter in linnaple. conf file to point to some writable directory and make directory named `cache` inside it (install routine does it for you).
7359
7460 To quit emualtor peacefully, press F10. F6 toggles fullscreen mode, Scroll Lock toggles fullspeed mode.
7561
116102 $ ./linapple -b - run VideoBenchmark and exit emulator. Note: if fullscreen mode is on in linapple.conf, then
117103 VideoBenchmark will be runned in fullscreen mode.
118104
119
120
121105 In version 2 besides FTP support there is also support for changable Window sizes (see at the end of linapple.conf file for details).
122106 Just be aware when you are not running emulator on its native mode (560x384) you can suffer slowdown if you are using old box.
123
124
125107
126108 [SUPPORT]
127109 Wanted:
128110
129 -- we need to get rid of some SOUND glitches. HELP!
111 -- We need to get rid of some SOUND glitches. HELP!
130112
131113 --DEBUGGER
132114 I just owe at 9300 lines of code of AppleWin debugger. Michael Pohoreski, you are he-man, I tell you.
133115 Besides Debugger.cpp alone, there are some helper files such as Debugger_Assembler.cpp,
134116 Debugger_Console.cpp, Debugger_Display.cpp and so on. Who is able to port it to linapple?
135
136117
137118 --PHASOR
138119 Who knows how does that great thing work? Please, help adopting it to lianpple.
140121 SDL Audio used. Speakers are working out in Speaker.cpp. Who may think, heh?
141122 From version 1.1 Mockingboard support are done.
142123
143
144
145124 More testing and debugging needed, of course. I would be grateful for any comment or suggestion regarding linapple, and using it on OSes other than Linux.
146125
126 [CONTACTS]
127 I am beotiger, you may contact me at your will by my email beotiger@gmail.com
147128
148 [CONTACTS]
149 I am Krez beom beotiger (Kbb), you may contact me at your will by my email beotiger@gmail.com or beotiger@mail.ru
150
151 Web-site: http://linapple.sourceforge.net
152
129 Web-sites:
130 http://beotiger.com
131 http://linapple.sourceforge.net
153132
154133 Thank you very much.
155134 Long Live Linux!
157136
158137 --
159138 24 March 2012 AD
160 beotiger@mail.ru
161
139 26 June 2015 AD
167167 #
168168 # Default: your home directory (if not set)
169169
170 Slot 6 Directory =
170 Slot 6 Directory = /home/justy/Asimov.NET/action/bubble_bobble
171171
172172 # You may also provide images to be inserted in 1 and 2 drive (D1 or D2) of Slot 6 at startup
173173 # Default: do not use, starting with image named Master.dsk in current directory
174174
175175 # To get access to the disk in second drive(D2), use something like '] CATALOG,D2' at Applesoft DOS(tm) prompt.
176176
177 Disk Image 1 =
177 Disk Image 1 = /home/justy/Asimov.NET/action/bubble_bobble/bubble_bobble2.dsk.gz
178178 Disk Image 2 =
179179
180180 # The next parameter defines if you wish to auto-load these disk images in drives at startup!
225225 # !!! Warning: FTP Local Dir should be existing directory with write access either FTP won't work
226226 # Note : FTP Server MUST end with '/' sign either it won't work! FTP Local Dir should not end with '/'
227227
228 FTP Server = ftp://ftp.apple.asimov.net/pub/apple_II/images/games/
228 FTP Server = ftp://ftp.apple.asimov.net/pub/apple_II/images/games/action/
229229 FTP ServerHDD = ftp://ftp.apple.asimov.net/pub/apple_II/images/
230230 FTP UserPass = anonymous:my-mail@mail.com
231 FTP Local Dir =
231 FTP Local Dir =
232232
233233 ##########################################################################
234234 #
00 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11 # !! Note 1: this configuration file is for installed linapple
2
32 # !! If you have edited Makefile (in src directory of linaple package)
43 # !! to change INSTDIR - path where lianpple are to be installed
54 # !! you should consider change some paths for disk images and FTP local directory
65 # !! in order to let linapple find proper way to access needed stuff
76
8
9 # !! Good luck to You! (beotiger: beotiger@mail.ru)
10
11
127 # Note 2: Default install directory (for *nix) is /usr/local/linapple/
138 # (defined in Make file in src directory as INSTDIR variable)
149
15
1610 #
1711 # linapple.conf - config file used by LinApple, Apple][ (Apple2, Apple 2) emulator for Linux and other systems with SDL support
1812 #
2115
2216 # Remember - all lines beginning with '#' are considered comments.
2317 # All values are CASE SENSITIVE, you should not use, for example, 'joystick 0' instead of 'Joystick 0'.
24 #
25
2618
2719 ####################################################################
2820 # First of all let us determine our machine type
264256
265257 # Screen factor = 1.5
266258
267
268259 # Note: if you want to use Screen Width and Screen Height directly, comment out `Screen factor` whole option
269260 # otherwise they won't take effect
270261 # Default Screen Width is 560, Screen Height is 384
271262
272 # Screen Width = 800
273 # Screen Height = 600
274
263 Screen Width = 800
264 Screen Height = 600
3535 // define time when cache ftp dir.listing must be refreshed
3636 #define RENEW_TIME 24*3600
3737
38 char *
39 md5str (const char *input); // forward declaration of md5str func
40
41 TCHAR g_sFTPDirListing[512] = TEXT("/cache/ftp."); // name for FTP-directory listing
38 char * md5str (const char *input); // forward declaration of md5str func
39
40 TCHAR g_sFTPDirListing[512] = TEXT("cache/ftp."); // name for FTP-directory listing
4241 ////////////////////////////////////////////////////////////////////////////////////////
4342 int getstatFTP(struct ftpparse *fp, int * size)
4443 {
113112 font_print_centered(sx/2 ,5 * facy , ftp_dir, screen, 1.5 * facx, 1.3 * facy);
114113 if(ch) ftp_dir[NORMAL_LENGTH] = ch; //restore cut-off char
115114
116 font_print_centered(sx/2,20 * facy,"Connecting to FTP server... Please wait.", screen, 1 * facx, 1 * facy);
115 font_print_centered(sx/2,20 * facy, "Connecting to FTP server... Please wait.", screen, 1 * facx, 1 * facy);
117116 SDL_Flip(screen); // show the screen
118117
119118 bool OKI;
122121 OKI = false; // use this file
123122 }
124123 else {
125 OKI = ftp_get(ftp_dir,ftpdirpath); // get ftp dir listing
124 OKI = ftp_get(ftp_dir, ftpdirpath); // get ftp dir listing
126125 }
127126 #else
128127 // in WIN32 let's use constant caching? -- need to be redone using file.mtime
2727
2828 /* Adaptation for SDL and POSIX (l) by beom beotiger, Nov-Dec 2007 */
2929
30 /* And KREZ */
31
30 // for usleep
31 #include <unistd.h>
3232 #include "stdafx.h"
3333 //#pragma hdrstop
3434 #include "MouseInterface.h"
00 CXX ?= c++
11 CXXFLAGS ?= -O3
2 CXXFLAGS += -Wall
2 CXXFLAGS += -w
33
44 OBJS := $(filter-out Applewin.cpp Util_MemoryTextFile.cpp,$(wildcard *.cpp))
55 OBJS := $(OBJS:.cpp=.o)
2222 STARTUP = /usr/local/bin/$(EXE)
2323 DATA = ../charset40.bmp ../font.bmp ../icon.bmp ../splash.bmp ../Master.dsk ../linapple.installed.conf
2424
25 #all: ../linapple
25 .PHONY: all clean install uninstall
26
2627 all: $(EXE)
2728
2829 Applewin: $(OBJS)
3132 # $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
3233 mv $^ $@
3334 strip $@
34 @echo " o If there are no errors, $(EXE) compiled succesfully"
35 @echo " o $(EXE) compiled succesfully"
3536 cp $@ ../
36
37 # static binary: (DOES NOT WORK)
38 #static: $(OBJS)
39 # $(CC) -static $^ -o $@ `sdl-config --static-libs` -ldl -lz
40 # strip static
41 # mv static ../$(EXE)-static
4237
4338 clean:
4439 rm -f $(EXE) *.o
4540
46 .PHONY: all clean
47
41 #
4842 # Installation routines
43 #
4944
5045 install: all
5146 @echo " o Creating install directory '$(INSTDIR)'"
5247 mkdir "$(INSTDIR)"
53 chmod 777 "$(INSTDIR)"
5448 @echo " o Creating additional directories 'images' and 'ftp' in '$(INSTDIR)'"
5549 mkdir "$(INSTDIR)/images"
5650 mkdir -p "$(INSTDIR)/ftp/cache"
6054
6155 @echo " o Preparing configuration file 'linapple.conf'"
6256 mv "$(INSTDIR)/linapple.installed.conf" "$(INSTDIR)/linapple.conf"
63 chmod 777 -R "$(INSTDIR)/"
64
65 @echo " o Configuring access permissions for 'ftp' and 'images' directories"
66 chmod 777 "$(INSTDIR)/images"
67 chmod 777 "$(INSTDIR)/ftp"
68 chmod 777 "$(INSTDIR)/ftp/cache"
57 chmod -R 777 "$(INSTDIR)/"
6958
7059 @echo " o Creating startup script $(STARTUP)"
7160 echo "cd \"$(INSTDIR)\"; ./$(EXE); cd -" >"$(STARTUP)"
7261 chmod 755 "$(STARTUP)"
7362
7463 @echo ""
75 @echo "Type '$(EXE)' (no quotes) to start the beast!"
64 @echo "Type $(EXE) to start the beast!"
7665 @echo "To change some settings edit \"$(INSTDIR)/linapple.conf\""
7766
7867 uninstall:
8069 rm -rf "$(INSTDIR)"
8170 @echo " o Removing startup script $(STARTUP)"
8271 rm -f "$(STARTUP)"
83 @echo " o All done!"
84
72 @echo " o All done! Linapple has been successfully removed from your system"
3838 //
3939
4040 /* Adaptation for SDL and POSIX (l) by beom beotiger, Nov-Dec 2007 */
41
42 // for read() and write()
43 #include <unistd.h>
4144
4245 #include "stdafx.h"
4346 //#pragma hdrstop
2828 /* Adaption for Linux+SDL done by beom beotiger. Peace! LLL */
2929
3030 // Timers like functions for Windows and Posix
31
32 // for usleep()
33 #include <unistd.h>
34
3135 #include "stdafx.h"
3236 #include "Timer.h"
3337