|
Post by DarkKobold on May 10, 2018 17:47:13 GMT
So this works:
But I need something closer to this, but it doesn't work:
Obviously, the end code will be more complex than what is shown. However, it'd be most advantageous to use something like this. Can I not point to a part of the ROM?
|
|
|
Post by Arkhan on May 10, 2018 17:52:28 GMT
Just out of curiosity, what does it do when you try it?
I don't know exactly how HuC handles pointers because it did weird shit with them in the first place IIRC.
but, assigning a const char * to an int * is already going to be strange.
I thought memcpy was an available option? you can just use memcpy if it's there.
|
|
|
Post by DarkKobold on May 10, 2018 17:59:03 GMT
Hah, yeah, I totally didn't notice that [-i-] turned into italics. I usually use i and j as my default counting variables! Oops!
|
|
|
Post by theoldman on May 11, 2018 6:24:22 GMT
Yeah, ptr should be char *. You can also get away with ptr=map1;
If you are trying to do this with HuC, I wish you the best of luck. As arkhan said, there's something wrong with them. It's not as simple as you may think, because the memory mapping may cause them to disappear from the CPU space.
Which really sucks. I miss (*f)( x, y );
|
|
|
Post by DarkKobold on May 14, 2018 20:39:53 GMT
|
|
|
Post by theoldman on May 14, 2018 22:30:17 GMT
Check those functions carefully. Note that they require a far pointer, and do a 'fixup'. Let us know what you find out about far pointers. I understand the idea behind them, but have never used them. I'd especially like to know how to get the page/bank in HuC, or even if HuC fills it in automagically....
|
|