Nintendo "Gigaleak"

You can talk about almost anything that you want to on this board.

Moderator: Moderators

User avatar
olddb
Posts: 188
Joined: Thu Oct 26, 2017 12:29 pm
Contact:

Re: Nintendo "Gigaleak"

Post by olddb »

Anyone had a peek at the snes source code?
It's looks so bad to me.
...
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Nintendo "Gigaleak"

Post by Oziphantom »

Looks fine for the period to me, but I've not looked to deeply yet.
bngrybt
Posts: 31
Joined: Tue May 09, 2017 5:03 am

Re: Nintendo "Gigaleak"

Post by bngrybt »

olddb wrote: Tue Jul 28, 2020 1:16 am Anyone had a peek at the snes source code?
It's looks so bad to me.
The only thing more important than writing "good" code is writing code that both works and hits the deadline. Professional programmers often don't have time for cleanup.
strat
Posts: 409
Joined: Mon Apr 07, 2008 6:08 pm
Location: Missouri

Re: Nintendo "Gigaleak"

Post by strat »

It would be amazing if the Mario 64 source that's supposed to be in the leak was anywhere near as readable as the RE project (even if you could read the Japanese comments).
Bananmos
Posts: 552
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Re: Nintendo "Gigaleak"

Post by Bananmos »

It's also worth pointing out that back in the day when cross-compiling wasn't the standard way of developing software, sources needed to be "optimised" as well. For an example, just have a peek at the virtually unreadable 6502 assembly files for the BBC micro version of Elite:
https://github.com/kieranhj/elite-beeba ... ELITEG.TXT

Not much room for comments, variable names or even line breaks! I'd say 95% of the development effort back in those days went into sketching out your solutions with pen and paper. Which in truth are heavily underestimated software development tools today :wink:

I imagine this would be much less of a problem with Famicom development, given that cross-compiling was already a necessity and there was more of a natural culture behind it in Japan compared to the teenage bedroom coding in Europe. Still, I would imagine a lot of leeway we take for granted with modern 6502 assembly toolsets just wasn't feasible on affordable computers at the time. And they were probably a semi-expensive resource still - likely one of the historical reasons for the "BG planning sheets" as used by Nintendo, and RARE's custom of having artists do all their art on grid-paper to be entered as hex data.

The most interesting thing for me that might come out of these leaks is more insight into just how simple/advanced the cross-compilation setups of that era were. But from what I've read, it looks like there's very little NES stuff of interest in this "gigaleak"...
User avatar
oRBIT2002
Posts: 687
Joined: Sun Mar 19, 2006 3:06 am
Location: Gothenburg/Sweden

Re: Nintendo "Gigaleak"

Post by oRBIT2002 »

I'd rather have seen some NES sourcecode, that'd been nice. :)

The closest NES source-stuff in these archives I guess are Super Mario AllStars.
User avatar
olddb
Posts: 188
Joined: Thu Oct 26, 2017 12:29 pm
Contact:

Re: Nintendo "Gigaleak"

Post by olddb »

oRBIT2002 wrote: Tue Jul 28, 2020 12:21 pm I'd rather have seen some NES sourcecode, that'd been nice. :)

The closest NES source-stuff in these archives I guess are Super Mario AllStars.
Some of the source of mario allstar is from the nes days, as stated by the header in the files.

I can clearly see at least 2 assembly coding styles in the snes sources.
The mario-zelda source looks bad to me:
  • all caps all the time
  • short cryptic variable names
  • subroutines, variable and constants all use the same naming convention
  • no clear designation of where a subroutine ends and another starts
  • files with thousands of lines of code
  • barely any comments
That said, its clear the code is superb, because the games are great.

Now, if you look at the FZero source, you will see the programmer(s) has more sensible and modern style.
...
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Nintendo "Gigaleak"

Post by Oziphantom »

Cross compiling was quite common back in the day. But didn't really take off until 85 when more powerful machines became cheaper. But even then people used Commodore 64s and Pets and Apple //s to program for the NES. However once the STs and Amigas showed up, the ODK was popular and the XT based PDS system was very common as well.

Since a lot of people seem to be interested in the history and nobody talks about it, I'm starting a video series called "Raster Slaves" where I go back and show you the conditions things were written under.

Its all good to judge the source code for ALL CAPS but it is bold of you to assume the machine actually has a lower case character set. For Example the APPLE ][, Atari 8bit, and I think even the TI 99/4 don't have lower case. The P.E.T was the machine that had lower case and it was a massive selling point. Even though the Commodore 64 has upper and lowercase the default is upper case, so all of BASIC is traditionally programmed in upper case

Code: Select all

10 PRINT "HELLO WORLD"
20 FOR A=1TO200:NEXT
30 GOTO 10
is the norm.

In the early assemblers you only got 6-8 characters for labels, and long labels means the computer has to spend more time comparing, and at 1mhz that time adds up. It can turn a assemble from 4mins into 10mins. You want to optimize the build as much as you can. A lot of assemblers even have "END" directive so you can stop it looking at data to see if its code, or you have a PASS abort command so you can exit a pass early if you know it won't need to look at it to save time.
At the moment I'm porting my 16K game entry code back to TMP, the major problem is the source code is 146K and the Commodore 64 only has 64K and a disk only holds 160K. I'm going to have to rename a lot of things smaller, cut comments.

No line breaks, well what editor where they using, was it a line editor, where you have to select the line and it puts it into a buffer down the bottom and then you edit it back( such as Vi). Since they used HP64000 for Mario Bros 3 we can see the conditions for it. Here is the manual http://www.bitsavers.org/pdf/hp/64000/s ... _Jul83.pdf the max line length is 110 chars, but labels are limit to 15 characters in length. The text also hints that the machines do have upper and lower case sets, but note that all code listings are shown pure upper case. As for blank lines they are on a 80x19 screen as far as I can tell, you don't want to waste one of the 19 on a blank line.
You don't want to switch between multiple files, you have a single tasking machine that can only show one file at a time, you can't just alt-tab it takes a while to switch. So having one file in your local buffer you can move up and down is practically necessary. As you don't have a magic make file that builds the whole thing in seconds. They would need to assemble each ROM complete.

Tetris Attack is a fantastic game, but oh dear the code is a horror show. Great code has nothing to do with game quality. Sure it can hurt, for example Secret Of Evermore is a buggy mess in places, but sometimes even the worst code can make a great game.
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Nintendo "Gigaleak"

Post by Memblers »

It's said that the programmer of F-Zero also coded the triforce polygon effects in Zelda 3. If you find that part in the code, I bet you'll start finding stuff in lowercase, haha.

When it comes to typing in all caps, it makes me remember how small PC monitors would be, normally. I was still using an IBM PS/1 when I was first learning NES stuff, and 80x25 text mode seemed comfortable to read. If you want more than 25 lines on the screen, you can switch to a higher resolution text mode.. but you might need shove your face against the monitor to read it. In that case, using all caps would simply be more legible.
User avatar
olddb
Posts: 188
Joined: Thu Oct 26, 2017 12:29 pm
Contact:

Re: Nintendo "Gigaleak"

Post by olddb »

Oziphantom wrote: Tue Jul 28, 2020 11:59 pm LP
Ah. Thank you for this post. It makes sense now.
I would love to see/read your series.
...
Oziphantom
Posts: 1565
Joined: Tue Feb 07, 2017 2:03 am

Re: Nintendo "Gigaleak"

Post by Oziphantom »

The Triforce effect is all precalc animation isn't it? Maybe he wrote the code to render it on their host machines. Not sure what the used yet. NEWS system possibly for the programmers as well, but also the assembler looks very similar to the HP one.

PS/1 that should be VGA or better era? which gets you 80x50. To be young again when I could read 80x50 on a 14" monitor ;)
User avatar
dink
Posts: 157
Joined: Sun Jan 12, 2020 8:42 pm

Re: Nintendo "Gigaleak"

Post by dink »

Oziphantom wrote: Tue Jul 28, 2020 11:59 pm Since a lot of people seem to be interested in the history and nobody talks about it, I'm starting a video series called "Raster Slaves" where I go back and show you the conditions things were written under.
This sounds very interesting! Please do let us know when we can watch :)

best regards,
- dink
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Nintendo "Gigaleak"

Post by Bregalad »

Of course this has happened while I was away/on vacation and everything has been taken down since. It's not that bad since it's mostly 1st party Nintendo stuff that doesn't interest me all that much anyway.

But what interests me most is :
Castlevania 4's beta tracks are cool too.
Is there any way to get those without hunting for the whole now-taken-down-leak-package ? CV4 is one of my favorite games.
Dwedit wrote: Mon Jul 27, 2020 9:02 am Someone with a 14 year old account and 600 posts is generally not a spammer.
Unless the password has been cracked/discovered.
User avatar
nesrocks
Posts: 563
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil
Contact:

Re: Nintendo "Gigaleak"

Post by nesrocks »

It hasn't been taken down yet.
https://twitter.com/bitinkstudios <- Follow me on twitter! Thanks!
https://www.patreon.com/bitinkstudios <- Support me on Patreon!
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Nintendo "Gigaleak"

Post by Pokun »

It's a pity that it doesn't include the master disks of FDS titles. That would take care of the purification problem with FDS disks, as there's no sure-fire way to know if a disk image is in the factory state or not.
Post Reply