BACK TO THE PET (Commodore PET demo, 2022)

We don’t usually feature the demoscene much here, but this recent demo on the PET caught my eye:

This is a playing of shiru8bit’s excellent “Back to the PET” demo compo on physical hardware with amplified audio out. This is amazing software for a 1MHz 6502 microprocessor system packaged into a standalone 29KB “PRG” binary. This makes exclusive use of the “PETSCII” character set in 40x25 text mode.

and

NOTE: “Back to the PET” is a homage to a scene in the “8088MPH” demo for the IBM PC (CGA), both inspired by the excellent “Back to the Future” movie released in 1985 with Michael J. Fox.

and

In honored memory of Jack Tramiel, Leonard Tramiel, Chuck Peddle. For an outstanding in-depth paper about the PETSCII character set, refer to:
PETSCII – A Character Set and a Creative Platform (22 page PDF)

9 Likes

Oh no!

I’m currently working on audio for the PET 2001 emulator – and Back to the Pet is the most important test criterion for this. After some adventures involving the Web Audio API, I’ve it basically working, but I am still missing low frequencies, i.e. the bass line. (I fear, it may be actually an issue with the 6522 VIA emulation.) –Anyways, I’ve heard this a lot in the last few days (minus the bass line)…

More seriously, this is highly impressive.

Regarding shiru8bit’s music, there’s also the “Faulty Robots” album (mostly tracks based on in-game music for the Attack of The PETSCII Robots game that failed to become implemented, the two last tracks are more interesting):

(On basecamp: Faulty Robots | shiru8bit )

And here’s a related blog article by shiru8bit on the backstory, the various tracks, and the history of PET CB2 sound:

Finally, have a look at this PET demo (also from last year), “A Bright Shining Star” by Genesis Project, which really pushes the (rather humble) limits of the PET video capabilities. (Think, PET goes Atari 2600 and races the beam, but only for 10 8-pixel blocks per scanline, as a PET scanline is just 64 CPU cycles.)

And, yes, be assured, the PET still doesn’t have a high-res video mode.

1 Like

For those not familiar with the intricacies of the PET: The PET has no audio chip. It doesn’t have any dedicated audio hardware, It originally even didn’t have a speaker.

But it does have a 6522 VIA chip for communications, as found on many 6502 systems. The VIA has two bidirectional I/O ports, port A and port B, which are normally in handshake mode for handling serial I/O. It has also two timers which are connected to these ports. The second timer, connected to port B, may be set in a “free running” mode, where a serial register is shifted to the right on each clock tick. The least significant bit of this shift register is applied to the “peripheral port 2 control line”, or CB2 to in short. In other words, by selecting a suitable bit pattern for the shift register and suitable timer frequencies, we get a square pulse wave on CB2. By connecting this line (available at the PET’s user port) to a speaker (by a very basic circuit) we can actually create audio, known as “CB2 sound”. As did a few of the games, and now this fantastic demo.

The sound is rather characteristic, as it can’t produce all frequencies, but it can produce some interesting timbres, which are hard to produce by any other means. (Mind that the down-sampling ratio from the PET’s 1MHz clock speed to high quality digital audio of 48KHz is 20.83 : 1, but it’s just an either high or low 1-bit signal.) As this is all handled by timers inside the 6522 VIA (which also provide interrupts), it’s also quite economic in terms of CPU load.

PET-invaders-audio-diagram

(The famous audio diagram from Space Invaders for the PET.)

The really impressive part in shiro8bit’s music are the low frequencies. The lowest you can do with usual CB2 sound techniques is 245 Hz. So he had to invent some new IRQ-based techniques to directly jam new contents into that serial shift register, which came with their own obstacles…

2 Likes

I spoke (in email) to shiru8bit before posting the BACK TO THE PET video. He said this demo took him about 6 weeks of continuous effort (essentially daily/nightly). The three persons depicted in the demo are female toons from an anime (he didn’t mention which specific ones and, looking through the code, no comments about it either – demoscene like this work by having a kind of encoder/decoder. so it is a compression algorithm involved). In hindsight, we agreed it would be more appropriate to think of those toons as the three persons mentioned above (if only symbolically, we probably won’t recut the demo to alter anything visually – but the source code is available).

Jack Tramiel, the holocaust survivor founder of Commodore (and later owner of Atari after the 1983 video game crash). Jack’s life experience I think led him to respecting the value of a dollar, and genuinely wanting to help make the idea of computers become affordable. The price war of the C64 against TI was legendary payback (from when TI did a similar thing during early calculator chips a decade prior).

Leonard Tramiel, the son of Jack. It is said Leonard largely contributed to the font style of PETSCII, due to his desire to play card-games on the PET (I think he was interviewed as recently as 2019 at CHM in Mountain View).

Chuck Peddle, the marine trained lead technical engineer of both the 6502 processor itself and the PET system (that began as a KIM-1 prototype in 1975 – KIM being Keyboard Input Monitor).

For the PET case/cabinet, IIRC they contracted with a furniture company in Canada – home computers still weren’t quite a thing yet, they were still figuring out its form – which is why the first PET had that calculator-style keyboard. “Transactor” was something a little bit more than a “Calculator” while acknowledging it wasn’t quite yet a “Computer” - calling it a computer in 1976/1977 was sort of like calling a golf cart an automobile, which it kind of is but you’d get wrecked taking a golf cart onto a highway – similarly, the very-early microcomputers were more oriented as being terminals into “real computers” and not host of services themselves (and even calling them “computers” was politically dangerous, because marketing-wise nobody sold computers – they only leased them; all that changed, of course, by 1980).

3 Likes

I’ve been rather busy on the emulator update (which is about ready now, I’m only missing a related write-up pointing out the new features),which runs all those amazing 2022 demos.

So I’ve spent some time with “Back To The PET”. The demo is full of allusions to and paraphrases of scenes from other famous, mostly C64 related demos. (With the exception of the last scene, which alludes to the typo gag from Space Invaders.) As I see it, the scene is alluding to the “Bad Apple” demo that has been ported to about every platform, with the Apple replaced by P, E, and T, respectively. (I’m not sure, if adding yet another context to this really helps.)

Here’s a YT video explaining the background of the “Bad Apple” demo: Bad Apple Explained: History and Analysis - YouTube

1 Like

Great demo!
My favorite retro computer. (not just for its design). And even a business computer, originally not for gaming.
I only knew the VICE emulator. Are there better ones?
And why not improving VICE?

I don’t know about “better”, but there is a good hardware replica out there -

https://www.thefuturewas8bit.com/mini-pet.html

-Gordon

1 Like

I just updated my own online emulator.
It now features things like sound, cycle accurate video rendering, support for a variety of joystick adapter schemes and even a drag&drop assembler.
(Also see the “Utils/Export” menu for some tools for a closer inspection of what’s happening in the emulated PET, like hexdumps, context aware disassembly including BASIC source text and variables in their in-memory encoding, a comprehensive BASIC variables dump, etc.)

And it runs all the demos, see this link:

Sortcut to demos: https://www.masswerk.at/pet/?demos

Some exported screenshots:

back2pet
(Back to the PET)

bright-shining-star1
(A Bright Shining Star #1)

bright-shining-star2
(A Bright Shining Star #2)

bright-shining-star3
(A Bright Shining Star #3)

As far as I know, this is the only emulator running these demos out of the box without modifications.
:slight_smile:

(I still have to do a write-up and will be posting a separate post on this soon…)

2 Likes

There was
(Out of stock. Not sure, if there will be another batch.)

Hopefully this won’t be too far off-topic: Several folks (sort of here and in other places) mentioned a sentiment of how the early (pre-1980) microcomputer systems weren’t very much used for games. I’ll agree they weren’t very terrific games - but PETSCII itself was derived with intent for card games, and Wozniak was vocal about early Apple being an easy system to make games on. (the ECHO IV had some decent games, maybe even pre-1975 - which caused an issue with those networks)

In a 1979 BYTE ad for software on the Commodore PET, I noticed that over 50% of the listing was games. I’ll type the ad, since I want to re-arrange the order (but also so the content can be more easily searched for). Also adding some modern references to these games:

MICROCHESS for PET (Peter Jennings) $17.90
Microchess (1978) by Micro-Ware Commodore PET game
Microchess 2.0 : Peter Jennings : Free Download, Borrow, and Streaming : Internet Archive (works on 20XX or 30XX, but not 40XX series)
NOTE: sales of Microchess helped fund the starting of the company that made VisiCalc!
https://www.commodore.ca/commodore-gallery/commodore-pet-games/ (microchess 3.0 is on disk10)

Bridge Challenger program for PET $13.50
Bridge Challenger : Georges Duisman : Free Download, Borrow, and Streaming : Internet Archive (this is the Apple2 version)

Adventure 1 for 24K PET $ 7.95
PET Game: ADVENTURE 2 : Free Download, Borrow, and Streaming : Internet Archive
couldn’t find Adventure 1, but the above is Adventure 2 which I think is Pirate Adventure, both by Scott Adams
Pirate Adventure - MobyGames

Tunnel Vision/Kat & Mouse-maze $ 7.95
Tunnel Vision and Kat and Mouse - MobyGames
Tunnel Vision - (1978) - Commodore PET - WIN! - YouTube (preview of what it looked like on PET)
https://www.commodore.ca/commodore-gallery/commodore-pet-games/ (PRG on disk1)

Kite Fight - 2 player action game $ 7.95
A B Computers - Michael Riley (claim)
Kite Fight | Op-Docs | The New York Times - YouTube (unrelated, Kite Fighting in Rio de Janeiro)
(unrelated) Looks like there is also “kite fighting” as a Hindu festival of Makar Sankrati
(but as to this game itself, I’ve not yet found an actual reference to it!)

PET 4 Voice Music Board (MTUK-1002-2) $49.00
photo: Commodore PET Graphics and Video Add-on Boards
(probably no known software - notice it plugs into both ports at once; would love to hear it in action)
from this link you see there are various graphics and audio cards made for PET
(to this day, there is a sort of Synth Music Underground associated with Commodore systems)
Music Software (K-1002-3C) for PET $19.00
(software related to above)

CmC Word Processor program for PET $25.00
I’m assuming CmC refers to Commodore? I recall around 1979, Commodore was offering its own “office suite” of professional software.

Graphics Utility Package for PET $13.50 (could find no info about this)
Stimulating Simulations-Book & PET tape $13.50

Protect-A-PET dust cover $ 9.50
(the IBM 5100 and the OSBORNE-1 also had form fitting “dust cover” accessories!)

from BYTE Magazine - September 1979

Agreed, games were popular, and remain so! But I think prior to the C64, or perhaps prior to the VIC-20, I would say the majority reason for buying a computer, or for feeling that ownership of a computer was an attractive proposition, was for other purposes: either to use it in business, or in some vague way to help run a household, or to learn about computers or about programming.

In other words, the initial attraction was one thing, and the eventual usage was another thing. There’s also the popular idea that the kids want the computer for entertainment, but tactically agree with the parents that the computer is for education.

There’s a huge price differential between say the Atari 2600 console, and any of the 1977 trinity, and so the purchase is justified on different grounds. Even if the reality is that games are the majority of hours used.

The C64 and ZXSpectrum were I think mostly bought for their games, and that became the normal justification. I think there was a turning point, which has to do with price and with colour and sound, and of course the availability and playability of the games.

I think, “realistic” arcade ports for early home computers were some of a “holy grail” – and a worthy challenge, as well. There had been some amazing arcade ports for the PET, even with the restrictions of PETSCII characters only.
E.g., “Galaga” by Henrik Wening (1982): https://masswerk.at/pet/?prg=galaga…
(For convenient game play on a modern keyboard, select the joystick options in the game and use the cursor keys and SPACE together with CAPS LOCK, which toggles the keyboard joystick emulation.)

Other games made creative use of the character set, e.g., “Vortex” by Magic Carpet Software (1982): https://masswerk.at/pet/?prg=vortex…
(Warning: The sound is a bit annoying in this one. On the other hand, it’s some sound, while the PET had, strictly speaking, none.)

1 Like

The Atari 400 came out two years before the VIC-20, and its marketing heavily concentrated on games. The Atari brand was synonymous with video games. Unfortunately, this hampered them when Visi-Calc became an unexpected killer app for the Apple ][. The Atari 800 would have been a superior platform based on price, mass market availability, and specs. But it had the Atari brand.

When Commodore came out with the VIC-20, its marketing aimed at Atari by declaring the VIC-20 was “more than just a game”. The Atari 400 actually had better specs and MUCH better BASIC, but its awful flat membrane keyboard was very unserious for anything but limited typing.

There were also various attempts at hybrid systems, the Bally Astrocade being the most successful (1978 vs 1979 for Atari 400). However, just looking at it, it feels like a “console with BASIC” rather than a “computer with games”.

I’d say the Atari 400 was the first true gaming computer, since its hardware was developed with both gaming and computing in mind - Atari hadn’t fully committed whether it would be a computer or console at first.

That said, the Apple ][ was designed with gaming in mind. But that was really just Wozniak wanting to play one specific game on it, not really designing the computer with gaming as a focus.

2 Likes

I second this, the Atari 400 being the first true gaming computer. Even more so, as rumor has it that the Atari 8-bits (esp. their custom chips) originated from plans for an upgraded video gaming system. (I do not know any internal documents or persons involved personally, so I can’t say this for sure.)

I also remember some “sneaking around the bush” regarding the true purpose of home computers. While it was suggested that these would serve some vaguely defined educational or “serious” purpose (the usual example being keeping an inventory, which was, of course, somewhat tedious with cassette drives), it was a barely kept secret by the early 1980s that the true purpose was entertainment. Maybe, the entertainment was in programming, but more often so in gaming.
I guess, some of the fascination also came from the idea of actively creating content or interacting with content for and on a TV screen, which had been previously for passive consumption only. And here again, games were a somewhat automatic suggestion.

1 Like

Well, true…

1977: nobody really knew what they were buying a microcomputer for, there was no software yet out to really do anything (and the systems weren’t really available until late in the year, including builds with more than the base amount of memory) [while at the very least, the thing could be a nice calculator]

1978: “year of development” - building the first set of development tools (assemblers) that could run natively on those microcomputer systems themselves, disk drives were still expensive (still costing about as much as the computer itself - and disks themselves also had a meaningful overhead cost). Then developers finding where to order these tools from and learning how to use them (the more features an editor had, the less resident memory you had for editing your assembly/source code - even 32K was still expensive).

1979: a kind of “first generation” of micro-software applications, and failed businesses (or businesses that had moved onto newer equipment) offered abandoned micros to migrate into more homes

All while during this time, some had access to the mainframes or minicomputers - 6502/8080 emulators and existing established editors - so some developers were “ahead of the curve.” Some bring up Gates having “free” access to a minicomputer (I think basically borrowing a professors account).

Two great games! but yes in keyboard-only mode, they suffer from the PET limitation of only being able to poll one key at a time (I think “the first key wins”, so if you’re pressing “A” nothing else can get registered until you release that “A”). One of the cost-saving compromises.

Hmm, did the Atari 400/800 also have this same limitation?

Hmm, since I’ve little knowledge about Atari 8-bits beyond the VCS, this is best left to others to answer.

(A little known fun fact, however, may be that the VCS, or rather: its TIA chip, had provisions for a 4 rows by 3 colums keypad matrix with an active scan response time of 400 microseconds. I guess, Atari’s 8-bit computers wouldn’t have been worse than this.)

Keep a couple of things in mind:

  1. BASIC pre-existed the home computer era by more than a decade and there were many BASIC games already in existence before the home computer era. David H. Ahl pulled many of those programs for his first “BASIC Computer Games” book.
  2. Then there’s the “big” games that were already well known (ex: The Oregon Trail) that were already well known by many school children with access to a time sharing system. As soon as home computers were “big” enough, those games were ported over.
1 Like

I feel it’s fairly well known in the VCS world as there was a BASIC for the VCS that used 2 4x3 keypads, so yes, 24 keys with a multi way shift key to let you type in the full alphabet, numbers and keywords.

For a machine with barely any RAM I did feel it was quite an achievement.

-Gordon

I wonder: how many would that have been? I would be surprised if it were more than a few thousand, almost exclusively in the USA

1 Like