Hot answers tagged

28

Internally, a BASIC program isn't represented as the text you see when you list it, but as a tokenized data structure where each of the language keywords are represented in an optimized 1-character form. Basically, if the upper bit is set in a character byte (i.e. values >= 128/$80), it is processed as a token. Note that this does not only apply to the ...


22

Simple reason: Commodore had an overstock of 2114 Chips at that time (*1), so Jack Tramiel, then president of Commodore, ordered the project (*2) to use them. Yeah, but why 5 KiB? Why not just 4KiB? Due the nature of the 6502, RAM is needed at address 0, while the way the 6560 VIC (*3) was addressed called for RAM at $1xxx. So with a continous memory of 4 ...


20

C64 Basic used a CR as EOL for disk files. (source: Commodore SX-64 User's Guide, page 22: “CR stands for the CHR$ code 13, the carriage return, which is automatically PRINTed at the end of ever PRINT or PRINT# statement … ”, and verified by hex dump of disk image showing 0x0d at line end.)


18

The Fix for cc65 This was discussed in cc65 issue #946 and fixed by cc65 PR #965. That was merged to the master branch on 2019-10-26, and should appear in V2.19 of cc65. (I don't know when that release will happen, however; it's been five months since the last release.) It is, however, quite easy to do your own build of cc65 if you want to use the master ...


18

VIC-20 vs VC20 (or VC-20) In all original documents only VC20. Often stylised with the C as the commodore logo "C=". The intended naming was always Commodore<space>VC20, like written on the machine as well (*1). My 1st computer was a VC20. Anone knows if it was just renamed (for German market?) as a VolksComputer? The most told story is ...


16

What I don't understand is why this quirk exists and how it works. As usual, lousy programming. It's a routine that exists in next to every Microsoft Basic, but often modified by the receiving company. It's used to list a line. On the 6502 version space was a premium, so they tried to cut down as much as possible in tests. And lets be serious, a 'real' ...


14

BASIC games that use no memory specific code can be ported between different commodore machines. (I did some successfully between PET and C64). Machinecode games could be transferred between some commodore machines if they were written to be portable. I never seen such programs but I found in this wikipedia artikel the following: "The Adventure ...


12

You cannot do that on the VIC-20; not only is no such feature provided by the built-in hardware but there's also no ROMDIS signal on the memory expansion bus or anything else similar. PETs with a 64kb upgrade have a register at $FFF0 for memory selection that allows the ROMs to be paged out (see e.g. "2.2 Control Register" in this document — the 8096 is an ...


12

You're correct; the only interrupts on offer in a Vic-20 are those from a VIA — they're plain old 6522s in the Vic-20, not 6526s. The original VIC chip exposes the current scan line via a couple of registers so instead you'd perform a busy loop until it got to the number you wanted, then cue the VIA. I'm not a C64 expert but besides the lack of hardware ...


10

SD2IEC SD2IEC is a free software which turns an ATmega644 microcontroller into an emulated VC1541. It attempts a near-complete emulation (I think REL files aren't implemented, but nearly noone ever used them.) The emulation also supports some common fastloaders, most prominently that of The Final Cartridge III. You store .d64 disk images onto a FAT ...


9

I thought the RS-232 port on the Vic-20 was completely separate from the cartridge port, so a thing had to be plugged into one or the other, and if the modem was plugged into the latter then it could not use the former. What am I missing? Or better what is mixed up. The device (Serial IEC) bus is often called a serial port, but that one was driven by VIA#2 ...


9

Pi1541 Pi1541 is a real-time, cycle exact, Commodore 1541 disk drive emulator that can run on a Raspberry Pi 3B, 3B+ or 3A+. It's a Raspberry Pi hat and some specialized software that emulates the 6502 CPU as well as the two 6522 VIAs of a real Commodore 1541 floppy drive. It emulates the whole disk drive so floppy speeders or any other specialized ...


9

First note that in "real" retro computers the amount of address lines on a memory chip is generally much lower than the address lines the CPU has. This means that you won't be able to "fill" the CPU's address space without using some more logic, and, obviously, multiple memory chips. Beyond its address and data lines, every memory chip has some more control ...


8

The answer by @Raffzahn is close, but it has at least one important detail wrong: the total length of the token names has nothing to do with it. The following facts all all relate to the issue. Commodore Basic (any Microsoft Basic really) stores programs in a tokenized form in memory. That means here that all Basic keywords are replaced by a single byte, ...


8

I'm not really sure how this question is meant, so this is maybe less of an answer as an attempt to understand the question first and answer accordingly. If I attach a 16 KiB EEPROM to a 6502 or similar, and put some kind of operating system on it, it will run fine, but won't have access to any other form of memory. You may still need logic to assign the ...


8

As Raffzahn points out, unfortunately you can't "adjust" the OS; you need to replace KERNAL code to have a different number of screen columns work mostly as expected. So while there are demos out there such as Big One (s).prg and Big 2.prg (PAL version), which are nice to look at, they don't help when you actually want to program using such a screen. (They ...


7

Monte Davidoff's floating point routines for early Microsoft BASIC used Chebyshev Modified Taylor series for EXP(x). There's a very helpful disassembly of the TRS-80 MC-10 ROM here: http://www.roust-it.dk/coco/mc10/romlist.txt. It's 6800 assembly, and the whole commented routine (using the same constants) is: TBLF59B FCB $81,$38,$AA,$3B,$29 ;1.44269504 (...


7

Here are the answers of which I am aware, and I know there are others: https://jammingsignal.com/commodore-wi-fi-modem/ Schema's WiFi modem. Connects via the user port. Has a TFT display, and you connect to WiFi using Hayes-modem-like AT commands. http://www.lemon64.com/forum/viewtopic.php?t=65312 C64net WiFi modem from Central Texas Commodore Users' ...


7

It seems that Michael Steil at pagefault.org has recently posted an analysis of the KERNAL calls from all of the Commodore 8-bit machines to try and track lineage. However, what is relevant here is the table he includes near the bottom of his blog post that shows which vector entries are safe for which platforms. The result of his findings is that only the ...


7

The VLOW signal on Pin 4 of the VIC-20's monitor port has a low-pass filter applied to it, where Pin 5 (VHIGH) is not filtered. See this post, which specifically says: Then the signal is buffered by emitter follower Q7, with a 270 ohm load and fed to pin 5 of the video socket directly and to pin 4 via 3.9uH inductor L2 and C18 which together form a low ...


7

If the contents of the Scott Adams' adventure cartridges for the VIC-20 are loaded into the same addresses on the Commodore 64 and executed, the games will behave on the C64 just as they do on the VIC-20 except that screen formatting will be a little wonky. If exactly 22 characters precede a line break, the next line will appear appended to the first (since ...


7

The dongle for the PaperClip word processor plugged into joystick port 1. It read bits 0 and 1 from the dongle and wrote bits 2, 3 and 4 to control it. Keyboard interference probably wasn't an issue with this use case.


6

Fax machines used to use thermal paper by the pallet, and it is still commonly available wherever office supplies are sold (including amazon). While this will be wider (not, as the problem is with the cash register rolls, narrower) than what these vintage printers need, this problem can be fixed with a guide and a sharp knife (and in the worst case re-...


6

The VIC-20 has 1K of low memory ram containing room for the zeropage, the stack and kernal and basic working areas. ($000-$03FF) and 4K of main RAM ($1000-$1FFF) so the main ram is a multiple of 4. see memory map


6

Is it possible to adjust the actual value for rows and columns for the OS without the need for reimplementing the CHROUT function? Simple Answer: No, you need to write a 'driver' and have it hooked. Background: While the Kernal does have attempts to support size independent operation, like with the SCREEN call at $FFED, returning screen size in X/Y to ...


5

There is a series of cable variants called X1541 collectivly, which have been used as an adapter of the PC parallel port (when PCs still had an parallel port) to the Commodore IEC bus interface. This made it possible to connect a Commodore disk drive to an IBM PC, and also to emulate a Commodore disk drive by connecting the Commodore computer to the PC. ...


5

The Compute's Gazette Disk menu used raster tricks to set the background color on a per-line basis, and the Demon Attack cartridge used a black character color as the "apparent" background while it changed the background color every scan line to achieve colorful demons like the Atari 2600 version. My recollection is that the Compute's Gazette menu did not ...


5

DAC is a digital analog converter. There is no such periphery on C64, but the closest to it is the SID chip, for playing sound. Also the SID chip was not designed for that. It can play ADSR (attack-decay-sustain-release) sounds with 4 pre-configured waveforms: This can be hacked to work like a DAC. It can only 16 signal levels, but it is enough to produce ...


5

It was just renamed — the hardware was identical to other PAL machines being primarily a 6502, a 6561 (the PAL version of the 6560) and a small amount of static RAM. The C-1540 was similarly rebranded as the VC-1540 in Germany, and the C-1541, which is just a ROM swap of the 1540, was originally the VC-1541.


4

4 3/8 inches is 111.125 mm. A Google search for the Swedish term termopapper (thermal paper) 110mm gives me at least four hits on the first page alone for online stores that sell such paper. While none of those four appear at a glance to state whether it's in stock or not, it's clearly possible to procure. They even appear to offer different core diameters, ...


Only top voted, non community-wiki answers of a minimum length are eligible