[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: woz' original "brick out" - source code , paddles
To: mad.scientist.jr
mad.scientist.jr wrote:
Incredible - thanks so much!
I tried running that pong code on a real 128k IIe, and it is kinda
slow. Would removing the REM statements speed it up?
Would a BASIC compiler help?
I found a couple online - Einstein and Flash (though it says Integer
BASIC which I don't think comes on the IIe).
I also went to the Beagle Bros download site which had a bunch of
files but the BASIC Compiler was missing (just the manual was there,
to show you what you are missing).
>
> What language / method would be best to develop in on the Apple 2? I
> have dabbled in Pascal and C, and some 6502 assembly (on the Commodore
> 64).
There are several ways to improve Applesoft speed without resorting to
assembly. Removing REM statements will help with both speed and size.
How much depends on how many REM statements exist and where they are in
the code.
Another useful trick is putting the most branched to lines at the front
of the program. Again, how much speed is gained depends on the program
and how much branching it uses.
Another minor trick is defining variables to ensure certain ones are
listed early in the variable table. However, this usually doesn't apply
to string variables. Yet again, this depends on the program.
There are several Applesoft compilers for DOS 3.3. TASC comes to mind.
The integer BASIC compilers probably won't help much but Integer BASIC
was available on any machine with the proper boot disk.
ProDOS 8 only had the Beagle Bros compiler for Applesoft. Other
compilers for BASIC exist such as ZBasic or Micol Advanced BASIC. ZBasic
has been released as free-use software and documentation is available as
well. It offers a 64k and 128k P8 versions. The DOS 3.3 version has yet
to be uploaded. I highly recommend it.
The Kyan Pascal system is available along with support tools and decent
documentation. It is a very capable Pascal system which compiles to
machine code. There is also an optimizer available.
Two C systems, Manx Aztec C and HyperC are available. Both are K&R and
are quite usable. I prefer the Manx system in general with both DOS 3.3
and ProDOS versions as well as an MSDOS based cross-compiler. On the
other hand, HyperC is considered as freely available as a shareware
product with no place to send the registration fee to. There is an
enormous amount of user supplied information and code available online.
Most of these are available at the Asimov ftp site. The best Kyan stuff
is available on the Apple2 GMail account.
I got the ball to beep with chr$(7) and wanted to get it to beep in
higher & lower tones, but read that to get anything other than the
system beep or a click, you have to write assembly code. Are there any
good tutorials on this and samples of sound code?
There are a number of short assembly language tutorials available. Some
can be found here:
ftp://garberstreet.com/Docs
http://www.textfiles.com/apple/
Also, typing/editing the BASIC code on the IIe is a nightmare! I
forgot the pain of not having an editor. Can BASIC be edited in an
editor on the Apple? I am used to the Commodore where a Basic program
is not stored as an ascii-type text file, and so can't be edited with
a text editor (you would have to use a conversion program to translate
the text listing into the equivalent BASIC tokens and save to a binary
file).
Try Program Writer for a full screen editor with many bells and whistles.
You can save the BASIC program with a simple trick like this.
1 PRINT CHR$(4);"OPEN MYPROGRAM":PRINT CHR$(4);"WRITE
MYPROGRAM":LIST:PRINT CHR$(4);"CLOSE":END
Add this line and run the program. This assumes ProDOS 8 is running and
the file (MYPROGRAM in this case) doesn't exist. It is possible to
expand on this idea, place the code at an area which should never be run
normally such as 60000..61000 then from the Applesoft prompt, type
GOTO 60000
or
RUN 60000
Finally I have to figure out how to get all these disk image files (I
am not familiar with the Apple II file extensions - dsk bin shk sdk
rsrc po nib com do bxy bsc asm acf) transferred over to the IIe. I
downloaded Cider Press and see there is quite a bit of info in there,
so I have some reading to do. Since I have a Mac LC III with an Apple
II emulator card & y cable, could I use this to transfer the DSK and
other image files to the actual Apple IIe ? Or are there any specs
online on how to build a cable to connect your PC to the Apple Disk II
(the X1541-series cables allow you to do that for Commodore disk
drives - http://sta.c64.org/xcables.html)?
dsk, po, do, nib, 2mg should be disk images. They are generally byte
level copies of real disks and used in emulators. shk, sdk, bxy, acf are
archive files. shk and sdk are created by the program Shrinkit which was
the standard Apple II archive utility in it's day.
bsc files are 7 bit encoded ascii files used to send data through email,
newsgroups or other text transfer methods. can be extracted with bscit
or binscii.
CiderPress on the PC should be able to handle and convert most of these
for you.
Can't help on the MAC/IIe card though, don't have a MAC but I think
there are ways to do what you require.
See the FAQs for other info:
http://home.swbell.net/rubywand/A2FAQs1START.html
Cheers,
Mike T
--- Synchronet 3.14a-Win32 NewsLink 1.85
A2Central.com - Your total source for Apple II computing.