Page 1 of 2

New Famicom/NES book: I AM ERROR

Posted: Sun May 17, 2015 9:44 pm
by koitsu
Recently a new Famicom/NES-focused book titled "I AM ERROR" was published. It's a combination of history of the system and its technical workings, combined with the social aspects (ex. emulation, societal impact, etc.); hard to describe, really. The author is on Twitter.

For those that are regulars, the reference and bibliography section contains many mentions of nesdev and emulation folks (ex. kevtris, tepples, myself, Disch, Memblers, ccovell, Landy/Alex Krasivsky, Brad Taylor, BootGod, Matt Conte, RST38h/Marat Fayzullin, and of course the entire nesdev website especially the wiki).

I picked up a copy which arrive today, but won't have time to read it for a while. It's about 330 pages of actual content, with the remaining 110 citing references, bibliography, etc..

P.S. -- There is an actual 4-page explanation provided (citing references) regarding the FC/NES's CPU and the lack of decimal mode. It'd be too much to type in here, but it boils down to Ricoh/Nintendo deciding to remove 5 transistors, effectively disabling decimal mode rather than removing it, solely to avoid violating the patent on the CPU that MOS Technologies (Commodore) had at the time. As said previously, too much to type here...

Re: New Famicom/NES book: I AM ERROR

Posted: Sun May 17, 2015 9:48 pm
by Drew Sebastino
I never understood the point of decimal mode anyway. (I hope I didn't just derail this thread. :? )

Re: New Famicom/NES book: I AM ERROR

Posted: Sun May 17, 2015 11:15 pm
by rainwarrior
I think it might come in handy with financial software, but has little purpose in general purpose computing.

It was in the 6502, I think largely because a lot of earlier computers had it, like the IBM 360. It was a feature that made a little more sense in the earlier days of computing, when a lot more software was about crunching numbers with human input/output, and it was better to have a smaller/simpler program that doesn't have to translate from input format and back again.

Re: New Famicom/NES book: I AM ERROR

Posted: Mon May 18, 2015 6:49 am
by Sik
Decimal mode = BCD. When it comes to games, it's mainly useful for keeping stuff that gets shown on screen in pure hexadecimal (otherwise you need to resort to doing a division for every digit, which is notoriously slow). Since the NES lacked it due to patent issues, games resorted to storing each digit into its own byte instead (taking up twice as much memory).

Other processors usually would have native BCD instructions or would use a "correction" instruction that fixed the value after an addition or substraction (i.e. 0x0A becomes 0x10, 0x0B becomes 0x11, etc.). 6502 used a flag instead (and using a flag is what was patented).

Re: New Famicom/NES book: I AM ERROR

Posted: Mon May 18, 2015 7:15 am
by thefox
Sik wrote:Since the NES lacked it due to patent issues, games resorted to storing each digit into its own byte instead (taking up twice as much memory).
It should be noted that even though NES lacks the BCD mode, nothing stops games from storing numbers in BCD, at the cost of having to implement the BCD operations in software. This is quite a minor inconvenience.

Re: New Famicom/NES book: I AM ERROR

Posted: Mon May 18, 2015 4:35 pm
by tepples
Thwaite uses a compromise, storing the score as byte values from $00 to $63 (0 to 99) and converting it a byte at a time into digit pairs when it comes time to rebuild the status bar.

Re: New Famicom/NES book: I AM ERROR

Posted: Mon May 18, 2015 5:22 pm
by ccovell
Anyway, let us know if the book is any good. The platform studies treatment (Racing the Beam, The Future Was Here (Amiga)), though a little dry sometimes, can provide interesting technical nuggets, over and above the usual nostalgia.

Re: New Famicom/NES book: I AM ERROR

Posted: Mon May 18, 2015 7:36 pm
by zzo38
tepples wrote:Thwaite uses a compromise, storing the score as byte values from $00 to $63 (0 to 99) and converting it a byte at a time into digit pairs when it comes time to rebuild the status bar.
I do like that idea of base100, since having no decimal mode, probably it can be done without much difficulty (you still have to implement the carrying by yourself but this is easier and simpler to do than proper BCD carrying)

Re: New Famicom/NES book: I AM ERROR

Posted: Thu May 21, 2015 12:57 am
by Bregalad
koitsu wrote: For those that are regulars, the reference and bibliography section contains many mentions of nesdev and emulation folks [...], and of course the entire nesdev website especially the wiki).
This is sad, because the wiki is probably the worst failure of the NESdev community (after the badly translated chineese documents). It basically look like a huge pile of shit and any attempt to improve it from me is immediately reverted by other users. The rule if: If your edits don't increase the size of the page, they are reverted. However, if you add a new chapter about what is already told, then it's great. The more messy info there is all over the place, the better.

Re: New Famicom/NES book: I AM ERROR

Posted: Thu May 21, 2015 4:43 am
by tepples
Bregalad wrote:the wiki is probably the worst failure of the NESdev community (after the badly translated chineese documents). It basically look like a huge pile of shit and any attempt to improve it from me is immediately reverted by other users. The rule if: If your edits don't increase the size of the page, they are reverted.
If you get reverted, open a discussion on the talk page. The BOLD, revert, discuss cycle is common practice on wikis.

Re: New Famicom/NES book: I AM ERROR

Posted: Sat May 23, 2015 8:44 am
by Pokun
koitsu wrote: P.S. -- There is an actual 4-page explanation provided (citing references) regarding the FC/NES's CPU and the lack of decimal mode. It'd be too much to type in here, but it boils down to Ricoh/Nintendo deciding to remove 5 transistors, effectively disabling decimal mode rather than removing it, solely to avoid violating the patent on the CPU that MOS Technologies (Commodore) had at the time. As said previously, too much to type here...
I heard it had something to do with patents. Nice to finally hear it confirmed.


About "I AM ERROR" and "My name is Error" isn't the two almost exactly the same?? It never confused me anyway. Than again the first time I played Zelda II, I was too young to understand English so I had no idea that Error wasn't a real name. :)

Re: New Famicom/NES book: I AM ERROR

Posted: Sat May 23, 2015 9:09 am
by Sik
There are also Null and Bug (mistranslated as Bagu). It's a programmer joke so nobody got it and assumed it was a localization error =/ ("null error bug")

Re: New Famicom/NES book: I AM ERROR

Posted: Sat May 23, 2015 9:11 am
by tepples
Ninja'd, but anyway:

There were supposed to be two characters Error and Bug. Error lived in Ruto, and Bug lived in Saria. But in English language versions, Bug's name was mistranslated to Bagu, and a quest offered by a man in Mido make that much less sense.

Re: New Famicom/NES book: I AM ERROR

Posted: Sun May 24, 2015 4:00 am
by Pokun
I knew about Bug but not Null. I even played through the Japanese version but I don't remember anyone called Null?

Re: New Famicom/NES book: I AM ERROR

Posted: Sun May 24, 2015 8:10 am
by Sik
Meh I could be wrong on Null (maybe somebody had mixed up Null with Bug?). Still, the point is that it's an inside joke that went past everybody's head so it ended up looking like somebody screwed up the localization (when it actually sounds just as weird in Japanese - actually, in Japanese it sounds worse since it literally sounds like "it's an error").