
6502 source code for BBC Micro game Crazee Rider from 1987 - gmiller123456
https://github.com/KevEdwards/CrazeeRiderBBC
======
WhitneyLand
~5000 lines of code for that?

Don’t know if that sounds like a lot or a little but the answer is yes. If you
watched the youtube video, yes it was hard do that and took a long time.

5000 lines, but if I recall correctly there was no way do something fancy like
this using only one line of code:

 _x = 1000 + 1000_

I don’t know what programming courses bother teaching, or even mentioning a
line of code like this because, what’s there to say?

I’m not even sure how to put it in perspective to a person under 200 years old
that, I had to spend a pretty good amount of time to learn enough to do that
(add together two numbers with more than 8-bits each).

And that even the variable x is an oversimplification, because there were no
variable names. You had a CPU, a few supporting chips, and some bytes of
memory to directly throw instructions at or move stuff back and forth between.

Why would anyone have been interested in doing that?

Not sure, somehow seemed exciting at the time. Should the interest question
have a different answer for today’s software when we look back from the
future?

Or, are we going to be scratching our heads again? Why did it take them so
long to generalize AI they might as well have worked farming the fields?

Can’t recall how much easier it became when you had a “Macro Asseembler”
(which I guess most professionals used from day 1 but not always people who
got these systems as a Christmas present). Just that finally having one felt
like getting some kind of new luxury car.

Yes I know.

And it was uphill both ways to school, and my lawn, and so forth. My
apologies.

~~~
jackhack
Old Apple ][ asm coder here.

Don't despair. It's not the merits of your "product" being judged. It's just
the wrong audience (mostly). Colleges now don't even bother to teach
two's-complement. Of course today's "coders" won't get it. This is a
generation that has never had to count cycles, get timing _just right_ , or
worry about running out of memory. The idea of paying $1000 for a C compiler
or $500 for an assembler (in 1985 dollars!), is almost unimaginable now. I
remember the excitement of a 1200 baud modem -- my initial response was "wow!
The text is coming faster than I can read it!"

The systems were primitive, sure, (but at the time they were amazing!) but
this challenge was met with creativity. What the games lacked in photorealism
they surpassed with "fun."

Programming was learned by doing. And most of the folks I met were amazingly
generous about sharing techniques. It was like Jazz musicians sharing a cool
lick, with others. There were no books, really.

Coding in assembly is like juggling. It takes a little effort to get all the
balls in the air and get the rhythm going, then it goes until you hit a
roadblock and it all falls down. You plan, think, and start again.

>>somehow seemed exciting at the time For you, me, and thousands more, it was
absolutely magical.

Thank you for sharing this. I'm reading it now and found myself smiling.

~~~
WalterGR
_Colleges now don 't even bother to teach two's-complement._

I learned two’s-complement in college. And at the least: one’s-complement,
sign-magnitude, BCD, IEEE floating point. And arithmetic on same.

Which colleges are you referring to?

~~~
WhitneyLand
The ones with programming courses.

This is is just a guess, but the guess is you didn’t learn any of that in
CS101. Sounds more EE related. Of course there’s often no clear dividing line
between the two.

Regatdless that’s assuming a full CS/EE undergrad program in either case.
There are tons of people who takes courses, have careers, and all those boot
camp style programs.

Any way people can learn and develop skills is good, so I don’t suggest any of
the above as lesser ways to learn.

I’m just unaware of the concepts you mention being taught in typical 100-200
level courses that have emphasis on software programming or computer science.

------
asciimo
Here's a YouTube video of the game, for those unfamiliar (like me).
[https://youtu.be/GFMp891Q6tY](https://youtu.be/GFMp891Q6tY)

------
pryelluw
Makes me think of all the code lost to poor storage. Like all my C64 related
code from the 80s and 90s. I had hundreds of programs typed in regular
notebooks.

The code for this game is really readable and easy to pick up after all these
years of not doing any 6502 coding. Any 6502 wasm targets?

~~~
flohofwoe
There's quite a few 8-bit CPU emulators that can be compiled to WASM. Static
translation of 6502 (or Z80) machine code to WASM is tricky because a lot of
8-bit code was using self-modifying code, so you'd need at least some sort of
JIT.

Shameless plug: I've started writing easy to integrate 8-bit chip emulators in
standalone C headers a little while ago:

[https://github.com/floooh/chips](https://github.com/floooh/chips)

For instance used in these WASM emulators:

[http://floooh.github.com/tiny8bit](http://floooh.github.com/tiny8bit)

------
userbinator
Amusing how GitHub thinks the project is 94.9% Makefile and 5.1% Batchfile. It
obviously doesn't know about Asm very well.

~~~
fireattack
GitHub supports asm to certain degree but definitely not the .6502 extension
(is it the standard choice?).

~~~
codazoda
I only ever did a clear screen or similarly simple programs in asm but I
believe 6502 was a popular one. I think it was supported on both my TSR-80 and
my first IBM PC.

------
jstimpfle
Only 5171 lines of asm in this game, as measured by "wc -l src/*.6502". See
the youtube link posted here to get an impression what it does.

------
exlurker
Related; the original sourcecode for Fort Apocalypse at
[https://github.com/heyigor/FortApocalypse](https://github.com/heyigor/FortApocalypse)

~~~
Digital-Citizen
It's unfortunate that neither this BBC Micro game nor the Fort Apocalypse game
are free software -- software one is free to run, inspect, share, and modify
(even commercially).

The Crazee Rider software seems to lack a license at all. Thus no permission
is granted to engage in the freedoms of free software.

Fort Apocalypse is also nonfree; it is distributed under a nonfree license --
[http://creativecommons.org/licenses/by-nc-
nd/2.5/](http://creativecommons.org/licenses/by-nc-nd/2.5/) \-- that even the
license's author recommends against using for software per
[https://creativecommons.org/faq/#can-i-apply-a-creative-
comm...](https://creativecommons.org/faq/#can-i-apply-a-creative-commons-
license-to-software) .

------
lbj
To me, this is pure art

~~~
codazoda
Certainly it is. I had a computer teacher tell me that the 'cls' method in DOS
would take hundreds of lines of asm to write yourself. A couple years later I
decided to try it. Turns out it's only a few lines if you take advantage of OS
Interrupts. I assume the teacher was suggesting it would take all these lines
if you didn't "cheat" and use an interrupt.

------
taneq
Now I just have to dig my BBC Micro out from its cardboard box and find a
display device that it can still connect to. :D

~~~
dboreham
And hope the electrolytic capacitors still work.

~~~
SmellyGeekBoy
The RIFA X2 capacitors in the PSU tend to explode. I opened mine up and was
lucky to find that my BBC is one of the few later revisions that don't use
these. Well worth checking though.

~~~
dboreham
The failing electrolytic capacitor syndrome is interesting to me because I
worked as a hardware designer in that period and I don't remember it being
common knowledge that those components had a limited life. I do recall that we
mostly used solid Tantalum capacitors with the transition to surface mount
technology but I believe that was more to do with survival in the production
process than long field life time.

------
soegaard
This game reminds me of Super Cycle for the commodore 64, which also had an
6502.

[https://www.youtube.com/watch?v=FiebnDbq0w0](https://www.youtube.com/watch?v=FiebnDbq0w0)

Are there any collections of source code for commercial games for the C64 ?

------
mycall
I would love to see Crazy Climber. Excellent game.

~~~
fit2rule
Yeah, this game definitely has a "Crazy Climber" aesthetic .. I too would love
to see a Crazy Climber re-make, albeit for my preferred 8-bit machine the
Oric-1/Atmos systems ..

------
thewizardofaus
Assembly is so beautiful.

~~~
speedplane
CPU, registers, interrupts, RAM, I/O... It’s just you and the machine baby.

I started programming with assembly, and evem though today I rarely use it,
any excuse I can find, I’ll dig into in.

No question, modern languages are more efficient, but knowing exactly what
instructions are being run and how they interact with the hardware (a physical
object), is so much more aesthetically pleasing.

~~~
tluyben2
In the embedded world there is still enough of it. Today we had to free up
1200 bytes because our software did no longer run after adding 2 new features;
not enough free memory. With higher level languages we would already have no
chance with the previous features on the hardware, with asm we managed to
optimize enough to free up the needed memory. It is amazing you always seem to
be able to push it further. All that was a must in the 70-80s homecomputers as
they were not (easily, without soldering generally) expandable, so you had to
make it work on what was there. I got into my current work because I like that
kind of optimizing and puzzling from when I did it in the 80s as a kid.

~~~
speedplane
I used to work in the embedded world about 10 years ago. There was definitely
plenty of byte-level optimization then, but reading the tea leaves pointed to
a very different direction (eg, embedded java, embedded SQL).

Makes me happy to hear folks are still hacking bits in 2018.

