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 > Reliable REU detection
2023-10-26 04:26
Fungus

Registered: Sep 2002
Posts: 752
Reliable REU detection

I've been struggling with this for days. I can detect any REU size except 256K.

From what I understand, I should be able to write data to bank 4, and read back and get crap instead, but I'm getting valid data back.

I don't know if this is a problem with the real thing or a vice issue.

Doesn't anyone have a SIMPLE way to check this, most routines I've found are overly complex for such things. Either the memory is mirrored, or its open bus. It can't be both.
2023-10-26 13:55
tlr

Registered: Sep 2003
Posts: 1814
Quoting Fungus
Doesn't anyone have a SIMPLE way to check this, most routines I've found are overly complex for such things. Either the memory is mirrored, or its open bus. It can't be both.

It has to be either of those for a given REU implementation yes. You don't know which though. For a stock 256KiB REU it is supposedly open bus for the upper 256KiB of an 512KiB address space.

If confused, I would recommend scanning whatever REU implementation you want to target to see which areas are mirrors and which are unmapped. This way you can decide on how to proceed.
2023-10-26 14:08
chatGPZ

Registered: Dec 2001
Posts: 11523
And... there is no SIMPLE way :) That's why so many detection routines "out there" are broken (even the one on codebase is problematic, unfortunately)

Also, when testing, make sure to really test on actual REUs. Not some reimplementation like that on 1541U - those are all broken one way or another. (recent VICE should be somewhat correct, except for some very obscure timing quirks that don't matter for this)
2023-10-26 18:28
Fungus

Registered: Sep 2002
Posts: 752
Yeah, I've decided it's just too much bother to support something that is effectively broken.

Good ole commodore engineers.
2023-10-26 18:34
chatGPZ

Registered: Dec 2001
Posts: 11523
Its not "broken" at all

edit, for the records - MacBacon provided a working one (and i replaced the buggy one on codebase) https://codebase64.org/doku.php?id=base:reu_detect
2023-10-27 10:25
Trash
Account closed

Registered: Jan 2002
Posts: 122
If all banks are mapped but not there, write a single byte (starting with 0) to address 0 in each bank, count that value up by one and then read back address 0 from the first bank, it should contain 0 on a 16mb reu, 128 on a 8mb reu and so on.
2023-10-27 11:00
Mr. SID

Registered: Jan 2003
Posts: 425
Quote: Its not "broken" at all

edit, for the records - MacBacon provided a working one (and i replaced the buggy one on codebase) https://codebase64.org/doku.php?id=base:reu_detect


Yes, this seems very similar to the method I use in Sonic, which I've tested on everything and the kitchen sink (except TC64).
2023-10-27 11:24
Fungus

Registered: Sep 2002
Posts: 752
Thanks I've had a look at it. Although as I said if a bank has a floating bus, I should be able to detect that as is. I'm not sure what the error is, but I'll try again later.

Trash: That's what doesn't work, that was the first thing I did.
2023-10-27 14:26
chatGPZ

Registered: Dec 2001
Posts: 11523
The nice thing with this method is that it works right also on broken implementations (which mirror bank 4-7 in 256k REU)
2023-10-27 19:09
Frantic

Registered: Mar 2003
Posts: 1661
Quote: Its not "broken" at all

edit, for the records - MacBacon provided a working one (and i replaced the buggy one on codebase) https://codebase64.org/doku.php?id=base:reu_detect


Thanks!
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
iAN CooG/HVSC
E$G/HF ⭐ 7
Pac
VanessaE/Digital Aud..
Conjuror
Guests online: 460
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Codeboys & Endians  (9.7)
4 Mojo  (9.6)
5 Coma Light 13  (9.6)
6 Edge of Disgrace  (9.6)
7 Signal Carnival  (9.6)
8 Wonderland XIV  (9.5)
9 Uncensored  (9.5)
10 Comaland 100%  (9.5)
Top onefile Demos
1 Nine  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.5)
6 Scan and Spin  (9.5)
7 Onscreen 5k  (9.5)
8 Grey  (9.5)
9 Dawnfall V1.1  (9.5)
10 Rainbow Connection  (9.5)
Top Groups
1 Artline Designs  (9.3)
2 Booze Design  (9.3)
3 Performers  (9.3)
4 Oxyron  (9.3)
5 Censor Design  (9.3)
Top Original Suppliers
1 Derbyshire Ram  (9.7)
2 Black Beard  (9.2)
3 Baracuda  (9.2)
4 hedning  (9.1)
5 Irata  (8.8)

Home - Disclaimer
Copyright © No Name 2001-2025
Page generated in: 0.41 sec.