Help with Family Basic & question about 2nd controller mic

Started by Frank_fjs, July 27, 2012, 05:50:49 am

Previous topic - Next topic

Frank_fjs

Hi all, couple of questions:

Can someone point me to some good links/guides on using Family Basic. I'm not after info on learning the Basic language itself, am really after some info on how to navigate around in Family Basic.

For starters, some quick & easy questions that someone here should be able to help me out with:

- What's the quickest way to get into the Basic screen? I can get there but am not really sure how I'm doing it, I just keep pressing function buttons until something happens.

- What's the deal with the cart, battery compartment and switch? Are there programs stored in the cart, and why does it need batteries?

Now for something easier, received a stock Famicom console today and have noticed that the sound is really distorted. After fiddling with the mic slider the sound is now perfect, but if I touch/move it sometimes sound goes back to being horrible. I find if I press down on it a little it fixes the problem. The mic itself works fine. Just a matter of cleaning it or something more serious?

Thanks all.

80sFREAK

Ok, here we go. Start from last Q.

Just clean slider with sand rubber eraser.

There is WRAM in the cart backed with battery, if you want to store your programm without tape recorder.

Seems to be few ways to get into BASIC menu. I hit blank on start up, then type "game basic<enter>" programm will ask to start basic F1 - Yes, F2- No. Something like that.
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

Frank_fjs

Thanks!

I will dismantle the controller and give it a good clean.

UglyJoe

Family Basic 2.1 will ask you for your name first (so you can type whatever and hit enter) and then it will ask you if you want to start the Basic program (hit F1 and press enter).  I was there were a quicker way to get to it ;D

I'm not exactly sure what the deal with the battery and switch is.  I've asked a few people to translate that page from the manual, but no one has every gotten back to me :-[

Frank_fjs

I think I may have v2.1 then (any way to tell for sure?), as I do get prompted to enter something and hitting F1 does enter the basic screen. Have also managed to enter some other weird screen, some sort of calculator thing? Also, is there a separate screen for music composition, some form of editor of sorts?

I've been going through the manual, I can't read Japanese but I can follow the code so hopefully I can scape by. :)

UglyJoe

You have version 2.1, since version 3.0 dumps you straight to the basic editor.

Version 2.1 has a few other "apps" (calculator, music, text) built into it.  If you say no (F2) to the basic prompt, it'll ask you if you want to try the next mode.  You basically keep saying No until it asks you for the app you want.  I suspect the battery backup is for saving data for the other apps (music or text compositions), but I haven't had the urge to really test out the theory.

Frank_fjs

Thanks. :)

Well, here's my very first program. I'm sure there are better ways to do this but I'm just learning & only received it today, so go easy on me!


5 CLS
10 SPRITE ON
15 DEF SPRITE 0,(0,1,0,1)=CHR$(1)+CHR$(0)+CHR$(3)+CHR$(2)
20 X=0:Y=100:Z=100
25 SPRITE X,Y,Z
30 S=STICK(0)
40 IF S=1 THEN Y=Y+1
50 IF S=2 THEN Y=Y-1
60 IF S=4 THEN Z=Z+1
70 IF S=8 THEN Z=Z-1
80 IF Y>250 THEN Y=Y-249
85 IF Y=1 THEN Y=Y+249
90 IF Z>250 THEN Z=Z-249
95 IF Z=1 THEN Z=Z+249
100 GOTO 25


That basically just draws a predefined sprite on screen, then lets you move it around with the d-pad. Sprite manipulation is pretty easy, rather impressive for it's time.

P

Nice work doing that without reading Japanese! Too bad I can't test the code.

It seems that the back up feature is indeed for backing up those applications' data like UglyJoe suspects, and it can also be used for saving programs. I don't have family basic so I don't understand everything but maybe you can figure out a few things from my quick translation (there are probably tons of errors so bear with me):

Spoiler
Regarding memory backup.........(When pulling out the cartridge from the main unit be sure that the switch is ON, and let it be like that until the computer tells to turn it off.)

By using AA-batteries it is possible to temporarily save things like Calculator, Music, input data on the Message Name Board (Translator's note: Text editor?) and BASIC programs in the cartridge memory (memory backup).

*Please follow the computers directions about the ON/OFF backup switch.

*However, when in Game Basic Mode it will not give the message: "Turn the cartridge backup switch on if you want the data to remain.".
In case of backing up BASIC programs, please close the GAME BASIC Mode and when the Start Screen shows up, put the back up switch to ON.

*If the computers instructions are not properly followed when using the ON/OFF backup switch, data will not back up correctly, and abnormal situations may occur so please be careful.

*When the BASIC programs data: Calculator, Music, Message Name Board are executed they will unfortunately disappear (Translator's note: I guess the backed up data?). What is more, if the Calculator, Music, and the Message Name Board Screen's data are executed in BASIC Mode it will also disappear.

*When the backed up data is used, please fully take the above mentioned points into consideration.

Regarding changing batteries......
(TN: I skipped this one for now)
......



Things that can be backed up to cartridge:
*BASIC programs
*Calculator Screen data
*Music Board Screen data
*Message Board Screen data
(Caution) BG and GRAPHIC Screen data can't be backed up

Things that can be SAVEd to and LOADed from tape:
*BASIC programs
*BG and GRAPHIC Screen data

[Pictures of cartridge]
Cartridge (front) ----Backup switch
Cartridge (back)
[close]

Frank_fjs

Thank you for that info!

I still haven't worked out how to save/load from the cart but the info you translated will be a big help.

P

I think you can also save your BASIC program, BG and GRAPHIC to the PC using the tape function and instead of using a tape recorder you connect it to your sound card mic port using a normal male to male sound cable. Then use an audio editor like Audacity to record it. It would be cool if we had a program that can convert that data to BASIC code on the PC and vice versa.

Frank_fjs

Yep, experimenting with that now.

I downloaded a tape wav file from somewhere on these forums (car that wraps around screen) and successfully loaded it. I've also managed to save by connecting the fami keyboard to my PC and recording its output.

UglyJoe

Quote from: P on July 28, 2012, 04:02:01 am
It would be cool if we had a program that can convert that data to BASIC code on the PC and vice versa.


You can do this with Nestopia (and VirtuaNES).  Both emulators have the ability to save the audio data to their own format (tp or vtp).  Both formats are actually just headerless unsigned 8-bit PCM wave files with a 32000 Hz sampling rate.  Nestopia is especially nice because you can paste in code from the clipboard.

I wrote up some brief instructions on getting a recorded wav file into Nestopia: http://www.famicomworld.com/forum/index.php?topic=7704.msg114035#msg114035 .  Going the other direction (Nestopia -> Hardware) should be fairly obvious, but I'll write up some instructions if someone asks for them.

Frank_fjs

I'm happy that I can now save any work that I do on real hardware.

Still can't work out how the save function on the cart is supposed to work though. I can't seem to find any info on how you are supposed to save to it. I  mean, if you just type save"myProgram" it saves to the tape recorder, I'm wondering if there's a separate command for saving to the cart, or perhaps there's a menu on the main screen that you're supposed to access. If you flick the switch to on whilst in Basic it does seem to access the cart in the sense that you can 'list' the code that's on there, buggered if I know how to write to it though.

Have worked out some trivia things re the main screen.

The first input it's asking you for is your name - thanks to UglyJoe for that
Once you get to the second input, you hit F1 and then return to start Basic - thanks again Joe
You can also type the following commands into that second input request field:

basic - loads Basic
cal. - loads the calculator program (note the full stop at the end)
mus. - loads the music program
mes. - loads the message (basically notepad) program

Hitting F4 seems to mention something about the on/off switch on the cart but i can't decipher it.

UglyJoe

Quote from: Frank_fjs on July 28, 2012, 07:29:45 am
Still can't work out how the save function on the cart is supposed to work though.\


I messed with this for a while last night.  What seems to work is if you type SYSTEM (or SYS.) at the BASIC prompt and then choose "3--END" from the menu.  This kicks you back to the "computer" GUI.  At this point, your program is apparently saved and you can turn off the system.  If you start up the Famicom, enter the same name at the prompt, and then go into BASIC, your code will still be there.  No toggling of the backup switch needed.

If, when back at the computer GUI, you hit F4 to type "owaru" ("End"), it will give you instructions about flipping the backup switch.  (Those instructions are in the lower-left of this page from the manual, btw).  This procedure takes you back to the startup screen (where the computer flashes and beeps until you press a key).  If you have the backup switch on, you can't get past this screen.

That being said, I'm wondering if the owaru sequence is just a safety measure to ensure that the system isn't writing anything to the SRAM when you power off.  It's probably not writing anything to SRAM when sitting at that startup screen, you know?  I'm also wondering if the backup switch is acting as a sort of hardware "lock" on the SRAM, preventing any writes from occurring.  That's pure conjecture, though ;D

Frank_fjs

You legend, that worked!

I think I was over-complicating things, trying to save to the cart with a command and by messing with the switch. It also didn't help that I never logged in with the same name as I tended to just mash the keyboard in frustration!

Thanks heaps Joe for all the help.