[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cc65 for Apple 2?
In article <c283ecb8-9b10-4ba0-9b34-fe3c53f12fd9@b64g2000hsa.googlegroups.com>,
Harry Potter <maspethrose7@aol.com> wrote:
>I have cc65 and some Win32-based Apple 2 emulators and am wondering
>how to create Apple 2 programs for the Apple 2. I am more of a
>Commodore person, but I find the graphics modes funny and am
>interested in exploring Apple 2 programming. What do I need to know?
The biggest gotcha with the binaries generated by cc65 is that they have a
header tacked on at the beginning that interferes with proper loading. It's
four bytes, with the load address and length. Something like this command
sequence will extract the header info:
BLOAD FOO,A$800,L4,T$00
PRINT PEEK(2049)*256+PEEK(2048)" "PEEK(2051)*256+PEEK(2050)
With the header information extracted, you can rewrite the file in the
proper format: ([X] is the load address, [Y] is the length)
BLOAD FOO,A[X],B4,T$00
DELETE FOO
BSAVE FOO,A[X],L[Y]
You should be able to automate this with a short BASIC program; that is left
as an exercise for the reader. :-)
>For example, how do I write, transfer to .dsk images and run the
>software
Can't help with that; I use real Apple IIs and transfer the files across the
LAN for testing. Closest thing to an emulator that I have is a Color
Classic, and with a Mega II inside now, it's as much an Apple II as is a IIGS.
>access the disk and hardware; etc?
The libraries that come with cc65 would handle that; they're documented at
cc65.org, IIRC.
_/_
/ v \ Scott Alfter (remove the obvious to send mail)
(IIGS( http://alfter.us/ Top-posting!
\_^_/ rm -rf /bin/laden >What's the most annoying thing on Usenet?