-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|130|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Retro Coding -> I Never Had a C64

Posted : Saturday, 29 May 2021, 14:57

I Never Had a C64

I owned a ZX Spectrum and an Amstrad CPC growing up. I've used C64 emulators for playing games, but never really dabbled with coding on one.

Until this past couple of weeks, I'd not delved into the intricacies of the ascii characters, the inks, the graphics modes and more.

And, I have to say.

Oh my GOD!!!

The resolutions seem to be insanely arbitrary, having a myriad of different colour/block settings in each one.
The ASCII chart is off the frickin' scale, with the default chr set not even having lower case letters?! What!?!?!
How did you C64 owners ever cope with this?!
This is absolute madness!!!

The Amstrad had 3 modes, low-res with 16 colours, normal with 4 colours, hires with 2 colours.
Nothing more specific than that.
Pixels and characters mixed nicely, no colour clashing, no need to stick to x-colours per block, and you pick and choose the colours from the same palette no matter what the mode.
The chr chart was a complete 256 characters (with <32 being command characters, and not crazy shit like "Character 147 clears the screen"....

My head's literally exploded 50 times, in the past few weeks, as I've read up on this stuff, and I can't quite grasp how utterly bizarre it all is.


* disclaimer : I do own a C64. It's Krylar's. It's sitting in it's box because I don't want to blow it up, since I don't have a US Step-down convertor. I've had it running once or twice on a borrowed step-down convertor, but never considered it important enough to buy one of my own to use it full-time, as it were.. Perhaps now is a good time to do that..

''Load, Next List!''
Posted : Saturday, 29 May 2021, 15:34
My best mate had a C64 when growing up and it had some awesome games that the Amstrad didn't (at the time or ever) - eg Uridium, ParaDroid, Spy Vs Spy, Gribbly's Day Out and BoulderDash to name just a small selection).

We also did a few Type-Ins from the magazines of the time (Your Computer, PCW, C&VG etc. etc.) They were fecking mental. Trying to find and use the character codes on the keys took forever and the BASIC language seemed very alien. Whole lines appeared to be just pure gobbledeegook. But it was still fun. Just, not as much fun as coding the CPC.

The goode olde days, eh?
Posted : Sunday, 30 May 2021, 03:13

The c64 has some limits (e.g. not easy hires graphics mode and sound (in basic)), but still ... the is great

(especially if you have some kind of fast loader cartridge or of course the Action replay cartridge)

Ah yes, the type-ins. I have learned to use the keyboard by typing the progs and games from the magazines.
Posted : Monday, 31 May 2021, 05:51
From memory, you can use upper and lower case letters together without issue, but 'control characters' must be used, if you print "" something, anything that would usually be used to change a character, eg, hold shift to change case, will result in the control character appearing before the letter. I might be wrong there, but it does the same for changing colours, you would 'print""' the colour character before the text, ctrl+1 of C=+4 etc.

Check out my excellent homepage!
Posted : Monday, 31 May 2021, 07:42
Yep, totally fecking bonkers!
Posted : Monday, 31 May 2021, 08:03
Yeah, it was the same for the color and cursor movement.
With them you can write in 2~3~4 rows with a single print command.

The control chars worked even in/as filenames, resulting in a different color or cleared screen.


But, for someone who has programmed a bit on c64 and amiga, learning that clearing the screen and redrawing it actually slows the exectution of the program, and learning to overwrite only portions of the screen, it was a bit of struggle when, for e.g. blitzbasic, needed to clear the screen and do the redrawing in code ...
There is a thinking difference between the two types of programming.
Posted : Monday, 31 May 2021, 08:21
Yeah, the old methods are full of "tricks" to get as much out of the hardware as you can.
Learning to draw sprites that work well when xor'd, so that you can xor them onto the screen, then xor them back off without needing to redraw anything else.. Awesome!!!

This is less about "oldskool techniques", though, and more about how mindlessly overly-complicated the C64 methodology was.

And don't even get me started on trying to relearn how to type ANYTHING on a ZX Spectrum.

The CPC might not have been the super-powerful megatastic powerhouse that it looked, but at least you could type properly with letters, print properly without fear of random chaos happening, and change colours using change colour commands instead of having to use cryptic symbols!!!

''Load, Next List!''
Posted : Monday, 31 May 2021, 14:18
Actually, with the CPC you COULD use cryptic symbols (eg the character set below 32) to do strange things, eg IIRC CHRS(22 or 23?) allowed you to print over the top of another character in a different colour, without destroying what was underneath. There were also characters to clear the screen etc. Although my memory of this is over 30years old and may be in error.

Yep - as stated here - https://en.wikipedia.org/wiki/Amstrad_CPC_character_set The character set could be used to do some nice weird stuff.
Posted : Monday, 31 May 2021, 14:29
Yes the "control characters" are, and always have been, things under chr(32)
Even today, those still exist.
When you write
For n=32 to 255: print chr$[n);:Next n

You don't expect it to clear the screen, halfway, and turn everything a different colour!

''Load, Next List!''
Posted : Monday, 31 May 2021, 15:23
Actually, the C64 isn't overly complicated ... just that it's BASIC is too simplistic and didn't have anything built in to interface with the hardware.

Coming from the Vic 20 --> Amstrad --> ST --> Amiga --> C64 --> PC --> Spectrum --> Vic 20 (again) it doesn't seem at all alien but I can see how wierd it is if never been over that side of the fence.

Amstrad BASIC was a lot more fun to use, although I did miss some of the things you could do with the Vic character set display (which the C64 also has).

That said, I suppose the way BASIC is implemented on the Vic/C64 is in keeping with the way 6502 works and having the knowledge about the pokes and such is not a disadvantage when moving to assembler orjust going a little beyond what would otherwise need to be a BASIC command.

Andy H
8-bit games at hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Posted : Monday, 31 May 2021, 15:27
Whut? WTF? Why would they not exist today? Nobody ever said otherwise. Bizarro. When I said "strange" things, I meant things that were usually coded (or would require code), not just "random" strange.

Anyway, no, they aren't (and weren't) random, but neither are the C64s. Even if they were bonkers.
Posted : Monday, 31 May 2021, 16:37
It's just so odd to see it behaving like that.
I guess with the CPC being the relative newcomer, things had progressed enough for that not to happen, but...
It's still really messed up!
Of course, the CPC had its own ways to do things like that. Specific CALLs could trigger all manner of things, but those were out of the way, not right in the middle of the chr set!!

''Load, Next List!''
Posted : Tuesday, 01 June 2021, 01:59
After seeing a Amiga and several games and demo's the c64 in our home was gone really quickly and replaced with a a500 That external drive for the c64 and a power cartridge and final cartridge was fun when I had it though! I stil remember a friend bringing over his entire collection of c64 games and leaving it at our home for a couple of days!
Posted : Tuesday, 01 June 2021, 05:12
The manual that comes with the C64 and Vic 20, and the programmers reference guides are really good. Printing chr$ codes puts it through a very poweful routine on the Commodore as said you can do HOME, Clear screen, cursor movements, change colour, change between uppercase and graphic characters or upper and lower case characters and others - but if you do it blindly you will not know what is happening. Again, the documentation is good and if you've never used the machine before it is, like most late 70'd/early 80's computers, a unique beast of it's own. This is something I love about old machines, they each have their own character.

Oh, and you may have heard about PETSCII ? Originating from the CBM/PET it is a variant of ASCII and has some compatibility to a degree but is not the same. PETSCII is more to do with the 'screen codes' that are the direct mappings between numbers 0 - 255 and what character from the ROM is used to display something on the screen. CHR$ is ASCII 0 - 127 though, alhtough with Commodores own extensions. If you want to know what that looks like take a look at this page and the following page: www.manualslib.com/manual/950679/Commodore-Vic-20.html?page=288#manual

As a side note on BASIC on the Commodore, the story goes that Jack had bought BASIC 2.0 from Microsoft with no restrictions on how many machines it was put on. There were better versions of BASIC (version 4 with disk commnands appeared on the later Pet's for example) but the Vic 20 and C64 were stuck with 2.0. I suspect that ROM size and keeping cost down was the main reason Commodore had a basic BASIC.

Andy H
8-bit games at hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Posted : Tuesday, 01 June 2021, 07:34
I might have a try at some assembly for the c64, it's almost identical in terms of commands to the NES and I have a mate who's turning 40 this year who is a big fan of the C64 so

Web / Game Dev, occasionally finishes off coding games also!

Refresh Games - Game Dev Blog
Posted : Tuesday, 01 June 2021, 08:28
After reading your post, i JFF googled for "mario age" :

Posted : Tuesday, 01 June 2021, 15:53
ha! rather convenient that
Posted : Saturday, 19 June 2021, 23:41
I've just watched this youtube video:

View on YouTube

and when it got to the introduction of the keyboard, i got reminded of this thread.