Famicom Family Basic question

Started by Protoboy, July 11, 2014, 07:12:52 pm

Previous topic - Next topic

Gered

Might take 2-3 weeks before I can get a dump though, as I have to order in some additional hardware.

Quote from: P
I suppose Nintendo removed CALL from certain later revisions of the manual so they didn't had to get so many questions about it. ;D But they never actually removed it in the software.


Which would make sense to me. I'm honestly surprised it's mentioned at all in the manual as the explanation of it is pretty light with no examples anywhere. Majority of people (kids) picking up a copy of Family Basic back then wouldn't have a clue what to do with it, heh. :)

But yeah after reading elsewhere on this forum that some manual revisions didn't mention CALL at all, I was worried once I noticed I had received a v1.0 copy that CALL might be absent from the cart too! Thankfully it's not, as it's nice having an "escape hatch" enabling you to do some more advanced stuff should the need arise (I remember CALL ABSOLUTE from my QBasic days being handy for that same reason!).

Quote from: P
I don't think F key should do anything (I've tried it with most keys). Maybe the person mixed it up with the T key.
You hold the T key while you press reset (you don't need to touch the backup switch) to skip the talking computer and go directly to BASIC. In V2 you see "RAM OK" really quick and then you go into BASIC mode directly if you do this. In PlayBox BASIC proto nothing happens at all.
So you say that in V1, holding T while booting does not go into BASIC mode but instead shows a RAM slef-test screen? That's very interesting. It makes sense to use T for Testing too.


Good to know about the F key then, as it's definitely not doing anything for me.

But yeah, just to confirm: Holding down just T at console power on boots into a light pink background screen with red-ish text saying "RAM OK". However, it never goes beyond this screen even if I wait for a while or try pressing some keys (I've tried a lot). Worth noting, if I turn the backup switch on and boot up holding T, I get the light pink screen, but no text, and it also never goes beyond this point either.

Kind of a bummer actually, I find the computer boot up / question intro annoying now, haha. :) But I was eventually planning on getting a V3 anyway (well, maybe), so I guess that problem will go away at that time.

P

Quote from: Gered on December 23, 2016, 06:49:59 pm
Quote from: P
I suppose Nintendo removed CALL from certain later revisions of the manual so they didn't had to get so many questions about it. ;D But they never actually removed it in the software.


Which would make sense to me. I'm honestly surprised it's mentioned at all in the manual as the explanation of it is pretty light with no examples anywhere. Majority of people (kids) picking up a copy of Family Basic back then wouldn't have a clue what to do with it, heh. :)

Yeah I guess CALL is there because not only beginners wants to play around with Family BASIC. And if they had removed it in later versions advanced users would be disappointed, and also there would be compatibility issues with code from earlier versions.
But I think instead of removing it from the manual they could just leave in a note that says it's for advanced users and the manual won't cover it.

But I suppose Family BASIC could be used to learn 6502, although it's not the main-goal of the cart.

QuoteHolding down just T at console power on boots into a light pink background screen with red-ish text saying "RAM OK". However, it never goes beyond this screen even if I wait for a while or try pressing some keys (I've tried a lot). Worth noting, if I turn the backup switch on and boot up holding T, I get the light pink screen, but no text, and it also never goes beyond this point either.

I see, I guess this self-test screen was used by technical support and later they turned it into a short-cut. Thanks, I thought of writing a short FAQ for Family BASIC so it's good to know what the main differences are in the various versions.

QuoteI find the computer boot up / question intro annoying now, haha. Smiley But I was eventually planning on getting a V3 anyway (well, maybe), so I guess that problem will go away at that time.

V3 is the definitive version. No useless apps just BASIC and BG GRAPHIC mode, sample games, much more Work RAM, ability to backup BG screens and a number of new quite useful commands. When you start using it you don't want to go back to V1/V2.x again.

Gered

So I have dumped the v1.0 ROM and verified it (works fine in FCEUX). Not sure what is allowed to be posted here as far as ROMs go so I don't want to just link directly to it (but would be fine doing so if a mod/admin says it's fine).

UglyJoe

Technically not allowed but I would overlook it this one time :-X

Gered

January 05, 2017, 06:58:28 pm #19 Last Edit: July 06, 2022, 04:56:18 pm by Gered
Hah, alright then UglyJoe. :)

familybasic-1.0.nes

EDIT: Probably no one will see this, but just updating the URL so it will continue working.

P

Thank you! I had to test SCR$ and the RAM self-test and they behave like expected. ;D

But I think you might have made a mistake in the header?
4E 45 53 1A 02 01 33 00 00 00 00 00 00 00 00 00
Upper nibble in byte 6 here ($33) indicates that this is mapper 3 (CNROM) but I'm pretty sure Family BASIC belongs to mapper 0 (NROM). The already dumped 2.0 and 2.1 ROMs stores $03 here indicating mapper 0. Bootgod also states it as being mapper 0.

Gered

January 06, 2017, 04:43:17 am #21 Last Edit: January 06, 2017, 04:50:02 am by Gered
Oh it was probably the script I was using (anago). You're right it should be NROM. I'll fix it when I get home from work later, but easy enough for anyone else to tweak themselves if they want it corrected before then. :P

EDIT: yeah oops, checked just now and noticed I was missing an NROM script for anago in the package I downloaded. I guess it defaulted to CNROM and I just didn't notice (and the dump still just happened to work fine as CNROM making me not think twice about it). Oops!

P

I see, I'd try redoing it with the NROM script to see if anything is different.

I guess CNROM is kind of like NROM, but allows to bankswitch CHR-ROM banks.

Gered

Re-dumped it with updated Anago scripts (from here). However it looks like all that changed was the mapper number in the iNES header.  :D Link above has been updated.

P

I see, thanks for making sure it's dumped correctly. The file is quite different so I wasn't sure it was because of the added features or if it was somehow dumped incorrectly.

Gotta check the differences from 2.0 and 2.1A one day.

Gered

Ah, interesting. Goes without saying I think, but definitely post when you figure out what the differences are from v1.0 -> 2.0 (and 2.1 I guess also, heh :) ). I'd guess most of it is probably just bugfixes, but either way would be interesting to know what the changes are.

80sFREAK

Thanks for dump.

First of all v2.1 is patched v2.0. Both ROMs are almost identical.
v1.0<->v2.0 16386 bytes different
prototype<->v1.0 32768 bytes different

So...
1) i guess there is only minor changes in source code
2)ROM consist of few independent blocks, which, probably, were made by different teams.
3)origin unknown(based on Woz-Basic?)
I don't buy, sell or trade at moment.
But my question is how hackers at that time were able to hack those games?(c)krzy

UglyJoe

Quote from: 80sFREAK on January 07, 2017, 10:48:24 pm
So...
3)origin unknown(based on Woz-Basic?)


Quote from: UglyJoe on November 14, 2015, 07:05:56 am
My copy of The Untold History of Japanese Game Developers Volume 2 arrived yesterday and it has a Hudson chapter.  Some interesting Family BASIC info from it:

- It was developed by Takashi Takebe.
- The Nintendo / Hudson relationship was fostered via Sharp.  Hudson had made a BASIC interpreter for one of Sharp's early PCs, so Sharp recommended them to Nintendo for Family BASIC.
- Family BASIC was developed on a Sharp X1 (which has a different CPU architecture!) and then cross-assembled for the Famicom.  This was apparently a common thing for Hudson to do at the time.

80sFREAK

January 09, 2017, 12:25:25 am #28 Last Edit: January 09, 2017, 01:20:36 am by 80sFREAK
 Thanks for the quote. "Origin" is not "copy" or "patch". I mean "inspired by" - the way to tokenize, basic programm line format etc.

Since X1 is a CP/M machine, using cross(macro) assembler was very possible. Maybe this could explain "weirdness" of some code in Family Basic, which doesn't looks like code for 6502(PL/M? Z80?). Lots of parts could be done faster.

While ago i disassembled v2.0 to the "bare bones", removed all bells and whistles and now have almost finished(SPRITE operator not completed yet - there is quite tricky code to process animation) source code of Family Basic. It can be assembled in 16K ROM with some speed increase(too many JSR in JSR).
I don't buy, sell or trade at moment.
But my question is how hackers at that time were able to hack those games?(c)krzy

P

I read that HuBASIC was developed for Sharp's PCs with compatibility with Microsoft's BASIC in Commodore and other PCs in mind.

Unefficient code and beginner mistakes is quite common in early video games they say. Often programmers tried to code the 6502 like it was a Z80 (if that was their previous experience) or the other way around for some Game Boy games, and yet others had hardly any programming experience at all and learned mostly by themselves by looking at the code from other games.


Quote from: 80sFREAK on January 09, 2017, 12:25:25 am
While ago i disassembled v2.0 to the "bare bones", removed all bells and whistles and now have almost finished(SPRITE operator not completed yet - there is quite tricky code to process animation) source code of Family Basic. It can be assembled in 16K ROM with some speed increase(too many JSR in JSR).

So you made something like V3 for V2? That's pretty cool.