It might seem odd that you could write this game without implementing the arrow keys. Well I did, and it is. 1.0.1 now supports arrow keys!
rfk-mac68k-1.0.1.hqx
rfk-mac68k-1.0.1.img
Showing posts with label Software. Show all posts
Showing posts with label Software. Show all posts
Thursday, July 24, 2008
Tuesday, July 22, 2008
robotfindskitten 1.0
Whew...robotfindskitten-mac68k-1.0.hqx
robotfindskitten-mac68k-1.0.img
The disk image is a bootable 6.0.8 floppy suitable for vMac or BasilliskII.
Mostly I'm happy with it. The source code is included, but you can see the meat of it here if you just want to take a quick look.
There are a few issues. If anyone cares, I can fix them. No one will.
It's pretty fun. The 68k Macs can stand tall once again.
Monday, July 21, 2008
Robotfindskitten Update
Robotfindskitten Detour
It's not done, but I'm very excited about the progress I've made on my newest classic mac development project.I first found robotfindskitten on my ipod Rockbox install. The game is almost too good to be true. Since then I've discovered that rfk has been ported to many systems, but not the classic Mac. Look at all those retro-systems represented and no 68k Mac.
Obviously all other projects go on hold.
What's interesting about this project to me is, the Macintosh doesn't lend itself to character-based programming as easily as DOS, C64, AppleII (etc) systems do, so I'm having to do a fair amount of extra work to get an ascii game working nicely.
What I've got done... so far I have a good engine (fingers crossed) for dynamically creating a grid based on screen resolution and character widths. A full screen window; leaving the menu bar.TO DO:
- Random placement of non-kitten items.
- Robot movement and collision detection.
- Import messages.
- Win screen.
- Introduction screen.
- Macintosh niceties: icon, 'about', anything else?
- Whatever else I'm forgetting.
Sunday, July 20, 2008
MacTCP Programming
I spent several days fighting with MacTCP. I'm working on a full screen app that uses google weather to display current conditions and future conditions. Ultimately I'd like to create an internet "reader" that uses different XML APIs to gather and display info on the compact mac. I don't know how into it I am, but the Google weather will happen. Anyway, I spent many hours banging my head against the wall as I was fighting a not-always-reproducible-bug that was caused by a buffer overflow, incorrect LAN setup and prickly HTTP headers.
That's all sorted out, but I was hopping to at this point to have some simple XML parsing taken care of.
Also, I can't seem to take a screen shot of the full screen app when it's running. I'd like to show what I have. It's not very macintosh application "looking", and I've decided that style is just as important as function, so I'm not sure anyone else is going to ever want to use it. I guess you could say I'm giving into all of my design impulses which doesn't help any one else.
That's all sorted out, but I was hopping to at this point to have some simple XML parsing taken care of.
Also, I can't seem to take a screen shot of the full screen app when it's running. I'd like to show what I have. It's not very macintosh application "looking", and I've decided that style is just as important as function, so I'm not sure anyone else is going to ever want to use it. I guess you could say I'm giving into all of my design impulses which doesn't help any one else.
Sunday, July 13, 2008
ZX Spectrum Assembly Programming Under Linux
There's been some Z80 activity on the BBS which sent me down - what I figured would be - a simple path... Write "Hello World" in Z80 assembler, assemble it and run it on an emulator.The first place to start is the emulator. I installed spectemu (xspect) since it was available through debian's apt-get. It worked from the start; I didn't have to hunt down roms like other emulated platorms (68k, C64). If you're following along, at this point you should go download some existing Spectrum games and test everything out, make sure it works.
Next I installed z80asm and downloaded a simple assembly language program. Assembled it, loaded it into xspect and watched nothing happen. The output of z80asm is binary z80 machine code. The output of z80asm needs a piece of code added to the beginning of your binary file to get the Spectrum to load it. It also needs to be in a .tap file format. This code can be machine code, or basic. You don't have to understand, you just have to know it's required.
What to do? I was directed towards BIN2TAP and BIN2CODE on the SevenuP website. They have an .exe version for windows/dos, but also the c source code, which compiled fine with gcc. I have the files including compiled executables for linux x86 on my website here.
Many of the simple asm files I found for spectrum wouldn't assemble, or when if they did didn't work when run. I then thought to check the 99 bottles of beer website, and downloaded the Spectrum Z80 assembly version. It assembled without errors, and ran flawlessly. The 99 Bottles website is a great place to find a simple (but not too simple) program in almost any computer language you can think of, and it's often helpful when one needs a reminder after a few years away from a language.
Here's a link to the .tap and the .asm files of my Hello World app. Let it underwhelm you...
; Hello World in Z80 assembly language.
; Assembles for ZX Spectrum
;
; Assembled/Tested under linux with the following tools...
; z80asm $@.asm ; utils/bin2tap a.bin $@.tap ; xspect $@.tap
;
; Author: Nathanial Hendler ; retards.org
; Adapted from Damien Guard's 99 Bottles of Beer on the wall...
; Adapted from the Alan deLespinasse's Intel 8086 version
org 32768
start:
ld a, 2 ; channel 2 = "S" for screen
call $1601 ; Select print channel using ROM
ld hl,line ; Print line
call printline
ret
printline: ; Routine to print out a line
ld a,(hl) ; Get character to print
cp '$' ; See if it '$' terminator
jp z,printend ; We're done if it is
rst 16 ; Spectrum: Print the character in 'A'
inc hl ; Move onto the next character
jp printline ; Loop round
printend:
ret
; Data
line: defb 'Hello, world.',13,'$'
Here's the bash script I use to assemble, convert to tape, and run the program; in case anyone cares (no error checking because I never make mistakes)...
#!/bin/sh -e
# Usage: ./makez80 hello
z80asm $@.asm ; utils/bin2tap a.bin $@.tap ; xspect $@.tap
Lastly, I found zxbasic on http://www.boriel.com/. It's a set of python scripts, and it includes one that assembles and outputs .tap files. It seems like an interesting suite of tools, and the fact that they're written in python makes them appealing for their hackability.
Wednesday, July 9, 2008
68k Greets App
Well, it took several days longer that I expected, but I've finished my RetroChallenge "Greets" app. I've tested it on System 6 & 9. All the app does is display a list of participants and let you see the equipment they reported they would use in the challenge.
RetroChallenge-2008.hqx
The Hiccup
The worst thing is when one's code builds and runs fine within the development environment, but when you compile the application and run it on it's own: shit hits the fan.
I know what kinds of things cause this behavior, but that doesn't mean it's easy to track down. In this case it was an un-initialized Cell type passed to LGetSelect(). I just don't understand why it worked in the first place within Think Pascal.
TextToSTR#
This was an interesting find (found at Merlin's Cavern)... It's an application that takes a tab delimited file and creates a STR# of each row of data for each row in the text file. I thought this would be very useful, but it was only moderately useful as it truncates the data even shorter than the limits of an STR# string.
On the upside, it comes with Think Pascal and CodeWarrior sources so one can modify it for their needs. Anyway, I can see it being very useful, and I post it here with a thumbs up...
texttostr.hqx [2]
Thoughts
What I have now is the basic structure of a simply useful user-interface. This model, a list and window, can fit many needs for simple applications. While by no means revolutionary, it does scream very "Macintosh".
With a grasp of LDEFs, I think I'll revisit my MPD client and add playlist functionality.
Let me know if you run it. Especially if you have any problems or catch a bug. Thanks.
Subscribe to:
Posts (Atom)
