Why did Super Mario RPG and Kirby Super Star use an SA-1?

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by psycopathicteen »

Why would I spend my time fixing "a thousand tiny pinpricks" if I always attempt to write efficient code in the first place? Yes, I do make mistakes once in a while, but it's not like I make it a thing to always use memory as registers, literally, which a lot of people do.
User avatar
rainwarrior
Posts: 8735
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by rainwarrior »

psycopathicteen wrote:Why would I spend my time fixing "a thousand tiny pinpricks" if I always attempt to write efficient code in the first place?
I don't really understand how that thing I said a month and a half ago is relevant, so I'm not equipped to argue unless you explain what you're getting at.
psycopathicteen wrote:You know I must say, the reason I dislike liscensed developers is not because they write inefficient code, but because a lot of them acted like know-it-alls in interviews.
OK? O_o?

Why are you mad at someone for honestly believing they couldn't port Gunstar Heroes to SNES 25 years ago? Or even if you must insist it was dishonest, they were beholden to Sega who was paying for everything they did; what exactly do you expect someone to be able to say in a PR situation like that?
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by psycopathicteen »

Because I got banned from websites just for disagreeing with what Konami and Treasure said, and I needed help from people on the websites to explain stuff like how to use assemblers, how to set up NMIs and joypads etc.
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by TmEE »

There is no particular need to state any opinions and rub people the wrong way, or participate in discussions that rustle your own jimmies. Less stress for everyone ~
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by mikejmoffitt »

psycopathicteen wrote:Because I got banned from websites just for disagreeing with what Konami and Treasure said, and I needed help from people on the websites to explain stuff like how to use assemblers, how to set up NMIs and joypads etc.
This kind of response sounds a little tone-deaf. Don't you think maybe these kinds of bands are handed out because of conduct and manners? In other words, the way disagreement is expressed?
Last edited by mikejmoffitt on Mon May 22, 2017 9:44 am, edited 1 time in total.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by psycopathicteen »

I at least tried to explain stuff with math and logic.

Plus pretty much all of the stuff I wrote on those websites were edited by moderators, because they thought it was hilarious.
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by calima »

Why are you again bringing drama here, necroing a month-old topic at the same time? We don't care about forum drama.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by psycopathicteen »

Rainwarrior asked me why I don't like Konami.
User avatar
nicklausw
Posts: 376
Joined: Sat Jan 03, 2015 5:58 pm
Location: ...
Contact:

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by nicklausw »

I wouldn't call this drama, just slight radicalism causing conflict.

I don't really think it's fair to be mad at commercial SNES devs for poor code. Mine would look similar if I had to work on old hardware with a deadline.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by psycopathicteen »

If I was in a rush, I would just use crappier animation, which would actually save cycles.

Are you saying if you were in a rush you would do this?

Code: Select all

lda $00
asl
sta $00
lda $00
asl
sta $00
lda $00
asl
sta $00
lda $00
asl
sta $00
Instead of this?

Code: Select all

lda $00
asl
asl
asl
asl
sta $00
User avatar
rainwarrior
Posts: 8735
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by rainwarrior »

Okay, NOW the thing I said a month and a half ago is relevant again. ;) ...but only because you're repeating yourself.

Do you have an actual source for these ridiculous "examples", or are they entirely made up on the spot? It's trivial to rewrite a piece of code to do the same work in more steps. Why would you waste your time doing that?

As I said a month ago, it's believable to me that you'd find such a piece of code somewhere, but since you've provided no source/context it's again pretty damn meaningless. If you want to actually cite something as it exists in a game, maybe there'd be something even worth talking about. We could ask questions like:
  • "is this startup/loading code, or is this happening many times per frame?"
  • "is this typical throughout the code or an isolated example?"
  • "do some parts of the code appear to be written by an inefficient compiler rather than hand-assembly? did they have a scripting language of some sort?"
These might actually be interesting to discuss. Your constant assertions of "I write perfect efficient code and old commercial games are full of bad inefficient code" are quite frankly VERY DULL.

If you want to know the real reason Treasure didn't make a game for the SNES it's because NINTENDO NEVER HIRED THEM TO MAKE ONE. It had literally nothing to do with code quality, or whether the SNES could "handle" it.

If you wanna prove that you could port Gunstar Heroes to the SNES, please, by all means go and do that. I'd love to see more good homebrew for it. If you wanna patch some optimizations into Super R-Type to reduce slowdown, great! Please do it. You don't have to take constant vague piss shots at old games and developers to accomplish these things.
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by psycopathicteen »

"is this startup/loading code, or is this happening many times per frame?"
Many times per frame.
"is this typical throughout the code or an isolated example?"
Typical throughout code.
"do some parts of the code appear to be written by an inefficient compiler rather than hand-assembly? did they have a scripting language of some sort?"
Could be, I don't know.

As of where in these games do we find what code, that will take me a while to find, because I don't take notes of where exactly every code is.
User avatar
rainwarrior
Posts: 8735
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by rainwarrior »

psycopathicteen wrote:
"is this startup/loading code, or is this happening many times per frame?"
Many times per frame.
"is this typical throughout the code or an isolated example?"
Typical throughout code.
"do some parts of the code appear to be written by an inefficient compiler rather than hand-assembly? did they have a scripting language of some sort?"
Could be, I don't know.

As of where in these games do we find what code, that will take me a while to find, because I don't take notes of where exactly every code is.
Those weren't questions that can be answered without context. As such, those aren't answers, they're meaningless and pointless assertions. (Just like the "example" itself.)
adam_smasher
Posts: 271
Joined: Sun Mar 27, 2011 10:49 am
Location: Victoria, BC

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by adam_smasher »

+1 to everything rainwarrior's said.

And FWIW, if that code is real and not just a made up example, it's almost certainly the result of a compiler or a macro.

It's super-easy to imagine that some well-meaning dev at Konami or wherever wrote a macro that translates "ASL $00" -> "LDA $00; ASL; STA $00" to compensate for the missing addressing mode and save him some typing, and that this was part of their standard library of macros or whatever.

It's also super easy to imagine that their assembler had a code repetition pseudo-op.

So, I dunno, I also find it pretty easy to imagine that some burnt-out salaryman cranking out 1000s of lines of code a 14-hour workday to meet a deadline and who just wanted to get out to karaoke for the night and was working on non-core code just used a one-liner like "REP 4 { ASL SomeVar }" to shift a a variable in memory left n-times instead of writing 6x the code to do it manually.

Who knows, it might have even been mandated by project managers to use macros like that outside of performance-sensitive sections to make code denser, easier for other devs to read, easier to go back and edit, and less likely to have bugs in it.



Edit: oh, oops, ASL $00 isn't a missing addressing mode (I don't 6502 often right now). So I'm a little skeptical that this code is 100% real? ASL $00 x 4 is still easy enough to imagine, though.
Last edited by adam_smasher on Mon May 22, 2017 1:40 pm, edited 2 times in total.
User avatar
Myask
Posts: 965
Joined: Sat Jul 12, 2014 3:04 pm

Re: Why did Super Mario RPG and Kirby Super Star use an SA-1

Post by Myask »

calima wrote:Why…necroing a month-old topic at the same time? We don't care about forum drama.
…but we prefer thread "necromancy" here to its alternatives.
Post Reply