MEGA65 / mega65-core

MEGA65 FPGA core
Other
239 stars 84 forks source link

Get rid of charset WOM area and make it a ROM mirror #676

Closed lydon42 closed 1 year ago

lydon42 commented 1 year ago

Currently the freezer has no way of reading the current charset, and as such the charset can not be frozen.

@gardners suggested that I ask him to replace the WOM charset region by a mirror of the ROM charset instead...

I am oblivious to the consequences of that :)

@gardners adds: make mirror area ignore write protect on the ROM, so that the charset can be modified.

dansanderson commented 1 year ago

Please also consider this alternate proposal I filed a month ago: https://github.com/MEGA65/mega65-core/issues/667

lydon42 commented 1 year ago

Test looks good, works well!

dansanderson commented 1 year ago

@gardners Can you summarize the accepted change? This issue's title implies that writing to what used to be the char WOM area now overwrites the CHARC region of chip RAM (with write-only protection ignored). If that's true, that would have some significant backwards incompatible consequences. The BASIC 65 FONT command copies one of the three charset ROM regions to the charset WOM. If writing to charset WOM actually overwrites charset ROM C, then FONT C would no longer restore the original FONT C after FONT A/B or CHARDEF. It would also mean that there's no pristine copy of the PETSCII charset in ROM anywhere after any writes to the charset WOM region, so ML programs that write to charset WOM can't restore it either.

If we went a different way, I'd like to understand it so I can update the Memory chapter.

lgblgblgb commented 1 year ago

@dansanderson @gardners I'm interested too ... As far as I know, the situation: the "char ROM" inside the "usual" ROM (which would have been used by C65) does (did?) not do anything at all. The real thing was the "WOM" (Write-Only-Memory). As far as I guessed, the change only is making the WOM readable (but still no connection between the "WOM" and the 128K's ROM content, and no change there), thus shouldn't be called WOM anymore :) So the "main ROM" is not affected at all. But this is only a guess of mine.

lydon42 commented 1 year ago

The change is that the FREEZER can read the WOM, making freezing it possible.