L System 256 colour demo + screen transitions

Robert

Newbie
Credits
29CR
Now I'm not so sure...

all I can suggest is to compile such a build by including "DEBUG=1" on your make line, and see what happens.
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
Ok, so today I compiled a debug build of MAME. There's definitely no way (that I can see) to fill ram regions with random values, even with a debug build. It is possible (with a debug build) to fill rom regions with random values IF the rom size is greater than 4MB AND IF ROMREGION_ERASExx isn't specified for that particular rom in the driver.

I might shoot a PM to Haze to see if he knows if it's possible to fill ram regions with random data but at the moment I certainly can't find a way to do it and I've been pouring through the source for the past day looking for a way to do it.
 

Robert

Newbie
Credits
29CR
Ok, np, sorry to put you on the wrong track.

If I'd been awake, I could have said to download the debug build from mamedev.org, then you wouldn't have needed to do a compile. The problems of getting old !!
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
No worries.
smiley1.gif


I use OS X so the Windows debug build on mamedev.org won't really do me much good!
smiley2.gif


I sent a PM to Haze on Jamma+ and he replied that he doesn't believe it's possible to enable random ram region filling in the core of the emulator. So now I need to throw myself deep into the MAME source and do it myself. Wish me luck!
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,055CR
cmonkey said:
I sent a PM to Haze on Jamma+ and he replied that he doesn't believe it's possible to enable random ram region filling in the core of the emulator. So now I need to throw myself deep into the MAME source and do it myself. Wish me luck!

Ignoring the subject of random number generation itself, can't you just do this in the driver_init section of the L System driver? Don't take that as an indication that you can, you have way more experience than I will ever have with mame but I was playing around with some drivers two weekends ago which was when I discovered there is now semi up to date documentation on the wiki. I'll take that any day over the complete lack of documentation there used to be.

Anyway, one of the things that I took away was that there was an init section in the driver where you could do things like initialise encryption and things like that. It strikes me that you ought to be able to initialise the memory to a known state (or random state!) in there. Let's face it, the save_state functionality must do just that??
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
It should be possible to do it in DRIVER_INIT, yes. Although to me it really makes no difference if I make changes in the core or the driver as I run an ultra-slim build of MAME which only supports L System games, so making changes to the core memory management functions won't affect any other games as the build of MAME I use for dev work doesn't support any other games! If I was using a build of MAME that still supported other games then I'd be more hesitant to make changes in the core for the fear of potentially breaking the other games (although it's extremely rare I use MAME to actually play games these days as it's purely a dev platform for me now).

There are already functions in NVRAM handling that allow you to initialise NVRAM with random fill values and NVRAM is really just ram at the end of the day, so I'll probably just steal and adapt the routines for NVRAM random init and transplant them into core memory init.

Really though, instead of doing all this, I should tighten up my coding practises and remember to always initialise all ram regions in my code, even if I'm not planning on using them in my latest game/demo. Sloppy coding is sloppy!
 
Top