• Most people probably don't realise this, but this forum has had two editors for a number of years. One is the xenForo default editor, and the other is a custom editor I made years back I called BBCEd.

    All the settings for which editor you use was lost during the upgrade. You can find the setting under Account Settings > Preferences > Editor.

gamemanj
Joined
Likes
0

Profile posts Postings About

  • @Noxid: so about that "3.1 or bust", NICEv3.1 is NICEv3 + load-org-from-file and a bugfix. (As for Windows 3.1 support, hahahano.)
    the actual actual actual actual music loader is at 41BAD0. Trouble is, it only loads from blocks of memory that it loads via LoadResource (this isn't "function to load resource" followed by "function to load from block of memory", it's one function)...
    zxin
    zxin
    Seems ASM is filled with "I found that thing I was looking for! But it does something else entirely..."
    gamemanj
    gamemanj
    Oh, it does what I expected it to do, but it doesn't quite separate the task of "loading the ORG file into memory" from "setting up the player for the ORG file". However, the good news is that the "FindResource/if 0 then fail/FindResource/LockResource" code is long enough to completely replace with a NICE hook.
    Ok, so guns and bullets *DO* have vector tables! I know, it's surprising! Thing is, though, they aren't like the NPC table, where it's a bunch of function pointers. They're jump tables - my best guess is that the compiler optimized a case somewhere (hence the invalid value checks)
    We are really, really blessed that Cave Story doesn't have a relocation table, since there's tons of stuff that Just Wouldn't Work if one existed.
    48F8C0+(eax*4) : effects according to compendium, yet 4047B0 is (very) indirectly called by it? EDIT: Ok, wait, that's a *return* address. So it seems there's a bit of pipelining going on here. 41056E is the call to the AB50 "handle effect" code. The previous thing it calls is 105AB, which is... the bullet code???
    gamemanj
    gamemanj
    Additional. It seems I've gotten a little lost. Here's the gist of it:
    05AB is a routine to handle *every bullet on the screen*.
    AB50 is a routine to handle *every effect on the screen*.
    A bullet is 0x80 bytes long, or a *shift left of 7* - this is important because the compiler optimized what usually shows up as obvious imuls into SHL 7.

    You can learn the bullet length from the compendium, the important part is that from there you find out how the loop is set up.
    The compendium lists the addresses of the *first bullet*. This doesn't quite make sense till you see the actual code, and then it's really useful for translation and understanding.

    (Yes, I'm using this as a journal as I go through the code)

    Next, if ShotID - 1 is > 0x2C, it jumps to a bouncepad which then jumps back to the start of the loop (as if the bullet didn't exist). This code is at 8FFD. This prevents having more than the maximum amount of bullet types - any bullet hook will be placed *there*, since the code is more or less useless (and easily emulated in Lua without using up precious ASMspace). (The bullet disambiguation will get put in C-space anyway, and worst case scenario the InUse flag check can be pulled in for a total of ~72 bytes.)
    gamemanj
    gamemanj
    Warning: offsets may be vaguely wrong if I forgot that the top of the screen in Cheat Engine is actually the top address and not the one I have selected. If you find this information is lacking, that's because it's meant for something *replacing* the bullets.
    jmp [edx*4+409501] is the disambiguator.
    NICE V3 will be tested on Windows XP, and will allow weapon modification.
    Kim Tyranto
    Kim Tyranto
    I hope you don't mind me asking, but what is N.I.C.E?
    gamemanj
    gamemanj
    It's a bunch of ASM modifications that call into a DLL, which then calls Lua code.
    The result being entities & TSC commands can be written in Lua.
    I intend to add the ability to modify bullets and weapons via it too, assuming there's even a "vector table" for those (if there's no vector table, I have to modify things weapon-by-weapon)
    Bad news. If you're using Windows XP, N.I.C.E doesn't seem to like it. I have no idea why - it just *REFUSES* to load game.dll, not giving any reason - and without game.dll using N.I.C.E. becomes impossible. My debugging is continuing, and I hope GetLastError will return a good result... but given Windows's attitude to error messages (undescriptive), I am not optimistic about the likely results.
    gamemanj
    gamemanj
    @Noxid: Because I'm using an XP VM to make ABSOLUTELY SURE the "NICE is broken on Windows" bug never happens again
    Noxid
    Noxid
    3.1 or bust
    gamemanj
    gamemanj
    Noxid: Did the original Cave Story even *run* on 3.1?
    *I seriously doubt it*.
    (It might have run on 95, but the earliest I can setup a workable VM for is 98-SE :( .)
    PSA to Cave Story modders who use The GIMP and Wine during development: They're colluding! The GIMP produces incompatible BMPs... which Cave Story on Wine accepts. And Cave Story on "real" Windows does not. Thanks to zxin for alerting me to this.
    Raus
    Raus
    How does one produce an "incompatible bitmap"? owo
    gamemanj
    gamemanj
    Raus: I have no idea - I'm guessing it's a valid bitmap but not supported by the Cave Story engine.
    zxin
    zxin
    If it was just a bad bitmap then I wouldn't have been able to open it with Paint.NET.
    It Worked On My Machine (tm)
    gamemanj
    gamemanj
    Seriously, though, I have no idea what's going on with the NICE w/ audio build.
    Nobody tells me anything until I give you it in the middle of an important thread and then everything starts going horribly wrong, and I have no idea why.
    I'm asking zxin to figure out how he's got it setup and reproduce that.
    gamemanj
    gamemanj
    you can beat them on features, you can beat them on ease of use, but you can't beat them on publicity.
    gamemanj
    gamemanj
    insert just about anything that's minor but better for "you" and whatever it's better than for "them"
    As part of the ordinary schedule for. April. Near-end. I'm examining and noting that... April 1st was a complete failure.
    As part of the ordinary schedule for. April. First. I'm announcing NC/BR.
    gamemanj
    gamemanj
    Ok, it's been long enough. NC/BR was an April Fool's joke, which apparently nobody got. The joke adds up to: "scan human brains, determine desired Cave Story ASM modifications, create mods."
    gamemanj
    gamemanj
    Except, you know, nobody can read Morse Code, so of course they don't get it.
    The first section:
    "Further details on what NC/BR is have been delayed until the year '2 0 7 2', and until SUCH A TIME AS BRAIN scanning technology is available for processing."
    The second section:
    "SELF TEST OK NCBR would scan BRAINS to create the best POSSIBLE CAVE STORY MODS"
    The third section: "april FOOLS"
    zxin
    zxin
    Hehe.
    GO TO /FORUMS/ DO NOT PRESS HOME DEFINITELY COLLECT 200 MEMES (EDIT3: Inspired by my tendency to click the "Home" button and end up on the entirely wrong part of the site instead of clicking the obvious and moving sky dragon.)
    PSA: Different TSC-modifying mods can and will conflict!
    Goerge Bobicles
    Goerge Bobicles
    Wait... zxin got the x2 res hack!?
    gamemanj
    gamemanj
    Sort of. Zxin has a Doukutsu.exe file with it in, but no DA files or any actual sources. (EDIT: Oh, and it conveniently breaks NICE, even with the TSC hook disabled. Trying the "old-style" method of NICE injection, but I'm doubtful)
    zxin
    zxin
    Haha, shit, now people know.
    < .<
    Remind me how to install ASM hacks into the NICE mod?
    gamemanj
    gamemanj
    To be entirely honest with you, though NICE is *supposed* to remain interoperable with other ASM mods by keeping hooks as small as possible (hence "niceilib" - where the hooks go to),
    in practice, ASM mods are dark magic.
    zxin
    zxin
    X-Calibar
    X-Calibar
    [QUOTE="gamemanj, post: 215096, member: 7022"]
    EDIT2: And yes, the link above has been in my signature for quite a while. I'm a bit surprised that people don't think this is possible...[/QUOTE]
    Should the v2.5 template mod work without applying it to another mod...? Because it just errors and closes for me.

    I'm currently running in Japanese locale in case that's an issue... The error probably says unable to read file, and adds several *.bmp files like data/Loading.bmp, 1
    to the error.log.
  • Loading…
  • Loading…
Top