News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Disch

Pages: [1] 2 3 4 5 6 ... 59
FanofSMBX's plan actually is very possible and something I hadn't thought of!

It would take a chunk of asm work to make it happen, but it's definitely doable.  The biggest downside would be that all your magic and weapons would be limited to those 4 palettes, rather than the ~13 palettes they have now.  But maybe that tradeoff is more appealing than the others?  *shrug*

Definitely interesting.  Very cool idea.

ROM Hacking Discussion / Re: Final Fantasy 1 WIP - Saving Indoors
« on: May 20, 2018, 10:08:49 am »
Nice.   :thumbsup:

So... is this saving the whole call stack?  I'd imagine that'd be necessary in order for warp staircases to work properly.

Programming / Re: 16-bit Math Problems (on an 8-bit system)
« on: May 19, 2018, 02:20:11 am »
Looks good to me!  Nice work.   :thumbsup:

Programming / Re: 16-bit Math Problems (on an 8-bit system)
« on: May 16, 2018, 12:03:37 pm »
Sorry... I'm jumping into this late and only read the most recent post:

It sounds like you are over-complicating this.

If HP is one byte:

But HP isn't one byte, so this is irrelevant.  Making a special case and treating HP under 256 differently from other cases just adds more code and makes things much more complicated.  Try to treat everything as uniformly as possible.

If you have a damage/healing calculation routine that works with 2-byte values, it will ALSO work with "1-byte" values that are really 2-bytes with the high byte set to zero.  There is absolutely no reason to code two separate routines.

I don't think I can simply convert the healing to a 2 byte number. The high byte would always be 0

You can and you should.  And highbyte=0 is exactly how you should do it.


To elaborate... this is how you'd typically compare 2 two-byte values ("P" and "Q")  (high byte is +1):
Code: [Select]
LDA P+1         ; compare high bytes first
BCC Q_is_larger ; (no need to examine low bytes if these branches take, we already know which is larger)
BNE P_is_larger

LDA P           ; compare low bytes next
 ; at this point, C,Z tell you the result:
 ; Z=set if P=Q
 ; C=clear if P<Q
 ; C=set if P>=Q

If 'Q' is only one byte wide... you can start by doing the same thing, but use an immediate zero for the high byte:

Code: [Select]
LDA P+1         ; compare high bytes first
CMP #0          ;  high byte of Q is zero
  ; ...

And if you're clever, you should be able to see how to optimize that, since CMP #0 will never clear C, and won't change Z as set by LDA:

Code: [Select]
LDA P+1         ; high byte
BNE P_is_larger

LDA P           ; low byte (as above)
; ...

Also simpler logic for this would be:

Code: [Select]
amount_to_heal = strength_of_spell();
if(amount_to_heal >= caster_hp)
    amount_to_heal = caster_hp-1;      // don't kill yourself

temp = target_hp;                      // their pre-heal HP amount
target_hp += amount_to_heal;
if(target_hp > target_max_hp)
    target_hp = target_max_hp;
    amount_to_heal = target_hp - temp; // how much we actually healed

caster_hp -= amount_to_heal;

Gaming Discussion / Re: Games featuring grappling hooks
« on: May 03, 2018, 08:50:08 pm »
- makes a thread about grappling hooks in games
- doesn't mention Umihara Kawase
- mfw

Right?  It's like the definitive grappling hook game.

Though I suppose it's understandable since it didn't get a US release and is therefore rather obscure.

Gaming Discussion / Re: Games featuring grappling hooks
« on: May 03, 2018, 11:41:30 am »
Ninja Five-0 for the GBA is pretty cool.

But the best grappling hook game I've ever played (by FAR) is Umihara Kawase for the SNES.  The entire game is basically navigating a level with really slick grappling mechanics.  It takes a minute to figure it out, but man is it fun.

In fact... I dare say... if you like grapple mechanics...  Umihara Kawase is the very best by a wide margin.

I think it also had a PSX sequel, but I never played it, so I can't vouch for it.


Apparently it was a trilogy!  And the whole trilogy is available on Steam.  Crazy.  I might have to pick that up.

Newcomer's Board / Re: Please explain like I'm 5...
« on: April 29, 2018, 10:37:22 pm »
In the most simple case, text in the ROM is stored on a way where 1 byte = 1 character in the string.  So the word "hello" might occupy 5 bytes in the ROM, one for each character.

Which byte gets mapped to which character can vary depending on the game.  Table files tell the hex editor (or some other tool) which byte gets mapped to what character, so that the tool can display the text so that the user can read it without having to look at a sea of raw hex.

So the table file itself doesn't really do anything in the game, it just gives tools a way of interpretting the data in the game.  If you want to edit the text itself, you'll have to change the bytes in the ROM.  This can be done directly with a hex editor... and I would recommend making a few VERY SMALL changes with a hex editor once you find some text just so you can see how it works.

But don't get too married to a hex editor -- it probably should not be your primary tool.  They're great to see raw unfiltered data, but you almost NEVER want to do the bulk of the work in one directly.  There's a better way to go 99% of the time.

In the case of translations, using a hex editor or relative searcher can be helpful for finding the text data, but once you've found it you'll probably want to use a text extraction tool like Atlas* to dump all the text from the game (or as much as possible) into text files... edit the text files normally, the use the tool to re-insert the text back into the ROM.  Trying to edit the text directly with a hex editor (and adjust any pointers that need adjusting) would be positively dreadful.

*(I say Atlas because that's the only one I've heard of.  I'm not a translation guy so this is not my area of expertise -- there might be a better one available, but Atlas might be a good one to start with unless someone gives a better recommendation).

...I'm not indundating you am I?

Not at all.  I just thought that was a really trivial thing that you could do on your own :P , but I didn't want you to feel like I was ignoring you.


You really should be able to find that on your own with any hex editor that supports table files and has a basic search feature.  (or by poking around in the disassembly)

I'm going to leave this as an exercise for you.

I can't really be of help here.  I don't know anything about these patches and am not willing to put the work into figuring them out.

Programming / Re: I like ASM... What's similar?
« on: April 27, 2018, 10:50:16 am »
Before considering developing your own NES emulator, ask yourself if your efforts may be better spent helping out those who already have emulators in development!

My answer to that question would be "no".

I actually kind of dislike that koitsu stickied that thread --- it's as if he's trying to discourage people because he's worried about there being "too many emulators" -- as if that makes any kind of sense.  And he seems to be assuming that the emulator is the end goal -- which it almost never is.  Or that the NES emu dev scene is hurting for quality contributors, which it absolutely isn't.

Programming / Re: I like ASM... What's similar?
« on: April 27, 2018, 12:24:50 am »
There's no fiddling around with a ton of semi-colons and parenthesis and long, long lines filled with underscores for spaces.

Don't know which language does that  =P

But Java and C# both have a thing with a REALLY huge core library, and so stuff you need is buried in really long namespace qualification  (ex:  System.Out.PrintLine .. and that's even one of the shorter ones)

...maybe I shouldn't abandon NES development. Just start my own game, instead of fiddling with this one. But I want more colours! Bigger sizes! Maybe SNES?

There's a charm to retro dev.  And in a way, the limited hardware helps reign in your ambition.  When developing for a modern platform it's really easy to get carried away with too many ideas.

On the other hand, if you make something for PC you can throw it on steam and maybe make a few bucks.


I know whatever language I work with next, I'll have to start almost from scratch. I just wish I could explain the difficulties I have in understanding anything else. Maybe I'm trying to learn too much at once...?

You absolutely will not be starting from scratch.  There's a big different in style between retro assembly and modern OO languages, but the fundamentals are largely the same.

LDA/STA becomes '='
CMP becomes '=='
JSR SomeLabel becomes 'SomeFunction();'

All these core asm concepts have DIRECT equivalencies in C-like languages, because C was designed to basically be portable assembly -- and all the languages it spawned took heavy influence from it.

I would say give it another shot.

If you want bare-bones, close to low level, "I want to do build everything myself from the ground up" -- pick up C or C++ with the SDL library....  or C++ with the SFML library... or maybe even Python with the PyGame library

If you want an existing working engine that does the heavy lifting for you and allows you to quickly mold it into your own game, pick up C# and Unity.

Note the biggest hurdle in ALL of these instances is not learning the language, it's learning the library.  The more complicated the library, the more there is to learn.  So Unity will have a bigger learning curve, but will also have the bigger payoff in terms of what it will allow you to accomplish.

And not to discount your suggestion! An NSF player sounds great, I'd actually love to be able to make a tool that converts an NSF to midi better than the one tool I already found. I just have no idea where to start with what language to learn to make a Windows application.

Literally any modern language will get you to a windows application with relative ease.  C/C++ environments are probably the hardest to set up because they're a touch archaic, but I'd still recommend C++ for emu development --- maybe because I have a bias... but building a hardware simulation in C++ is so damn sexy, where other languages kind of feel chunky.

But if you want to do anything with a GUI, C and C++ are both terrible and I'd probably avoid them.  Then again I haven't found any language that doesn't suck when it comes to GUIs... so... *shrug*  I think GUIs just suck in general.

I also hear very good things about Rust but I haven't used it and don't know anything about what libs are available for it.

And if you want to build up a resume and make yourself marketable, you might want to consider Go (GoLang) -- but again I can't speak to it.

Programming / Re: I like ASM... What's similar?
« on: April 26, 2018, 09:11:21 pm »
Write an NES emu.

I'm not joking.

It's one of THE most fun projects ever.  And it really gets you a ton of insight into low level architecture (though not all of it is applicable to modern machines -- but the fundamentals are similar enough).

There's a shit ton of documentation available, and a huge community to help you through any hiccups.

Even if you end up using a higher-level language like C# or Java or C++ or even Python -- the vast majority of the coding is back-end logic of simulating system hardware, so it "feels" low-level.

Also you don't need to worry about creating any graphics or music or anything -- all that shit comes bundled in the ROM.  You just have to play it.


I originally started with an NSF player, since that only requires emulating the CPU/APU and VERY basic memory stuff.  A full emu adds mappers, a bunch of weird timing details, and the PPU... which is a lot to take in.  Starting small with just the audio is a pretty good way to baby-step into the project.

Or if NES isn't your thing, try an SPC player.  Also good docs available for that.

Dunno of a way to add those easily other than tedious copy/pasting into a hex editor.  Your hex editor SHOULD allow you to copy/paste directly into it so you don't have to manually type.  If it doesn't, I recommend getting a better hex editor (I recommend HxD, which is hands down the best free hex editor I've ever used -- too bad it doesn't support table files)

If you know Python, you could probably write a script to create an IPS patch out of that data... but I'm too lazy to do it myself.

But that's about all the tricks I can think of.

If you just want individual changes, perhaps this thread will be useful?

I vaguely remember an IPS patcher that showed you all the individual "blocks" that the patch changes, and would allow you to individually select/deselect which ones you wanted to apply.  But for the life of me I can't remember the name of it.

You could find that, or you could read up on the IPS file format and look at the patch directly in a hex editor and delete the blocks you don't want.

OR you could a hex editor to copy/paste your map data from a non-FFR ROM to a patched FFR ROM with to undo the changes the FFR patch makes to the maps.

Standard map data is placed between offsets $10010 and $1ACAF in the original ROM (though your map data might be a little shorter or longer depending on how it is compressed, and FFR probably sticks some non-map stuff after it in that bank).

Overworld map data is between $04010 and ~$07F50 (but again, YMMV depending on how well it compresses)

If you can find where the NES ROM is contained within the GBA ROM, it might be as simple as copy/pasting the hacked ROM into the GBA ROM.

Gaming Discussion / Re: Current game squee: La-Mulana
« on: April 11, 2018, 11:20:58 am »
I didn't even link the trailer in my original post!  Shame on me:

On which platform is this ?

PC, Mac.  But I think there are also Wii and PS Vita ports.  Possibly some others.  Like Jorpho said you can get it on Gog/Steam

There are differences between the 2 versions, some pretty serious (like the way some bosses work, some riddles etc.)

Kind of like with Spelunky, I played the remake first, and it made the original seem like it wasn't worth it.  Maybe I'll try it again someday.

it just wasn't clear at all where you were supposed to go.

Figuring out 'where to go' is sort of like Dark Souls -- you just start exhausting the possible paths until they hit a dead end and you figure out how to open up new paths.

And that's kind of the thing.  Everything is a riddle.  You have to read every sign, and scan every skeleton.  I'm straight up taking notes on like pen and paper.

The clues are there, they're just scattered around, and you have to piece them together and figure out wtf they mean.  I've been able to get as far as I am without looking anything up (except for one 'gotcha' in the Gate of Illusion that was really lame
where you have to press down on some non-descript spot to drop into a secret room
... I cheated to figure that out).

Gaming Discussion / Current game squee: La-Mulana
« on: April 11, 2018, 12:29:32 am »
So guys.

1. Take old-school Castlevania (specifically, CV2)
2. Throw in some metroid
3. Make it Indiana Jones themed
4. Take out the day/night nonsense
5. Instead of looking for Dracula's body parts, you're exploring ancient ruins searching for the origin of life.
6. Very cryptic puzzles a la Castlevania 2, only the clues actually make sense and the puzzles are solvable
7. No grinding

If you're interested (and you never heard of this game), it's called La-Mulana (specifically, the remake).  And it's fucking brilliant.

This game got introduced to me a few years back.  I tried it for a bit, didn't think much of it other than it was kind of cool, then put it down.  But I picked it up again about 2 weeks ago, got really into it, and now I can't put it down.  It's amazing.  I just had to share it on here.

Has anyone else played this game?  I haven't beaten it yet... I just got through the endless corridor and unlocked the Twin Labyrinths.

ROM Hacking Discussion / Re: Solar Jetroid - combining 2 NES games
« on: April 10, 2018, 01:00:37 am »
Sorry to be so blunt, but if you have to ask if it's too difficult, the answer is yes.

This is a very big undertaking, and the level of programming skill required is substantial.  If you had the necessary skill, you would be able to get an idea of how much work is necessary.  The fact that you don't know and have to ask tells me you don't have the chops.

BUT if you have a passion for this project, maybe this can be a good vessel to improve your skill.  So maybe it's worth trying anyway.  Even if you aren't successful and nothing ever comes from the project, it still would be a tremendous learning experience.

Pages: [1] 2 3 4 5 6 ... 59