Home » I’m Making New 8-Bit Member Birthday Cars And It’s Been Challenging In Ways Too Geeky To Tell People In Person But I’m Going To Tell You

I’m Making New 8-Bit Member Birthday Cars And It’s Been Challenging In Ways Too Geeky To Tell People In Person But I’m Going To Tell You

Cs Sidecars Top

As you may know, becoming an Autopian Member comes with a vast number of benefits, both to you personally and human society at large. Sure, there’s the joy of becoming instantly more desirable to all genders, the increased respect you get from your peers, the knowing glances from other Autopians you encounter at junkyards and opium dens, all of that is great, no question. But I hope you realize that, in addition to getting a hand-drawn car on your birthday (for Velour members and above), on subsequent birthdays you get a custom-generated car of your own produced via graphics hand-drawn by me and assembled, randomly, by a vintage 1982 Apple II computer. Last year, these cars were front views. This year, they’re much larger and more varied side views, and they’ve been challenging to make. Which is why I want to kvetch at you now! Because no one else wants to hear this!

Now, don’t get me wrong, I love this kind of challenge. It uses a very different part of my brain than I usually use at work, so it feels like a little break, and even the challenges that had been banging my head against ancient computer plastic this time were sort of fun. So, are you ready for some really, really obsolete geeky talk? If not, too bad! Because that’s about to happen!

Vidframe Min Top
Vidframe Min Bottom

Essentially, the goal here is to make randomized, fun-looking cars in big batches, with each one being unique. To do this, I make a lot of parts that are randomized and put together into a finished graphic by an Applesoft BASIC program. The computer I run this on has a special doohickie wired to its game port that can trigger a DSLR camera, so once the car is assembled from random graphic parts, a photo is taken of the screen. This way, the whole thing is made from vintage tech.

Now, there are a lot of challenges here. Making the graphic elements themselves is one, as it is pretty tedious, pixel-by-pixel work. For this last batch, I was making cars with four main sections:

This time, I wanted to step up my game and make bigger images, so I made side-view cars:

Cs Sidecar Structure

So, now instead of four sections, I have six. Each section has five different graphic options, and each of those options has four different color scheme options: two arrangements for two separate palettes. This means, let’s see, each cell can have, what, 20 different visual possibilities, so 20 possible options for six sections gives a potential combination number of, um, carry the two, I think over 27 million combinations? Is that right? It’s a lot.

Here’s a fun GIF of the program making a bunch of cars– this is from an emulator, so it doesn’t look as good as the actual thing looks on a real CRT, but you get the idea:

Rndsidecars Test

Just by the nature of the way this works, almost everything is a Harlequin-type of car, but I think that’s kind of fun. They’re all pretty bonkers. Here are a few more samples, shot right off the CRT connected to the real Apple II plus:

Cs Sidecars Sample

So, I’ve made more work for myself in the graphics-creation stage, which, again, is tedious, especially with the weird way Apple IIs handle color. But that’s not what tripped me up! What tripped me up was a deeply old-school problem: memory.

You see, an old Apple II uses a 6502 processor, and those CPUs can only address up to 64K at a time. I have some Apple IIs with 128K, but they have to bank-switch that memory, and, besides, when using BASIC, I only have access to 64K. Even worse, when you’re running BASIC, you don’t have access to the full 64K, because the computer needs memory to make things work. The Disk Operating System (DOS) has to get loaded into memory, the BASIC language itself and other ROM routines need to get loaded into main memory, there’s no separate video RAM so the graphics screens need to have memory space – by the time everything gets loaded in, there’s maybe, what 32K or less of free memory for the BASIC program and data like all those car part graphics I made!

Here, let’s look at a memory map of the Apple II:
Cs Memorymap

So, the white areas are free space in memory I can potentially use. I need to keep hi-res page 1 open because that’s the graphics screen I’m drawing the cars on. My big issue is loading my car part shapes into memory: the set of 15 shapes for the top row (3 sections, 5 options for each – color changes are handled in code and don’t need to be stored separately) takes up over 16K of memory! The lower row takes up less, just under 8K, because they’re a good bit smaller (38×24 pixels instead of 38×38).

The issue is that I can’t load them both into memory at once. And loading the top row actually creeps into the area of memory for DOS! I would have liked to have loaded them into the memory area for the second hi-res graphics page (used for page-flipping animations and other stuff, it’s nice to have), but for some reason I could never get that to work.

After banging my head against a metaphorical memory wall, I realized I would have to draw the top row, access the disk to load in the bottom row, draw that, generate the randomized car name, take the picture, and then clear memory and load in the top row again.

This is much slower than before, when I was able to load all the shapes into RAM and not touch the disk at all once it started making random cars. Now the disk gets accessed twice per car, and it’s not super quick. It’ll be fine, I can still set it up and walk away, but I am wondering how these 40-year-old salvaged floppy disks will hold up under all this use! I’d better make some backup copies.

I’m pretty certain this is vastly more than you ever wanted to know about this, but I just had to tell somebody about all the work that had to go into making this all happen, work that, hopefully, will never have to be seen, really, if all goes well.

Oh! There is one more thing! There’s a glitch that happens every now and then where the middle section of the bottom gets repeated:

Cs Sidecar Glitch

I don’t know why it does this: sometimes I get two, sometimes three lower middle bits, which ends up making these pickup truck-like vehicles. I kinda like it, so I think I’ll just leave it, and if you happen to get one of the glitch trucks for your birthday car, I say consider it good luck.

Share on facebook
Facebook
Share on whatsapp
WhatsApp
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on reddit
Reddit
Subscribe
Notify of
46 Comments
Inline Feedbacks
View all comments
Michael Rogers
Member
Michael Rogers
1 month ago

So you have a smidgen under 24k of shape tables. I think if you used one of your 128k machines, with Integer Basic (which should load at $E000, leaving 4k from $D000-$DFFF, presumably RAM) and solved your problem using hgr2 space, you could fit it all in. And Integer Basic is faster (though shape table drawer is probably the same). It’s been a long time since I worked with those machines, but I think this could work.

Tony Mantler
Tony Mantler
1 month ago

A simple run-length-encoding compression scheme would likely save a lot of memory and probably result in faster drawing too (fewer memory accesses for drawing large strips of solid color).

Phuzz
Member
Phuzz
1 month ago

32kB should be enough for anyone.
I shouldn’t joke, I just shrunk a partition down to about 16MB, when it had about 30GB of data on it. It doesn’t have 30GB of data any more 🙁
(it’s ok, it was a test)

Slow Joe Crow
Slow Joe Crow
1 month ago

This is the kind of geeky side quest that makes the Autopian special. Also every 8 bit car Torch produces is better looking than a Cybertruck.

Michael Rogers
Member
Michael Rogers
1 month ago

So you have a smidgen under 24k of shape tables. I think if you used one of your 128k machines, with Integer Basic (which should load at $E000, leaving 4k from $D000-$DFFF, presumably RAM) and solved your problem using hgr2 space, you could fit it all in. And Integer Basic is faster (though shape table drawer is probably the same). It’s been a long time since I worked with those machines, but I think this could work.

Or just buy a floppy emu from big mess of wires and worry no more about your drive heads scraping off the magic dust (this happened to me about 10 years ago).

LastNormalManual
Member
LastNormalManual
1 month ago
Reply to  Michael Rogers

I’ll second the recommendation for the FloppyEmu (https://www.bigmessowires.com/floppy-emu/). I’ve had mine for nearly two years, it makes disk swapping so quick and simple.

67 Oldsmobile
Member
67 Oldsmobile
1 month ago

Now I’m imagining how a floppy Emu would run. Wings flapping all over the place I guess,maybe tripping himself and falling flat on his beak.

M. Park Hunter
Member
M. Park Hunter
1 month ago

I spent a lot of quality programming a ][+ with 48k of RAM – which was considered loaded back in the day. I feel your joy / pain / sense of accomplishment. When you look at the games they managed to pull off running in machine language on those early beasts, the computer programmers of those days were gods.

1978fiatspyderfan
Member
1978fiatspyderfan
1 month ago

It’s been a few decades since I messed with basic but I seem to remember you could re sync the memory to delete the unused portion and make it available to the part of the process where you need it.

Jb996
Member
Jb996
1 month ago

“I’m pretty certain this is vastly more than you ever wanted to know about this,”

Wrong. This is exactly how much I wanted to know about this.

As someone who grew up with a IIgs (the fancy Apple), then a 486, I spent lots of time customizing boot disk to get DOS, needed device drivers, and whatever game I was trying to play, into to the 640k of conventional memory. Sure there was even “extended memory”, but the boot loader, OS, and core game had to fit in the 640k.

Cristiana
Member
Cristiana
1 month ago

If you need any 5 1/4” disks, I have over 50 sitting in a bag.

Richard O
Richard O
1 month ago

I have 2 NOS sealed boxes of maxell MD2HD formatted IBM; 20 floppies total. Are these useful? If so, just message me where to send them. I also have a box of 10 3.5″ disks. Unsealed, but pretty sure unused.

Rob Stercraw
Rob Stercraw
1 month ago
Reply to  Richard O

This reminds me – I once bought a similar box of 3.5″ disks from a garage sale. Pulled a few out and they looked brand new, but didn’t check them all until later when I needed them. The very last one had a label that simply said “MEN IN HOSE”.

I knew I shouldnt have looked.

I did.

Wished I didn’t.

Richard O
Richard O
1 month ago
Reply to  Rob Stercraw

At least in my case, I know they’re ones I bought new.

Cristiana
Member
Cristiana
1 month ago

If you can pay shipping, I’ll send you some

GenericWhiteVan
GenericWhiteVan
1 month ago

How many variants? 6 panels, each panel has 5 themes with 4 possible colors:

4*5 = 20 variants per panel

Total variants = 20^6 =64,000,000 combinations.

This neglects the extra long wheelbase versions.

Rob Stercraw
Rob Stercraw
1 month ago

One of my favorite toys let you do exactly this, but with bitchin’ 70’s vans! Tomy’s “Little Van Goes” I bought one off of ebay a few years ago. I need to pull it out and let my gearhead grandson have a go.

https://www.youtube.com/watch?v=4zRK4LTVh4U

Last edited 1 month ago by Rob Stercraw
Lioncoeur
Lioncoeur
1 month ago
Reply to  Rob Stercraw

I had this as a kid! So many hours designing and coloring… I miss those simple times

PlatinumZJ
Member
PlatinumZJ
1 month ago

I love obsolete computer content! This makes me wish that my parents had kept their Apple IIGS; they had moved on to a PC by the time I was interested in writing programs.

Fingers crossed for a glitch truck to join my 1926 Basque Heavy Industries Duriansurge SSV!!

Collegiate Autodidact
Collegiate Autodidact
1 month ago

Actually pretty interesting read even for one not at all well versed in things computer.
“What tripped me up was a deeply old-school problem: memory.”
You’re in good company: NASA had to deal with the limited amount of memory available to use at any time with their ferrite-core-based (at least as I’m given to understand) computer systems where the astronauts had among their numerous duties the tasks of periodically swapping out memory banks at various times during each space flight from the Apollo program (and earlier) up to and including the Space Shuttles into the 1980s and even the 1990s (not sure about the last decade of operation, though; the last flight was in 2011, some 15 years ago!!)

MiniDave
MiniDave
1 month ago

If you’re using the 3.5″ floppy discs I probably have a bunch of new ones I could send you…..left over from days gone by…..

Tallestdwarf
Tallestdwarf
1 month ago
Reply to  MiniDave

Gonna have to find some 5.25″ floppies, I think. Or maybe a tape drive.

Max Headbolts
Member
Max Headbolts
1 month ago
Reply to  Tallestdwarf

Yeah this is a 5.25 disk only situation.

Rob Stercraw
Rob Stercraw
1 month ago
Reply to  Max Headbolts

Now where did I put my floppy notcher?

Grey alien in a beige sedan
Member
Grey alien in a beige sedan
1 month ago
Reply to  MiniDave

Pretty sure that only the Apple IIgs supported the 3.5″ floppies.

Speaking of which, maybe Torch should upgrade to a IIgs. Its graphics capabilities are better than the Apple II plus he currently uses.

Max Headbolts
Member
Max Headbolts
1 month ago

The YouTuber LGR is just across NC from you, you guys should do a collab!

Grey alien in a beige sedan
Member
Grey alien in a beige sedan
1 month ago

I never knew that! I’ve only ever seen the 3.5″ drives with the IIgs.

But hey, I was always a Commodore guy. I’ve instructed the executor of my estate to bury me with a Commodore 1541.

Nlpnt
Member
Nlpnt
1 month ago

C64 had more advanced color than Apple II, that was one of the design goals for it from the outset.

1978fiatspyderfan
Member
1978fiatspyderfan
1 month ago

Nope back when they first came out I used 3.5 on IBMs

1978fiatspyderfan
Member
1978fiatspyderfan
1 month ago
Reply to  MiniDave

Can’t they be opened up and double the space by using both sides or is that the 5.25s

3WiperB
Member
3WiperB
1 month ago

You can probably make it even slower by saving to and recalling it from a piece of salami instead of the disk.

Last edited 1 month ago by 3WiperB
Nic Periton
Member
Nic Periton
1 month ago

T shirts, how difficult could that be?

Burt Curry
Member
Burt Curry
1 month ago

I just took a Byte off my Big Mac while reading this. If the Bits that have fallen onto my keyboard get stuck in the keys, I’ll just have to add more Memory so that I don’t repeat that mistake.

Eephus
Member
Eephus
1 month ago

I think you need some crude data compression for the graphics, for example run length encoding

Lotsofchops
Member
Lotsofchops
1 month ago

Well Torch, time to write your own kernel to reduce memory usage. You can call it OStopian!

Last edited 1 month ago by Lotsofchops
10001010
Member
10001010
1 month ago
Reply to  Lotsofchops

I’ve got an old laptop I can load OStopian on for testing!!!

Baker Stuzzen
Member
Baker Stuzzen
1 month ago

The reverse Tyrrell P34 axle setup on some of these is dope. I heartily congratulate you on how awesome these are and how well your program seems to work in spite/because of the ancient constraints.

Icouldntfindaclevername
Member
Icouldntfindaclevername
1 month ago

The extent of my Basic memory

10 CLS
20 Print “HELLO EVERYONE”
30 goto 10

John Beef
Member
John Beef
1 month ago

I would’ve done GOTO 20 and repeated HELLO EVERYONE infinitely, or until the power went out.

Icouldntfindaclevername
Member
Icouldntfindaclevername
1 month ago
Reply to  John Beef

But if I goto 10, it makes it look like the words are blinking 🙂

Tallestdwarf
Tallestdwarf
1 month ago

Epileptic seizures for everyone!

Benny Butler
Benny Butler
1 month ago

Throw in a variable to count to 24, then CLS and reset variable to 0. Blink a whole page of Hello….

Icouldntfindaclevername
Member
Icouldntfindaclevername
1 month ago
Reply to  Benny Butler

That would be outside my Basic memory 🙁

Rob Stercraw
Rob Stercraw
1 month ago

Mine was a little more concise
10 PRINT “EAT ME”
20 GOTO 10

46
0
Would love your thoughts, please comment.x
()
x