News: 11 March 2016 - Forum Rules

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 - koitsu

Pages: [1]
Programming / Re: Where did you learn assembly from?
« on: October 09, 2017, 09:26:56 pm »
It is interesting you mention Merlin. My son has been hacking SNES games (65816) and wanted a quick and easy way to take what he was learning using the debugger tools (BSNES+ and others) and write his own substantial extensions that would be able to assemble, link, and then auto-patch the ROM files so he could just run them without having to apply tools or otherwise go through the multi-step processes that BSNES+ or other tools still required. I located the Merlin 32 site, downloaded their assembler and linker tools and started modifying them. Those results can be found at this page, Patching SNES ROMs Directly from Assembly.
Oh my god, this makes me IMMENSELY happy.  I wasn't even aware of this project (Merlin 32)!  Cross-assembling 65816 on present-day systems is painful (matter of opinion, and I don't want to get off-topic, but I really dislike several aspects of ca65 while appreciate others, and WLADX's documentation is bizarre (I've complained on nesdev about this before) and old bugs in it always tainted my opinion), so to see a present-day build of something I'm familiar with from days of old is delightful.  Thank you!

I'll be sure to check out ASMPATCH as well.  Historically I've just split games up into separate PRG banks/sections and disassembled them, then analysed and hand-edited the disassembly to resemble something more manageable, tie it all together using the equivalent of PUT in Merlin syntax (for others: .incsrc, .include, etc.) or binary includes for the rest.  What you've written there would make my life a *lot* easier on romhacking projects.

Programming / Re: Where did you learn assembly from?
« on: October 07, 2017, 05:39:07 pm »
Sorry for the long-winded reply, but it's hard to give terse answers without some surrounding details:

For 6502/65c02: in junior high, while taking a BASIC programming class (our public schools predominantly used Apple II+/IIE).  We were taught how to use some basic math to draw a circle, and HPLOT to fill it line-by-line.  But the filling felt slow to me -- I could literally watch it draw.  I asked my teacher if there was a faster way.  He handed me a copy of the Merlin manual (an Apple II assembler) and pointed me to his copy of the Apple IIE reference manual.  I ended up using the Monitor, then later the built-in mini-assembler, and finally Merlin, to write myself a 65c02-based HPLOT replacement that was substantially faster.  (This story also explains why I occasionally make mistakes when doing code for the NES; I actually learned 65c02 first, and as such I often forget that the 6502 lacks several opcodes added in the later CMOS version.  "What do you mean invalid addressing mode?! Oh right... 6502...")

For 65816: also during the late stages of junior high.  My first home personal computer was an Apple IIGS, so I got my hands on the multi-volume Apple IIGS Firmware Reference and Programming the 65816 by Ron Lichty and David Eyes from Oregon State University's library.  Since I already knew 65c02, most of this came easily.  I started with the Monitor and mini-assembler, then Merlin 16, then ORCA/M alongside GSBug.  Later in high school (1993), I was one of two members of an Apple IIGS demo/CDA group called Digital Exodus, and we did a Christmas demo highlighting some of the features of the IIGS and documenting our road trip to California for Apple Expo West.  It was also around this time I did my SNES documentation (I was so excited that the SNES used the same CPU as my IIGS).  To this day I maintain that the 65816 is one of the most fun and enjoyable processors to develop on, and especially as a stepping stone into assembly language.

For x86: in high school (1992). The school CS lab was a mix of IBM PS/2, Apple II+/IIE/IIGS, and Macintosh.  Almost all my friends were PC users, and I was really jealous of several PC features that the IIGS couldn't do decently (a highly capable text mode was one of them).  But I was really amazed and influenced by PC demos (groups like Future Crew), so I began learning 286/386 assembly in MS-DOS, using Turbo Assembler.  I was also learning Turbo Pascal at the same time in school.  Eventually I got myself a PC (late 1993/early 1994) and started doing Pascal and x86 exclusively (my TRaCER utility, VeNES emulator, and unreleased qNES emulator are some examples).  I stopped doing x86 several years later (1999?), as the instruction set and all its extensions were just too much for me (I peaked with the 486), and had finally started learning C.  These days I can barely read commonplace x86, since most of it is generated by compilers, and often uses instructions I don't recognise, or uses AT&T syntax (ugh!).

No, I do not think I could do a better job.

I work on things solo, up until the point where I have things in a state/condition where I can hand over .tbl files to people who can do JP/EN translation without worry of text expansion causing problems (if possible/applicable).  I work at my own pace, because of health issues and lifestyle -- jobs tend to take up a lot of time, and when not at work, you don't always want to spend every waking moment working on romhacking things.  There are many of us "old-school" romhackers that do things this way, and going into all the reasons I think would be off-topic.  I think as many of us get older, real life begins sucking more and more energy out of us; you go from feeling like you can do anything/everything to being more selective.

Again: I'm not upset that this game got completed (I'm super glad! It's a fantastic title that I wish had gotten a real NA/EU release, and I look forward to trying the patch!), it's just one of those things where when you work on something for a long time, doing lots of reverse-engineering, hoping you can get it into a state where the translation phase can begin, only to find out someone did it first... it makes you go "dang it, had I known, maybe I would've spent my time differently".  I guess the "had I known" part goes both ways though; I hadn't thought to see if anyone was working on it, and that's totally my fault.  I don't want my comment to sound like it's a jab at the folks who worked on it.

As for not on RHDN: most of my time was spent on the nesdev forum.  RHDN forum isn't *that* new (in the grand scheme of things, considering how long I've been online).  Do you remember The Whirlpool/Donut?  I was on there and nesdev, those were the primary forums for me.  Given what I do/my background with all of this stuff, I really can't be everywhere at once (at one point I tried, it felt like a 16 hour a day job).

I just wanted to say congratulations on completion of this work, and I look forward to trying it out.

This was a game I was hacking and translating off-and-on, entirely by myself and privately, since 2011.  I'm glad this wonderful gem finally got done -- because it's a fantastic game -- but at the same time I feel horribly depressed because what feels like 6 years of RE work, notes, etc. were all for nothing.  No, I'm not upset (as in irritated/angry), it's just how the ball bounces and luck of the draw.

Pages: [1]