######## ################## ###### ###### ##### ##### #### #### ## ##### #### #### #### #### #### ##### ##### ## ## #### ## ## ## ### ## #### ## ## ## ##### ######## ## ## ## ##### ## ## ## ## ## ##### ## ## ######## ## ## ## ### ## ## #### ## ## ##### #### #### #### #### ##### #### #### #### #### #### ###### ##### ## ###### ###### Issue #8 ################## Aug. '94 ######## ------------------------------------------------------------------------------ Editor's Notes: by Craig Taylor (duck@pembvax1.pembroke.edu) Woe be to Commodore, The marketer's have finally killed it, With a little bit of spending here, And not much over there, You know that Commodore has finally died. And that's the way life should be, The Commodore fanatics cried. We'll probably be better off they yell, Let Commodore go to hell. So the question is who'll purchase Commodore? Yes, for those of you who are unaware Commodore has declared bankruptcy. There are numerous rumours abound over whose interested in what divisions of Commodore and such - there's still no definate word on the net. Several factors can be blamed for Commodore's demise: Commodore _never_ was successful in marketing products. The engineers would often turn out miracle machines that the marketing department (I wonder if there even was one) promoted badly, if at all. What has put the nail in the coffin for Commodore was the lack of financial capital to keep the company in operation. A lot of this news has been discussed on GEnie, the newsgroup Comp.Sys.Cbm, and various magazines as well so I won't elaborate any further. Speaking of magazines, Creative Micro Designs has started a magazine for Commodore 8-bit's called, "Commodore World". The magazine is very well done. There are other magazines that also deserve mention: DieHard, the Underground and many others. Commodore may be bankrupt but the Commodore will still live forever. Speaking of living forever, Commodore Hacking is looking for articles on any subject dealing with any aspect of technical programming or hardware on the Commodore. If you've got an article already written, or an idea for one _please_ feel free to e-mail me via duck@pembvax1.pembroke.edu. Many thanks to the authors whose works make up this and previous issues. ============================================================================= Please note that this issue and prior ones are available via anonymous FTP from ccnga.uwaterloo.ca (among others) under pub/cbm/hacking.mag and via a mailserver which documentation can be obtained by sending mail to "duck@pembvax1.pembroke.edu" with a subject line of "mailserver" and the lines of "help" and "catalog" in the body of the message. ============================================================================= NOTICE: Permission is granted to re-distribute this "net-magazine", in whole, freely for non-profit use. However, please contact individual authors for permission to publish or re-distribute articles seperately. A charge of no greater than 5 US dollars or equivlent may be charged for library service / diskette costs for this "net-magazine". ============================================================================= In This Issue: Commodore Trivia Corner This section of C=Hacking contains questions that test your knwoledge of tricks and little known-information for the Commodore computers. Each issue they'll be answers to the previous issues questions and new questions. How much do you know? RS232 Converter This article, with a minimum of parts, details how to make your own RS-232 converter. Programming the Commodore RAM Expansion Units (REUs) The REC chip is a DMA (direct memory access) chip that allows for the Commodore 64 and 128 to use the Ram Expansion Units. This article examines how to access the chip in your own ML programs. A Different Perspective: Three-Dimensional Graphics on the C64 In this article, co-written by Stephen Judd and George Taylor, is presented all the basic graphics tools and mathematical theory behind 3d graphics. The basic tools are using a charset to make graphics, plotting a point, drawing a line, clearing the graphics, and double buffering. The 3d tools are defining a 3d object, rotation of the object in 3d space, and perspective viewing on a 2d screen. Programs are presented in basic 2.0, basic 7.0, and assembly which show a rotating cube outline. Design of a 'Real' Operating System for the 128: Part I Written Craig Bruce this article examines a 'real' operating system for the Commdore 128. It focuses on the OS being Multi-tasking, Distributed and based on a MicroKernal. Why? As he states, "Because I'm designing it, and that's what interests me. The ease-of-construction thing is important too. Another important question is 'can it be done?'. The answer is 'yes.' And it will be done, whenever I get around to it (one of these lifetimes)." ============================================================================= Commodore Trivia Corner by Jim Brain (brain@mail.msen.com) It is time for another dose of trivia! As some of you may know, The Commodore Trivia Editions are posted every month to the USENET newsgroups comp.sys.cbm, alt.folklore.computers, and comp.sys.amiga.advocacy. This article is a compilation Trivia Editions 2-8, with only the questions appearing for Edition 8. These are part of a Trivia Contest in which anyone may enter. If you wish to participate in the newest Trivia contest (Which is on Trivia 8 as I write this), please send your answers to me at 'brain@mail.msen.com'. The following article contains the answers to the January edition of trivia ($00A - $01F), the questions and answers for Febrary ($020 - $02F), March ($030 - $03F), April ($040 - $04F), May ($050 - $05F), June ($060 - $06F), and the questions for the July edition ($070 - $07F). Enjoy them! Here are the answers to the Commodore trivia questions for January, 1994. Q $00A) What was the Code-Name of the Amiga while in Development? A $00A) Lorraine. Amiga was the company name. When Commodore bought the company, they scrapped the model name and used the old company name. Q $00B) What is Lord British's Real Name (The creator of the Ultima Series)? A $00B) Richard Garriott. Scott Statton has met him and says that he is son of astronaut Owen Garriott. Q $00C) What is the POKE location and value that will fry an early model PET? A $00C) 59458. It is in the (Versatile Interface Adapter, 6522) No, I won't tell you what to poke into it, but I will tell you that it is not the only way to fry a PET. here is a description from none other than Jim Butterfield "The poke shopwn above is correct. Its intention was to speed up early model PETs by masking the RETRACE line (by switching it to output)... however, Commodore subsequently REDESIGNED the interface in such a way that making the VIA pin an output caused (now) two outputs to fight each other ... result, VIA and/or video circuitry burnt out. LATER (Days of "fat 40" and 80-column PETs), the new CRT controller chip could be fiddled with POKES so that it generated scan rates completely out of the capacity of the CRT deflection circuits. Result: burnt out deflection circuitry ... and that was no YOKE!" Richard Bradley says that 59595 is the second poke that Jim is referring to. I also have in on word from Ethan Dicks that 59409 is another infamous poke, but I wouldn't try any of these! Q $00D) On the Plus 4 and C-16, the VIC chip was replaced with the TED chip. What does TED stand for? A $00D) TED = Text Editing Device. It did not have as many capabilities as the VIC II. Q $00E) Commodore Produced a daisy-wheel letter quality printer in North America (maybe elsewhere) for the Commodore Serial Line. Name it. A $00E) The Commodore DPS 1101. The CBM 6400 was another earlier attempt at a daisy-wheel printer, but it had an IEEE-488 interface. Q $00F) What is the version of DOS in the 1541? A $00F) 2.6 Q $010) What is the Version of BASIC in the Plus 4 and the C-16? A $010) 3.5. Q $011) What are the nicknames of the original three custom Amiga chips? A $011) Daphne/Denise, Agnes/Agnus, and Paula/Portia, or Huey, Duey, and Louie. Denise, Agnes, and Paula were the American names, but the the others crept in from somwhere. the ducks were always a joke, but caught on as alternate names. Q $012) Commodore produced a 64 in a PET case. What is its name and model number? A $012) The Educator 64. It was model number CBM 4064, and it was also called the PET64. Note that this version of the 64 was the second attempt. Commodore first tried to sell the "Educator 64" to schools in the regular 64 case, but administrators and teachers disliked the "homey" look. Thus, it was squeezed into a PET case and sold better, although I don't think it was ever a killer seller. Q $013) Commodore sold a 1 megabyte floppy disk drive in a 1541 case. Give the model number. A $013) The Commodore SFD 1001. It was actually half of an CBM 8250 LP with a slightly revised ROM. Q $014) What does GCR stand for? A $014) Group Code Recording. Q $015) Commodore produced a drive to accompany the Plus 4 introduction that was designed specifically for the Plus/4. Give the model number. A $015) the CBM 1551 was the new, high-performance drive that was designed specifically for the Commodore Plus/4 and C-16. The 1542 was actually just a repackaged 1541 in a grey case that was made available for people who didn't want to spend the extra money for the 1551. The extra cost resulted from the 1551 sporting a new, parallel transfer method that increased transfer rates 400%. Q $016) What does SID stand for? A $016) SID = Sound Interface Device Q $017) What does the acronym KERNAL stand for? A $017) KERNAL = Keyboard Entry Read, Network, And Link. This is most likely another "words after the letters" acronym, along the lines of the PET acronym. Q $018) What version of DOS does the 1571 have? A $018) 3.0 Q $019) What other two Commdore Disk Drives share the same DOS version number as the 1571? A $019) I got more than I bargained for on this question, since there are four drives which have the same DOS version that I feel are adequate responses to this question. The CBM D9060 and D9090, although I doubt the code is the same. The D series were hard drives. The 8280 Dual 8" Floppy Drive. The 1570, which was a single sided version of the 1571 in a 1541 case painted to match the 128. The ROM is slightly different, enough to make it unrecognizable as either a 1541 or a 1571 in some cases. The 1571II and the 1571D, which is the drive in the C128D, also have this DOS revision, but that stands to reason, since they are in the 1571 line. Q $01A) How many files will the 1571 hold? A $01A) 144 in both modes. I am surprised Commodore didn't add a track or put another directory on the back. Q $01B) How many files will the 1541 hold? A $01B) 144. Q $01C) What did Commodore make right before entering the computer market? A $01C) Calculators. They also made office equipment, watches, adding machines, and thermostats, hence the name "Commodore Business Machines". Q $01D) Commodore introduced an ill-fated 4 color plotter. Give the model number. A $01D) the Commodore 1520. It used 4 inch wide paper and could use 4 colors. Q $01E) Some formats of CP/M write disks using the MFM format. What does MFM stand for? A $01E) MFM = Modified Frequency Modulation Q $01F) On the Commdore 128, the user manual left three commands undocumented. One works, and the other gives a not-implemented error. Name the commands and what each one does or does not do. A $01F) RREG reads the internal registers after a SYS command. OFF gives an unimplemented command error. QUIT does too. Here are the answers to Commodore Trivia Edition #3 for February, 1994. Q $020) What does the letters IEEE in IEEE-488 stand for? A $020) Institute of Electrical and Electronics Engineers. Q $021) What was the logo of Batteries Included? A $021) It was a the face and hands of a man with glasses inside a circle. Early renditions of him were in black and white, while later ones had him with blond hair a a red shirt. Some views had him actually typing on the 64/VIC with one finger, but most just showed him, not the keyboard. Q $022) The Commodore VIC-20, 64, and 128 computers emulate in software a very important integrated circuit. What is its number, and why is it important? A $022) The 6551 UART IC. It is used for RS-232 communications. Q $023) Commodore watches play a beautiful song for the alarm. What is the song's title? A $023) Fleur-de-lis. The "Godfather" theme. Q $024) The C2N style Commodore tape decks are impressive in handling errors. How many times is a single program stored onto tape? A $024) Twice, second copy is placed right after the first. That means, even if you get a load error on load, you might be able to just run the program anyway, as a load puts the first copy in memory, and verifies it against the second copy. Q $025) What is a jiffy? A $025) A jiffy is 1/60th of a second. It is the same on PAL and NTSC Commodore computers. Q $026) What is the screen resolution of the Commodore VIC-20? A $026) On the VIC-I IC, the text and graphics screens are definable within limits. Therefore, there are a number of answers that are correct: The default screen has (and the answers I was looking for): Text: 22H x 23V = 506 characters Graphics: 176H x 184V = 32384 pixels However, on experimentation with a NTSC VIC-I (6560), I found that it could support a resolution of: Text: 24H x 29V = 696 characters Graphics: 192H x 232V = 44544 pixels Your mileage may vary, but these numbers remove all border area. (I am not sure if you can use all the pixels, since the VIC-I only allows 32768 to be used. You might be able to flip the graphics page in the middle of the screen, but I leave that as an exercise.) The VIC-I also supports a virtual screen, which can be "panned" so that the physical screen becomes a "window" into the virtual screen. The maximum "scrollable" virtual screen on NTSC is: Text: 28H x 32V? = 896 characters Graphics: 224H x 256V? = 57344 pixels The VIC supports more resolution than 32V, but you can never see it since you can't scroll it into view, so the point is moot. So, if I didn't thoroughly confuse you, email me and I will make sure I do! Q $027) Why is the VIC-20 named the VC-20 in Germany? A $027) Because 'V" is pronounced 'F" in Germany, and the resulting pronunciation was a naughty word. Commodore put one over on many people. The VIC-20 was designed in the states and given that name due to the IC that did the graphics. When the marketing started, CBM found out the name was no good in Germany, so they quickly renamed it VC-20. The after-the-fact Volks-Computer conjured up images of the Volkswagon car (VW), which was popular at the time for its dependability and price. The rest is history... Q $028) Why was early Commodore equipment built into such heavy enclosures? A $028) Simple. Commodore made office furniture, which includes desks and filing cabinets. They simply used the facilities and parts on hand. The fact that, at the time the PET came out, people equated physical stability of a machine as an indication of its worth, served only to reinforce the decision. Also, the system had to hold up the built-in monitor. Most people think it is due to FCC regulations. FCC regulations had not been determined at the time the PET came out, although the engineers did know that the CRT produced many electrical hazards which could be alleviated with a shielded metal case. Commodore has always been a "cheap" company, so the fact that they could get good shielding in-house at almost no cost proved to be the overriding factor. It might interest some to note that, even with the metal case, early PETs had foil inside as a secondary shield. The reason has to do with the keyboard being mostly plastic, as the shield fit directly underneath, but the reason for it remains a mystery to me. Q $029) What two BASIC 2.0 commands might still work if mispelled? A $029) The answers I was looking for are END and STOP, although someone correctly pointed out that GO TO can be construed as a mispelling. Also, print#, get#, and input# might work if the '#' was omitted and the program was getting data to screen or keyboard. Although the following aren't really the result of mispelled commands, I put them in, since you could stretch the definition of mispelled to include them. LET would work if it was left out, since LET was an optional keyword. Commands of the form would work if letters were tacked onto the end. (example: RUNDY., prg has a valid line 0, and DY = 0). Finally, LOAD"jim",8,1garbage would work due to the way LOAD absolute worked, but that is a stretch! Q $02A) What does CIA stand for? (not the U.S. CIA!) A $02A) CIA = Complex Interface Adapter. The german Magazine 64'er calls it a Control Interface Adapter, but that is not its official name. Q $02B) (hard one) What is the key VIC capability that makes full-screen hires graphics possible on the _VIC-20_? A $02B) A lot of people answered redefinable characters, but that alone does not provide FULL-SCREEN graphics. 256 8*8 cells gives you a little over 1/2 of the screen in graphics, but the VIC has the ability to make each character cell be 8*16, which gives enough pixels to map the entire default screen. Q $02C) How many cassette ports does the CBM 8032 computer have? A $02C) Two. One on back, one on side near the back. Q $02D) What 5 bytes must appear in every Commodore 64 autostart cartrdge and what location in memory must they be placed at? A $02D) CBM80 at $8004. The letters must have bit 7 set. So, the actual PETSCII codes are 195, 194, 205, 056, 048. $c3, $c2, $cd, $30, $30 in HEX Q $02E) What is the correct Commodore technical term for "Sprites"? A $02E) MOBs, or Movable Object Blocks. Q $02F) (Three parter, all parts must be correct) "Push-wrap-crash" is a nickname for a condition that can lock up an old-style C=64. What causes it? How can it be avoided (besides not doing it)? What is the only way out once it has occured (besides rebooting)? A $02F) Wow, I got so many responses to this! This question actually dealt with a typical user, but people sent in descriptions of what the code does and how to patch it. So, there are two sets of answers to this: User Answer: 1) If you put the cursor at the bottom of the screen and type 82 characters (not 81) and then trying to delete back to the 78th one. 2) Any of the following will work: Do not use the following colors for the cursor: red, blue, yellow, light red, dark grey, light blue, light gray. Some people devised a IRQ wedge that will recover from the lockup. Have the following lines as the first lines of a program: 10 open 15,8,15 20 input#15,a$. 3) There are actually two ways to recover. They are: If you have a reset button installed on the 64, reset the machine, then load and run an unnew program. (I accepted this, but I figured most people would assume this much) If you have a tape drive installed, press either Shift-3 or move a joystick installed in Port 1 in the UP direction. Then, respond to the directions on the screen "PRESS PLAY ON TAPE". Next, press RUN-STOP to stop the tape load. What really happens: (I can't prove this) 1) The user types the line of text and the scroll code is invoked. The first two lines become linked as one logical line, and the third line is treated as a new line. The user deletes the 82nd and the 81st character and then hits delete while in the first column of the third line. Since the delete will put the cursor back up into the second line, which is linked with the first, the KERNAL gets confused and thinks the second line is at the bottom of the screen. Remember, the "cursor" is actually constructed by a combinations of using reverse characters and changing the color RAM nybble for that screen location. Thus, when the cursor gets "erased" from the first column of the last line, the KERNAL thinks the color nyble for it is at $DC00, which is 40 bytes off from the actual position. $DC00 is actually Port A for CIA #1, which is where the kernal writes the column of the keyboard it wishes to scan. Because the KERNAl is messed up, it puts the color nybble for where it thinks the cursor was into this location. (That is why there is a connection between cursor color and this bug