Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo
Torero wrote:When is MHS dbg going to live, and should I learn another dbg before you release yours ?
if so can you recomment one for me, as I am trying to learn as much as I can as fast as possible.
Will it be ok if I rely on MHS completely when everything is done?
When do you expect new MHS to reach 1.0 ?
Torero wrote:How do I learn which module of which process is where?
esco wrote:Why is it that when I use \n (newline) in my code, in a PrintF statement instead of going down one line, it just prints a square character?
esco wrote:What can I use to clear the entire text box, before the info is printed to the screen each time?
esco wrote:Yet the code doesn't work. SO I put in a PrintF statement that prints out the value of count
esco wrote:LASTLY, something I wanted to point out.... Are you aware that printf must be used as PrintF (capital P and F) to work or it gives a script error?
I was also wondering, since you said it supports some C++ features, are you ever planning on making it support most (if not all) c++ syntax as well?
L. Spiro wrote:I was also wondering, since you said it supports some C++ features, are you ever planning on making it support most (if not all) c++ syntax as well?
No.
People underestimate how much of an addition over C C++ is.
C++ adds classes over C. So people imagine C, with a bit of C++ added on top.
In fact, simply by adding classes, templates, and operator overloading (required for your cout and cin), C++ becomes an addition 5 times the size of the original C, making the language altogether 6 times larger.
Had I decided to implement C++ into the language, I would simply never be able to finish.
Besides, I really hate cout and cin. The syntax is ugly.
L. Spiro
.......... WRONG! I get home, download the emulator and try my code, and guess what..... for some reason... the memory addresses for everything are DIFFERENT NOW!
So alright then... I reboot and try it several times... same addresses come up as last time. I reboot and retry several times... addresses stay the same. So it's not DMA, since it doesn't change every time.
This emulator is still being updated constantly
Ex. let's say I choose 7750000 which holds the address 1cd0510.
so I do this
extern LONG base = { "", 0x7750000 };
//assigns subchoice mem address 1cd051a
extern SHORT subchoice = { "", base + 10 };
This of course requires me to convert every address to long and then do some subtraction. Where as if I could just do this DIRECTLY with the memory address in hex format, it would make things quicker.
So how can i declare a variable to return the value in hex format.
I know this is declaring a structure
declaring 2 variables... and it looks like the top one is for adding A, but... why is the address it's pointing to just A? How does this add anything at all? And what is this variable supposed to stand for, I can't tell by the// name (buffer)
why is this thing multiplying? And what is it? It doesn't look like a var declaration?//
struct MYOBJECT {
BYTE bBuffer[0x0A];
SHORT sSubChoice;
};
extern MYOBJECT * e_lpObject = { "", 0x7750000 };
?????? I have no clue what this does.. why would 3 be assigned to sub choice?
e_lpObject->sSubChoice = e_lpObject->sSubChoice + 2;
e_lpObject->sSubChoice -= 34;
SHORT sNewThing = e_lpObject->sSubChoice;
struct GAMEDATA {
BYTE bBuffer[0x10299b4];
SHORT rooms;
};
extern GAMEDATA * address = { "", 0xad2dcc };
VOID lock ()
{
PrintF("Rooms= %d", address->rooms);
}
extern LONG address = { "", 0xad2dcc }; //190000
extern SHORT rooms = {"", address+26658688};
VOID lock ()
{
}
what is the point of these other things? Do they help my code run better?
Also since I'm gonna have SO many variables that I'm gonna have to do this for, wouldn't eat be easier to read and take less effort just to use my above idea with longs? Or am I missing something here?
When I try this I get an error: Array too large. So I guess that idea is going out the window, unless you have some kind of suggestion? And that is the CLOSEST static address I could find to the area I will be editing.
And when I try my technique (which probably sucks, lol):
…
I get this error IF I use rooms as a global....
ERROR: Pos: 93 Code emition failed! File: (null)
ERROR: Pos: 93 Unable to set the initialization data for “extern” global “rooms” (error evaluating second initializer). File: (null)
....but if I declare rooms it under lock it works fine. Of course then it's not global and I have to declare it in each function it is used in. Which means of course that I am screwing up AGAIN somehow.
Return to General Related Discussions
Users browsing this forum: No registered users and 0 guests