Login
Back to forumSee the full topicGo to last reply

Posted By

JamesC
on 2014-01-27
23:45:36
 Re: V364 / 264 between +4 / 16 between 116 ROM checksum differencies - are there any?

I think you're overthinking the 264 series.

Imagine an empty egg carton, one that holds 8 eggs in a 2x4 rectangle. Arrange the carton so that you have two rows, four spaces per row. Now number the columns 0 through 3:

0H 1H 2H 3H
0L 1L 2L 3L

This is how ROM is arranged in the 264 series -- two ROMS fill one bank. Basic and the Kernal reside in Bank 0 slots Low and Hi. The 3+1 software (if present) resides in Bank 1 slots Low and Hi.

A game cartridge (such as a Scott Adams adventure) would reside in Bank 2 Low since it fits in 16k, while a larger cartridge (such as Script/Plus or LOGO) would reside in Bank 2 Low and Hi.

On the V364, the speech ROM resides in Bank 3 Low.

So to answer your first comment: there's no *single* ROM to calculate a checksum for! If you want to be complete, you need to bank in the various configurations and check for the presence of a ROM.

I'll give you some shortcuts. Not as thorough, but you can make basic assumptions this way. happy

PRINT PEEK(1332) to get the Top Of Memory pointer for Basic. 63 = 16k system, 127 = 32k system, 253 = 64k system.

You *only* need to test for 3+1 if PEEK(1332) returns 253. PRINT PEEK(1525) will return 162 if 3+1 is installed (probably a Plus/4) or 0 if not installed (most likely a 264 or V364). Other software in Bank 1 ROM could return other results, but since Commodore never released 264s with other software in Bank 1, I would consider this possibility a customized machine. wink

If PEEK(1332) = 253 and PEEK(1525) = 0, then you can test for a V364 by checking the reserved variable RDY. -1 if speech is present, 0 if not present.

Checking the Kernal release number (rather than calculating a checksum for Basic and Kernal) requires 3 commands. Do them exactly in this order, DO NOT ADD ANYTHING BETWEEN THE POKES.

63000 POKE 1177, 62
63010 KR = PEEK(65408)
63020 POKE 1177, 63
63030 PRINT KR

KR will contain a number between 1 and 5 on an NTSC machine, or between 129 and 133 on a PAL machine. (Meaning: bit 7 high for PAL, bit 7 low for NTSC, the lower bits are the Kernal version.)

You can presume that if you detect 16k and KR < 128, you're on a Commodore 16 (sold in North America). 16k and KR > 128 only means you're in PAL-land, both the 16 and 116 were sold in Europe.

I have no idea if there is any major difference between Kernal versions, all my machines have Kernal 5. If you look around this site for SVS's Ultimate ROM Map, I'm sure SVS documented the Kernal changes there. happy



Back to top


Copyright © Plus/4 World Team, 2001-2024