git @ Cat's Eye Technologies linapple / f3d4551
Merge pull request #5 from iKarith/catseye Merged in linapple creator's version 2b Chris Pressey authored 3 years ago GitHub committed 3 years ago
9 changed file(s) with 58 addition(s) and 130 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
2727
2828 =====================================================================
2929
30 *** LINAPPLE 2.0***
30 *** LINAPPLE 2b***
3131
3232 [INTRO]
3333 What is linapple?
3434 It is an emulator of Apple2 (Apple][, Apple 2, Apple 2e etc.) computer series for Linux or other OSes with SDL support.
35 (SDL means Simple Direct Media Layer written by Sam Lantinga and others).
3536
36 (SDL means Simple DirectMedia Layer written by Sam Lantinga and others).
37
38 linapple works out of the box, just make it once and run whenever you wish.
37 Linapple works out of the box, just make it once and run whenever you wish.
3938
4039 Why not AppleLin? Yes, at first I think to call it such, but later linapple seemed better to me. And one point!
41
4240 This is my work for making it possible to have comprehensive emulator of Apple][ computer series in Linux.
43
4441 The original source is from AppleWin (http://applewin.berlios.de) by Tom Charlesworth and others.
45
4642 I just adapted it for: video+audio for SDL, other functions for POSIX compliant OS, which Linux is in particularly.
47
4843 Later some sort of Windows support had been added, so you may try to compile it under Windows.
49
50
5144
5245 [INSTALL]
5346
5447 I will show brief instructions for compiling and installing linapple here.
55
5648 Please, see INSTALL file for comprehensive installing tips.
57
58 After SDL1.2, zlib, libcurl and libzip are installed in your system, you can build sources.
49 After SDL1.2, zlib, libcurl and libzip (development versions with -dev or -devel suffixes) are installed in your system, you can build sources.
5950
6051 Unpack downloaded linapple archive and go to src directory:
61
6252 $ cd src
6353
6454 Then run:
65
6655 $ make
6756
6857 or
69
7058 $ sudo make install
7159
7260 If there is no errors, run:
73
7461 $ linapple
7562
7663 or without being installed:
77
7864 $ cd ..
7965 $ ./linapple
8066
8672 Where to install? Anywhere you feel fit, just let linapple be with some files it needs for comprehenceive working.
8773
8874 These files are:
89
9075 splash.bmp - splash screen
9176 charset40.bmp - charset for Apple][ (Apple 2e, etc.) text modes.
9277 font.bmp - font for Help screen and Disk Select screens.
9479 linapple.conf - configuration file.
9580 Master.dsk - disk image with Applesoft(tm) DOS 3.3 inside. See Apple license (on apple.com) for details.
9681
97
9882 [USING LINAPPLE]
9983
100 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.
84 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.
10185
102 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.
86 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
87
88 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).
10389
10490 To quit emualtor peacefully, press F10. F6 toggles fullscreen mode, Scroll Lock toggles fullspeed mode.
10591
146132 $ ./linapple -b - run VideoBenchmark and exit emulator. Note: if fullscreen mode is on in linapple.conf, then
147133 VideoBenchmark will be runned in fullscreen mode.
148134
149
150
151135 In version 2 besides FTP support there is also support for changable Window sizes (see at the end of linapple.conf file for details).
152136 Just be aware when you are not running emulator on its native mode (560x384) you can suffer slowdown if you are using old box.
153
154
155137
156138 [SUPPORT]
157139 Wanted:
158140
159 -- we need to get rid of some SOUND glitches. HELP!
141 -- We need to get rid of some SOUND glitches. HELP!
160142
161143 --DEBUGGER
162144 I just owe at 9300 lines of code of AppleWin debugger. Michael Pohoreski, you are he-man, I tell you.
163145 Besides Debugger.cpp alone, there are some helper files such as Debugger_Assembler.cpp,
164146 Debugger_Console.cpp, Debugger_Display.cpp and so on. Who is able to port it to linapple?
165
166147
167148 --PHASOR
168149 Who knows how does that great thing work? Please, help adopting it to lianpple.
170151 SDL Audio used. Speakers are working out in Speaker.cpp. Who may think, heh?
171152 From version 1.1 Mockingboard support are done.
172153
173
174
175154 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.
176155
156 [CONTACTS]
157 I am beotiger, you may contact me at your will by my email beotiger@gmail.com
177158
178 [CONTACTS]
179 I am Krez beom beotiger (Kbb), you may contact me at your will by my email beotiger@gmail.com or beotiger@mail.ru
180
181 Web-site: http://linapple.sourceforge.net
182
159 Web-sites:
160 http://beotiger.com
161 http://linapple.sourceforge.net
183162
184163 Thank you very much.
185164 Long Live Linux!
189168 24 March 2012 AD
190169 beotiger@mail.ru
191170
192 JV added a line here
171 26 June 2015 AD
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
3838 char *
3939 md5str (const char *input); // forward declaration of md5str func
4040
41 TCHAR g_sFTPDirListing[512] = TEXT("/cache/ftp."); // name for FTP-directory listing
41 TCHAR g_sFTPDirListing[512] = TEXT("cache/ftp."); // name for FTP-directory listing
4242 ////////////////////////////////////////////////////////////////////////////////////////
4343 int getstatFTP(struct ftpparse *fp, int * size)
4444 {
2929
3030 /* And KREZ */
3131
32 // for usleep
33 #include <unistd.h>
3234 #include "Resources.h"
3335 #include "stdafx.h"
3436 //#pragma hdrstop
3739
3840 // for stat in FrameSaveBMP function
3941 #include <sys/stat.h>
40
41 // for usleep()
42 #include <unistd.h>
4342
4443
4544 #define ENABLE_MENU 0
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)
2626 STARTUP = /usr/local/bin/$(EXE)
2727 DATA = ../charset40.bmp ../font.bmp ../icon.bmp ../splash.bmp ../Master.dsk ../linapple.installed.conf
2828
29 #all: ../linapple
29 .PHONY: all clean install uninstall
30
3031 all: $(EXE)
3132
3233 Applewin: $(OBJS)
3536 # $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@
3637 mv $^ $@
3738 strip $@
38 @echo " o If there are no errors, $(EXE) compiled succesfully"
39 @echo " o $(EXE) compiled succesfully"
3940 cp $@ ../
40
41 # static binary: (DOES NOT WORK)
42 #static: $(OBJS)
43 # $(CC) -static $^ -o $@ `sdl-config --static-libs` -ldl -lz
44 # strip static
45 # mv static ../$(EXE)-static
4641
4742 clean:
4843 rm -f $(EXE) *.o
4944
50 .PHONY: all clean
51
45 #
5246 # Installation routines
47 #
5348
5449 install: all
5550 @echo " o Creating install directory '$(INSTDIR)'"
5651 mkdir "$(INSTDIR)"
57 chmod 777 "$(INSTDIR)"
5852 @echo " o Creating additional directories 'images' and 'ftp' in '$(INSTDIR)'"
5953 mkdir "$(INSTDIR)/images"
6054 mkdir -p "$(INSTDIR)/ftp/cache"
6458
6559 @echo " o Preparing configuration file 'linapple.conf'"
6660 mv "$(INSTDIR)/linapple.installed.conf" "$(INSTDIR)/linapple.conf"
67 chmod 777 -R "$(INSTDIR)/"
68
69 @echo " o Configuring access permissions for 'ftp' and 'images' directories"
70 chmod 777 "$(INSTDIR)/images"
71 chmod 777 "$(INSTDIR)/ftp"
72 chmod 777 "$(INSTDIR)/ftp/cache"
61 chmod -R 777 "$(INSTDIR)/"
7362
7463 @echo " o Creating startup script $(STARTUP)"
7564 echo "cd \"$(INSTDIR)\"; ./$(EXE) \$$1 \$$2 \$$3 \$$4 \$$5 \$$6; cd -" >"$(STARTUP)"
7665 chmod 755 "$(STARTUP)"
7766
7867 @echo ""
79 @echo "Type '$(EXE)' (no quotes) to start the beast!"
68 @echo "Type $(EXE) to start the beast!"
8069 @echo "To change some settings edit \"$(INSTDIR)/linapple.conf\""
8170
8271 uninstall:
8473 rm -rf "$(INSTDIR)"
8574 @echo " o Removing startup script $(STARTUP)"
8675 rm -f "$(STARTUP)"
87 @echo " o All done!"
88
76 @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