Clear entire Ram from E00000h to 0, then put a 1 at E00000h
if (*pointer != 0 && pointer == 0)
{
pointer = pointer +2;
Ramcapacity ++;
}
return Ramcapacity;
Pseudo C but it's something like this...
I liked that 256byte chunk idea...
![Wink :wink:](./images/smilies/icon_wink.gif)
Moderator: Mask of Destiny
Most people skip 1K or more at a time. Even on the SEGA, I can see skipping 64K at a time. You won't have less than some multiple of that.Stef wrote:3mn for RAM checking ???Jorge Nuno wrote:Can you wait for 3 minutes? Unless you tell me a better way of testing how much RAM is available
...
Also I've just uploaded a new version, it should be a little faster in the initialization...
Can't you just test one byte each 256 bytes of the memory map ?
If you have RAM, you can assume the block size is at least 256 bytes
Sorry for posting so late, it did work on my MD, but sounded like shit, kind of like in Gens.Stef wrote:Does it work on real hardware ? my first attempt worked on emulators but failed with real hardware :-/TmEE co.(TM) wrote:Stereo sample player for MD : http://www.hot.ee/tmeeco2/SWAVPLAY.RAR
TmEE co.(TM) wrote:Sorry for posting so late, it did work on my MD, but sounded like shit, kind of like in Gens.Stef wrote:Does it work on real hardware ? my first attempt worked on emulators but failed with real hardware :-/TmEE co.(TM) wrote:Stereo sample player for MD : http://www.hot.ee/tmeeco2/SWAVPLAY.RAR
And Jorge, this does not work at all on any of my MDs... I waited several minutes, but nothing...
Then you better check for mirroring. If someone adds a 256K byte RAM, but decodes it into an entire 2 megabyte space, your method will see 2 megabytes.Jorge Nuno wrote:No it's just to detect any extra RAM that anyone might add to the console... I might make use of it for some more complicated features
Code: Select all
CLR.b $A10009
Code: Select all
MOVE.b #$40, $A10009
Code: Select all
Check: BTST.b #1, (a6)
BEQ.s Check
Code: Select all
CLR.w VDPdata
BEQ.s Check
;************************************************
;* Paletas *
;************************************************
IntroP0:
dc.w $0000 ;Cor do fundo
dc.w $0666 ;Cor das letras
My method detects 65536B in the emus, instead of 2MB so I assume it's the way to go8bitwizard wrote:Then you better check for mirroring. If someone adds a 256K byte RAM, but decodes it into an entire 2 megabyte space, your method will see 2 megabytes.Jorge Nuno wrote:No it's just to detect any extra RAM that anyone might add to the console... I might make use of it for some more complicated features
If you write one value to the address in question, and write a different value to a mirrored address, the original value will change. Detecting memory size is more complicated than just keep walking until it stops remembering what you poke into it.