Jump to content
IGNORED

If the Commodore PET has no Sound, then why do i hear it on WinVice?


Ranger03

Recommended Posts

The 2001 and 3000 series had no sound. Starting from the 4000 series and upwards, there was a piezo buzzer inside that makes the sounds. Actually you can wire up a piezo buzzer to the userport to get sound from the older models too, at least in programs that support it.

  • Like 1
Link to comment
Share on other sites

The 2001 and 3000 series had no sound. Starting from the 4000 series and upwards, there was a piezo buzzer inside that makes the sounds. Actually you can wire up a piezo buzzer to the userport to get sound from the older models too, at least in programs that support it.

the other thing i found is that with the early models, typing numbers is impossible. instead of numbers you get symbols. i noticed this with model 2001-8N. i don't know if that was a proitotype or if something is wrong with VICE

Link to comment
Share on other sites

It is common knowledge that the 2001 and 3000 models were sold with the "graphics" keyboard where you access numbers through the numpad. I believe the 4000 series can have either "graphics" or "business" keyboard (the latter means the numbers also appear on the top row) and the 8000 series usually always have the "business" keyboard. Somewhere there is a divide between the early models with 9" screen (40 columns) and the later models with 12" screen (40 or more common 80 columns) though the combination of keyboard, screen, resolution, memory etc is a bit of mix and match, not a few fixed models.

 

So in the emulator, if you use the numpad you will get numbers. If you have a laptop, you might need to hold down a Fn key to simulate the numpad on the main part of the keyboard.

Link to comment
Share on other sites

We had some discussion about wiring up a speaker or piezo buzzer in a dedicated PET group on FB the other week. Some fellow managed to zap his 6520 or if it was 6522 by doing it wrong. I'm not sure the classic instructions given in the game are the best ones, at least not if one tries to improvise on them. For that reason I haven't wired up one to my PET 3032 yet, too afraid I will burn something.

 

And no, it doesn't suck just because it doesn't have an upper row of numeric keys. If one has a long enough attention span and some patience, one learns how to operate a device after a while.

  • Like 3
Link to comment
Share on other sites

Most Commodore computers have an 80 character limit for a single line. Thus, on an 8032 or similar, 1 80 column line was the limit. On most of the 4000 series machines with 40 column screens, you could type in 2 screen lines per line number. The same is true for the Commodore 64.

Link to comment
Share on other sites

Most Commodore computers have an 80 character limit for a single line.

Yep, and due to the 22x23 display on the VIC its BASIC supports 88 characters over 4 lines. On all of them you can exceed the limit by enter the BASIC commands using their abbreviations1. This line:

 

10 fO i=1 to 10: ? "Hi!" : nE

is the same as this, and is also what you'll see if you later list the program:

10 for i=1 to 10: print "Hi!" : next

Using that trick to exceed the limit can cause problems later because the abbreviations are listed using the full commands. That's because BASIC is expanding the tokens2. Anything after 80 (88 for VIC) is no longer "attached" to the line when listed, so will get discarded if you hit RETURN (either by accident or because you edited the line). In those instances you have to re-abbreviate the commands then re-attach whatever ran beyond the limit.

 

 

1 for abbreviation see the upper-right corner of each command's page, or this abbreviation list. For most its the first letter followed by SHIFT-second letter. Exceptions include ? for PRINT and, reS for RESTORE (as rE is READ), etc.

 

2 the commands get tokenized - the 4 bytes for the letters READ (or 2 bytes of rE) are replaced with the value $87, which saves 3 bytes of precious RAM. If the program is later listed BASIC doesn't doesn't know if READ or rE was used, so it shows the full command. In the later versions of BASIC they ran out of 1 byte tokens, so a number of the new commands are tokenized down to 2 bytes such as the 128's SPRITE command which is tokenized as $FE $07.

Link to comment
Share on other sites

At least on the C64 there are small machine language programs that bypass the editor limitations and allow you to edit BASIC lines up to 256 tokens, or if it is 256 characters on the screen. I believe there is a hook in the low 1K that can be altered to achieve this, though I don't know if the same routine works on either of the PET computers.

Link to comment
Share on other sites

  • 2 weeks later...

Does anyone have the source code for PET space invaders?

You wouldn't like it, s'full of the assembly language equivalent of POKEs. So many POKEs...!

 

I've never seen a source file for it but, assuming there was one in the first place - 1970s coders would just as often hand assemble or work in a machine code monitor so no source - the chances of it surviving nearly forty years are pretty remote.

 

Someone might have pulled it apart with a cross disassembler of course, but I haven't heard of that happening to date.

Link to comment
Share on other sites

The canonical version of Space Invaders - the one with a splash screen for how to connect a speaker - is entirely written in machine code so you would indeed have to disassemble it to get any insight into the game. Zimmers has three versions of this game, named "space invaders.prg", "invader.prg" and "joy invaders.prg". The first two may be identical, the last one is patched for joystick instead of using the keys 4, 6, A.

 

Zimmers has one more game called "space invader.prg" which is written in BASIC with additional routines in machine code. It has different graphics, possibly no sound and is controlled with dot, equals sign and space to fire.

 

Zimmers also has a modern homebrew called Spyders by Mr. NOP which comes in three versions for 2001, 30xx and 40xx. Mr. NOP has been grateful enough to actually include his source code to those games, though I don't know which assembler he has used. Again it is all machine code so unless you feel comfortable with 6502 coding it probably wouldn't be of much help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...