Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Writing to Retro Replay RAM
2012-10-06 11:54
Frantic

Registered: Mar 2003
Posts: 1628
Writing to Retro Replay RAM

Howdy cartridge hackers!

WARNING: Before reading the rest of this message, keep in mind that I am trying this in VICE (woooot!) rather than on the real thing, because the real thing is unavailable for me for a week or two, so I can't test it properly on real hardware. It is therefore entirely possible that the problems I have are due to VICE, and not the real hardware. If so, please bear with my lameness. :) ...although if that's the case, it is certainly something that should be fixed in VICE.

Anyway, here we go:

I am fiddling around a bit with Retro Replay code, this time trying to understand how to make use of the Retro Replay RAM. If I map RR-ROM to $a000 and RR-RAM to $8000, and select the REU-compatible memory map, then I can write a value to e.g. $de02 and then read this value back from $9e02. Likewise, if I select the Standard memory map, I can write a value to e.g. $df00 and read it back from $9f00. So far so good. But then the real issue comes... Writing a value to $8000 and then reading it back from $8000 doesn't work. Doesn't matter if I use the REU compatible mem map or the standard mem map. The value read does indeed come from RR-RAM (seems so at least, judging from what the vice monitor tells me), but the value that was written to $8000 ends up in C64 RAM rather than RR RAM, so nothing is actually written to RR RAM... How the #"$∞@!!" do I *WRITE* to other regions of RR-RAM than the small little slice of RAM which you can access through the IO area ???

I have an old chat log from a chat with CountZero where he said that there are "some serious issues" with the config where RR-RAM is at $8000 and RR-ROM is at $a000, but at the time of our chat he couldn't remember exactly what sort of issues that was. Perhaps it was precisely the issues I have now stumbled upon, as described above? If so, are there any other ways of *WRITING* to RR-RAM which allow you to make use of the whole RAM segment ($8000-$9fff), and not just the single page accessible through the IO area? If not, it seems to imply that most of the RAM in RR is actually useless because you can't write to it?? (Maybe you can write to RR-RAM if you turn on ULTIMAX mode, but that doesn't count, since that takes away most of C64 RAM instead. :)

Fiddling with the AllowBank bit (bit 1 in $de01) doesn't seem to change anything either (except for its intended function of either allowing, or not allowing, access to RR-RAM banks other than Bank 0), so it doesn't seem to be relevant to my problem.

...or is this just a problem with VICE? :)
2012-10-06 18:27
Frantic

Registered: Mar 2003
Posts: 1628
EDIT: nothing
2012-10-06 19:07
Graham
Account closed

Registered: Dec 2002
Posts: 990
AFAIK Ultimax mode is required for write access to RAM.
2012-10-06 20:27
Frantic

Registered: Mar 2003
Posts: 1628
Hmm... That would certainly explain my troubles. However, in this thread:

http://www.lemon64.com/forum/viewtopic.php?t=37254&sid=fd13b5e4..

Stingray writes:

"As far as I know, all the clones (Retro Replay, MMC replay etc..) require that ultimax mode be entered before writing to the on board RAM (can someone confirm this?)."

Which is, of course, just what you are saying, but then CountZero replies:

"No, this cannot be confirmed and is untrue. The RAM can directly be accessed given that the cartridge is enabled. (How else would the test program otherwise access it?)"

If C0 refers to the small piece of RAM to which you can write through the IO area, then... sure. ...but if not, then I guess the question remains open as to how it would be possible to write to RR RAM without going ultimax...
2012-10-07 04:51
chatGPZ

Registered: Dec 2001
Posts: 11135
you indeed have to work around that problem somehow when writing code.... the usual solution is to have a bit of stub code (eg pushed to the stack, or mapped into i/o area) and then either temporarily switch to ultimax, or toggle the mapping of the ROML area so you either dont destroy, or can save/restore the C64 ram content.
2012-10-07 20:10
Frantic

Registered: Mar 2003
Posts: 1628
Okay then! Explains my problems, as said. Case closed I suppose.

Cheers!
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Menace/Spaceballs
DeeKay/Crest
Harry Potthead
Didi/Laxity
kbs/Pht/Lxt
controlport2
Kakka/Extend, Damone..
DeMOSic/HF^MS^BCC^LSD
CreaMD/React
chronos/Therapy
Guests online: 113
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 MWS  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.04 sec.