add checksum

This commit is contained in:
Romain Dolbeau 2025-06-28 10:13:56 +02:00
parent 0773a6d82a
commit 5b657c017f
3 changed files with 9 additions and 2 deletions

View File

@ -4,7 +4,8 @@ This small patch enables the Sun 3/160 memory to recongnize more than 32 MiB of
* "replace1" patches the upper bound of the memory-sizing loop
* "replace2" patches an assumption at one point in the ROM that only 32 MiB is installed. The original test is to check for >=32 MiB and if so, subtract 128 KiB. This replaces the subtraction with a hardwired (32MiB - 128 KiB) value.
* "checksum" replaces the checksum by the appropriate value, which is just the 16 lower bits of the sum of all bytes but the last two (where the checksum lives). This need to be recomputed if the patch is modified
The combinations of both patches is enough that 128 MiB of memory can be specified in the TME config file:
The combinations of those patches is enough that 128 MiB of memory can be specified in the TME config file:
`ram0 at obmem0 addr 0x0: tme/host/posix/memory ram 128MB`
And both the ROM and NetBSD (tested 9.0) will recognize 128 MiB.
And both the ROM and NetBSD (tested 9.0) will recognize 128 MiB.

View File

@ -1,2 +1,3 @@
0x0c5a2, 6, replace1
0x0c60a, 6, replace2
0x0fffe, 2, checksum

View File

@ -7,3 +7,8 @@ replace1:
replace2:
move.l #0x01fe0000,%D5
.section .text.finishedreplace2
.section .text.checksum
checksum:
.byte 0xdf
.byte 0x2a