mist64/c64ref

A few small errors in c64disasm_en.txt

skoolkid opened this issue · 2 comments

Recently noticed a few small errors in c64disasm_en.txt. First, at A8E3:

.,A8E3 A2 11    LDX #$02

This instruction should be LDX #$11. Next, at E4CF:

.:E4CF AA AA AA AA AA

There should be only 4 bytes on this line, not 5 (the next instruction is at E4D3). And at EA14:

.,EA14 A9 02    LDA #$02set the count to $02, usually $14 ??

The comment needs nudging over to the 33rd column.

I also noticed that the instructions at E4DA and E621 are LDA $D021 and JSR $E6ED, whereas in a disassembly I've been working on, I have LDA $0286 and JSR $E591. However, I understand that these could just be mistakes in the memory dumps I have, or a difference in ROM versions.

To the point about those LDA and JSR addresses: of my not-huge collection of real C64's, the one whose Kernal ROM is most like the listing does indeed have the $0286/$e591 addresses like @skoolkid's. (FWIW, outside of these, it's different from the repo's listing by just one other byte: at $e4ac, mine says $81 instead of $5c, though my other machines do have a $5c there).

However, I do have a couple machines which really do use those $d021/$e6ed operands shown in this repo's listing (but have significant other differences). I haven't looked into the consequences of the $e591 target (the listing shows it as a patch for a bug in earlier ROMs, so looks legit), but the $d021 is a quirk that caught me by surprise on real hardware, which causes the screen to be cleared with the background color instead of the cursor color. (So... doing a POKE 1024,0 on this ROM, you don't see the @ at the top-left of the screen unless something was drawn there already. I wouldn't call it a bug; it's just different).

If I take an md5sum of the byte stream shown in the listing, then Google it, I don't see any hits. But my one that's only five bytes different seems common enough (39065497630802346bce17963f13c092), so my guess is the listing shows either a rare ROM, or one that's been pieced together from bits of other ROMs. Either way, the differences seem harmless.

(And you're right: at $a8e3, the raw hex byte is correct, not the disassembly. It's an LDX #$11 on all of my machines, and if it was an LDX #$02, you'd get a ?FILE OPEN ERROR on GOSUB'ing a nonexistent line, so this is definitely a transcription error.)

Thanks for the info, @luxocrates. I too was using the ROM with md5sum 39065497630802346bce17963f13c092. Glad to know the differences at E4DA and E621 weren't just an artifact of SkoolKit (the disassembler I was using)! 😌