Posts

Showing posts with the label apple2

What Slashdotting looked like

Image
FYI, here's what being Slashdotted did to my calormen.com site traffic:

Second Life on an Apple II

Image
... or, "How Josh spends his time when the family is on vacation without him." It's a client/server app for the Apple II and Windows that streams the Windows desktop down to the Apple. So far the communication is one way, so you can't even call it a graphical terminal. Yet. Second Life login screen My pirate ship Billabong My avatar at the International Space Flight Museum The Windows server and Apple client (with the USB->RS232 Serial connector in the middle)

ONERR RESUME and such

I added ONERR GOTO linenum / RESUME / POKE 216,0 support to my Applesoft Interpreter . It turned out to be pretty simple. ONERR sets a handler address. On an exception, check if it's cachable (i.e. the program caused it, it's not the interpreter reporting a bug). If so, store the current execution point and jump to the handler. If the handler calls RESUME, restore the previous execution point. The only wrinkle is that IF...THEN... is considered a single statement, so the IF part needs to be resumed and I was cheating an treating the bit after THEN as a separate statement. I don't twiddle the stack at all, so I'm not positive the behavior there is consistent with a real Apple. This is not a feature I used when I programmed in BASIC. I didn't have very good examples to learn from. Also, initial experiments with RESUME made me wonder "WTF?". For example, consider this: 5 ONERR GOTO 10000 10 INPUT "Open file?";F$ : REM prompt user for file name ...

Applesoft Interpreter Update

I blogged about it previously , but one side project I have going on is an Applesoft interpreter in Javascript .  I've been adding updates to the page as I went, and it's getting pretty complete at this point. Worth calling out: It has DOS emulation (basically, you can use ye olde PRINT CHR$(4) trick to open and read text files) Joystick and Paddle support (using on-screen controls) Low resolution graphics (40x48) PEEK/POKE emulation for the keyboard and display strobes, so you can do asynchronous input, e.g. games Tested on Internet Explorer, Firefox, and Safari (Windows) There are two samples - DEMOS (which is a collection of test samples) and TRADER (which was the point of the whole exercise) Check it out!

Random Updates

Reading Light - we've gotten Caspian a reading light for his bed. He usually gets about 20 minutes after we tuck him in (after half an hour of family story time) for him to read by himself. He's really, really into it. He'll read a few chapters of whatever book he's working on at the moment, and often say "just three more pages!" when it's time for lights-out. Sleeping with the Fish – we did a sleepover at the Aquarium of the Bay at Pier 39 , since it's just a 10 minute walk from our house. Overall: meh . Cool to camp out in the underwater tunnel and watch fish and sharks swim overhead, but lots of down sides too. Kept the kids up later (lights out around midnight); Caspian was the youngest there (we cheated - although we preferred he dodge the question, he "rounded up" and said "5" when asked; when cornered, he said he'd turn 6 on his next birthday); activities were a bit dry and scattered. Bathrooms were an elevator ride ...

Scared myself

Su and C are out of town on a road trip with Grandpa, and I'm taking it easy. Slept in 'til 10:30 today. Yay! The weather was crappy so I stayed around the house, and got sucked into a project to the exclusion of all else. Ages ago, someone asked about coding up the Traveller trade rules (from Merchant Prince ) into a simulation, which turned into a long debate about languages and platforms. Given the desire to make the result useful to everyone, I thought it was a no-brainer to do it in JavaScript with a web interface. I even went so far as to extract the source code of the canonical implementation - "TRADER" - from an Apple II disk image and take a peek at the code. Pretty damned elegant, actually. So earlier this week I started translating from Applesoft BASIC to JavaScript . As I went, though, I kept changing directions - for example, did I want it to be a verbatim, mechanical translation, or did I want to optimize things to take advantage of JavaScript's s...

Apple II Raycasting Demo

Image
See on the USENET: http://groups.google.com/group/comp.sys.apple2/browse_frm/thread/1e8a4cb0e695a3d8/21c7622215a37780?hl=en#21c7622215a37780 David Schmenk has written a raycasting demo - think Wolfenstein 3D - done on the Apple II using low-rez graphics. Seems to run at over 20Hz. Works great in an emulator. Awesomeness! Rich, a frequent contributor to the comp.sys.apple2 newsgroups, has already written a level and texture editor: http://rich12345.tripod.com/loresthreed/index.html

Retrocomputing - Mechwarrior for the Apple II

Image
Another project that sat dormant for a while - almost 20 years in this case. This is the basic core of an Apple II game based on Mechwarrior (giant fighting robot suits). It was probably inspired, more than anything, by the box art for a PC version of this game . I'm rather proud of the sprites! I started when I was a teenager and got the basic image blitting and background rendering working and drew up lots of lovely sprites. But the whole thing was tied together with Applesoft BASIC code and was dog slow (like 0.1Hz). When I first (re) moved to San Francisco I spent some time rewriting the core of it in C using CC65  and making the blt engine a lot more flexible and speeding it up too. It's still pretty slow (2Hz or so) but there are plenty of optimizations that can be made: all sprites are 10 bytes wide, for example, and sprites are cached in aux memory which means a double copy when rendering. This is way, way down on the priority list to finish. ...