#91507 - thegamefreak0134 - Fri Jul 07, 2006 5:24 pm
Hello all. (been a while, no internet.) I have been working on the basics for a regular old GB emulator, just to brush up on the skills so I can work on something much more challenging, like the DS. Anywho, a whole three supported opcodes in, I am starting to have concerns.
The GB has the wierdest memory management I've ever seen. (remember, it's the only one I've seen as well.) All memory is accessed through one 16-bit number from 0000 to FFFF, but certain areas of it represent cart memory, certain areas of it represent external RAM/accessories. Also, there are lots of areas that represent registers, and many of those can only be accessed at certain times or cannot even be accessed at all.
The cart memory I think I can handle alright by putting a catch in there that checks any memory requests and simply loads the appropriate cart location (or writes it) instead. My real concern is how to go about enabling/disabling different parts of the memory. I realise that most games will check the appropriate registers and avoid this anyway, but it still needs to be done.
I am in Visual Basic .NET, which I have concluded will be more than fast enough for the job. I also have a lot of the main things like video routine and such covered, and a nice fast system for finding and eecuting the proper commands. What I need to know is, from experience, what is the best way to either block memory from changing, (in an array, mind you) or quickly copy it out and replace it. I do not yet kno how to overwrite only a part of an array without a loop of some sort. Any help here would be greatly appreciated.
-gamefreak
_________________
What if the hokey-pokey really is what it's all about?
[url=http:/www.darknovagames.com/index.php?action=recruit&clanid=1]Support Zeta on DarkNova![/url]
The GB has the wierdest memory management I've ever seen. (remember, it's the only one I've seen as well.) All memory is accessed through one 16-bit number from 0000 to FFFF, but certain areas of it represent cart memory, certain areas of it represent external RAM/accessories. Also, there are lots of areas that represent registers, and many of those can only be accessed at certain times or cannot even be accessed at all.
The cart memory I think I can handle alright by putting a catch in there that checks any memory requests and simply loads the appropriate cart location (or writes it) instead. My real concern is how to go about enabling/disabling different parts of the memory. I realise that most games will check the appropriate registers and avoid this anyway, but it still needs to be done.
I am in Visual Basic .NET, which I have concluded will be more than fast enough for the job. I also have a lot of the main things like video routine and such covered, and a nice fast system for finding and eecuting the proper commands. What I need to know is, from experience, what is the best way to either block memory from changing, (in an array, mind you) or quickly copy it out and replace it. I do not yet kno how to overwrite only a part of an array without a loop of some sort. Any help here would be greatly appreciated.
-gamefreak
_________________
What if the hokey-pokey really is what it's all about?
[url=http:/www.darknovagames.com/index.php?action=recruit&clanid=1]Support Zeta on DarkNova![/url]