Hi there. I'm looking for video tutorials for this program. Is there anyone who can help me with this?
I haven't seen any video tutorials, but the manual does a pretty good job in teaching how to use it from page 16.
The manual is fully translated by me and another person. I've also translated the most important parts of the V3 manual.
http://www.famicomworld.com/forum/index ... pic=8876.0 Family BASIC manual
The most important part of the manual (not translated by me) is page 16 to 114, and has been compiled to a PDF. The rest can be found in the text file in the attachment, but unfortunately it hasn't been inserted yet.
The translated manual is from the V2 version. If you have V1, some things like the T+RESET trick will not work (it displays a RAM test instead of quick booting into BASIC mode).
http://www.famicomworld.com/forum/index ... ic=10276.0 Family BASIC V3 manual
This also is only a text file in the attachment, and it's not yet complete. All the new command explanations are translated though.
This is not enough. Lessons involve explanation, but I have the manual only "hello world" understood.
A "Hello World" isn't explained in the manual, but it would just be:
Code:
10 CLS
20 PRINT "HELLO WORLD!"
What is it that you don't understand? Have you been able to enter the first program in the manual that displays a Mario sprite?
Pokun wrote:
A "Hello World" isn't explained in the manual, but it would just be:
Code:
10 CLS
20 PRINT "HELLO WORLD!"
What is it that you don't understand? Have you been able to enter the first program in the manual that displays a Mario sprite?
I know this
10 CLS - CLear Screen
20 LOCATE 4, 10 - position of text on x & y
30 PRINT "HELLO, WORLD!" - print the text
RUN - run program.
I also know how to display Mario sprite, but it's not enough.
OK so you got the basics. The manual explains how to do more advanced stuff, as well as explains in detail how every command works. Read it and give it some time to sink in. It might not explain exactly how to make a game though. You might want to look at the example games.
Also you might find something interesting here:
Famicom World Family BASIC Super Thread
Pokun wrote:
OK so you got the basics. The manual explains how to do more advanced stuff, as well as explains in detail how every command works. Read it and give it some time to sink in. It might not explain exactly how to make a game though. You might want to look at the example games.
Also you might find something interesting here:
Famicom World Family BASIC Super ThreadHalf of these links is broken.
Besides, I have some questions.
1) If I can compile my projects into ROM
only with VirtuaNES - how I have to make this sign ":"? He displays on other emulators, but not on VirtuaNES. But only this sign gives an optimized code.
2) How can I copy and paste code to emulator? I tried, but no banana.
All links works for me except FAMILY BASIC ROOM, but I've saved the programs from that site (working link is further down in that thread). Famicom World seems to had some problems with their server lately though. Try the links again later.
1) Not sure who "he" is, or what code you are referring to? The colon ":" character is used for having multiple statements on the same line (mentioned on page 53 in the manual).
2) Nestopia uses F12 for this. I think VirtuaNES also supports pasting but I'm not sure.
Pokun wrote:
All links works for me except FAMILY BASIC ROOM, but I've saved the programs from that site (working link is further down in that thread). Famicom World seems to had some problems with their server lately though. Try the links again later.
1) Not sure who "he" is, or what code you are referring to? The colon ":" character is used for having multiple statements on the same line (mentioned on page 53 in the manual).
2) Nestopia uses F12 for this. I think VirtuaNES also supports pasting but I'm not sure.
I'm not sure that you tested Family BASIC somewhere else, in addition to Nestopia.
I have the real cartridge and mostly use that, but I also often use Nestopia for quick testing because of the easy F12 pasting.
Tangenting a bit, does Family BASIC let you jump to native 6502 code?
Applesoft BASIC on the Apple II has the
CALL statement for running a native subroutine. Apparently it's in Family BASIC as well, just
not mentioned in some revisions of the manual.
Yes you just POKE your 6502 subroutine (written in machine code, not assembly) somewhere in the WRAM and use CLEAR on the address before it (this sets the upper limit for what WRAM memory the BASIC code can use). CALL is basically a JSR so the subroutine must end with an RTS instruction.
The CALL command works in all versions of NS-HuBASIC but for some reason it's missing from the V2 manual scans that Sebastien used for his scanlation. He said that his personal copy (also V2) did include it though. I scanned and translated the CALL part of
page 69 from my manual (which is also V2 but has some changes and seems older than the scanlation), but I never scanned page 50 (index) and 110 (appendix) so the PDF is missing the CALL command on those pages. Not a big deal if you know about it but it could be confusing for people that are trying to look it up I guess.
The other day I tried to adapt the program for Russian users. After replacing the Japanese font into Russian, the program now is only work on VirtuaNES. And after replacing some unused characters of signs, which does not define VirtuaNES, the program stopped to work on this emulator.
Here is what it gives:
More like some sort of protection or something like that. Who could fix this?
Link to the patch:
http://www.fayloobmennik.net/6989500
That message, when translated, implies to me it's no longer detecting the keyboard. VirtuaNES may be only enabling the keyboard based on the hash of the file.
lidnariq wrote:
That message, when translated, implies to me it's no longer detecting the keyboard. VirtuaNES may be only enabling the keyboard based on the hash of the file.
This error also shows on other emulators. You can see this error after changing any graphic tiles on the FB rom.
Perhaps this is due to the DIP-switches of the FB rom.
lancuster wrote:
after changing any graphic tiles on the FB rom.
That
even more strongly implies that all of these emulators are only emulating the keyboard when the hash of the file is correct.
lancuster wrote:
Perhaps this is due to the DIP-switches of the FB rom.
None exist. The only switch either completely enables or disables the battery-backed RAM in the Family Basic cartridge.
The first word of the message is transliterated "keyboard".
If it helps, the letters are:
キーボード ヲ セツゾク シテクダサイ
lancuster wrote:
(Pretty sure it's saying something like "please connect the keyboard" like was suggested earlier, but I don't know enough Japanese to say for certain.)
Edit: Accidentally used ラ instead of ヲ.
It is actually:
キーボード ヲ セツゾク シテクダサイ
But yeah, it meant "Please connect the keyboard".
Gilbert wrote:
It is actually:
キーボード ヲ セツゾク シテクダサイ
But yeah, it meant "Please connect the keyboard".
Ah, thanks for the correction. I thought I'd double checked that one, but somehow I still got it wrong.
Yes and as Lidnariq says, that error shows up (in V3 only, earlier Family BASIC just shows a black screen when no keyboard are connected) because emulators automatically connects the keyboard when detecting one of the Family BASIC ROM hashes. But you can still connect one manually in most emulators if you have hacked the ROM. In most emulators including Nestopia you select it from a menu and in FCEUX you press Scroll Lock.
Pokun wrote:
Yes and as Lidnariq says, that error shows up (in V3 only, earlier Family BASIC just shows a black screen when no keyboard are connected) because emulators automatically connects the keyboard when detecting one of the Family BASIC ROM hashes. But you can still connect one manually in most emulators if you have hacked the ROM. In most emulators including Nestopia you select it from a menu and in FCEUX you press Scroll Lock.
It doesn't working.
I tried, but no results. Can someone to remove this hash verification?
lancuster wrote:
Pokun wrote:
Yes and as Lidnariq says, that error shows up (in V3 only, earlier Family BASIC just shows a black screen when no keyboard are connected) because emulators automatically connects the keyboard when detecting one of the Family BASIC ROM hashes. But you can still connect one manually in most emulators if you have hacked the ROM. In most emulators including Nestopia you select it from a menu and in FCEUX you press Scroll Lock.
It doesn't working.
I tried, but no results. Can someone to remove this hash verification?
In FCEUX just go to the
Config menu, choose
Input..., and and under
Famicom Expansion Port select
Family Keyboard.
Other emulators should have similar things for selecting input devices
lancuster wrote:
Can someone to remove this hash verification?
The hash verification is used to detect the Family Basic ROM and enable the keyboard automatically, if you remove it, the keyboard will still not work.
tokumaru wrote:
lancuster wrote:
Can someone to remove this hash verification?
The hash verification is used to detect the Family Basic ROM and enable the keyboard automatically, if you remove it, the keyboard will still not work.
And how to be in this case? I'm trying to adapt the ROM for VirtuaNES and I'm getting the same error. How can I bypass this verification if it can't be disabled? ScrollLock doesn't work.
rainwarrior wrote:
lancuster wrote:
Pokun wrote:
Yes and as Lidnariq says, that error shows up (in V3 only, earlier Family BASIC just shows a black screen when no keyboard are connected) because emulators automatically connects the keyboard when detecting one of the Family BASIC ROM hashes. But you can still connect one manually in most emulators if you have hacked the ROM. In most emulators including Nestopia you select it from a menu and in FCEUX you press Scroll Lock.
It doesn't working.
I tried, but no results. Can someone to remove this hash verification?
In FCEUX just go to the
Config menu, choose
Input..., and and under
Famicom Expansion Port select
Family Keyboard.
Other emulators should have similar things for selecting input devices
If you seen this error - this trick isn't gonna work.
lancuster wrote:
rainwarrior wrote:
In FCEUX just go to the Config menu, choose Input..., and and under Famicom Expansion Port select Family Keyboard.
Other emulators should have similar things for selecting input devices
If you seen this error - this trick isn't gonna work.
It's not a "trick", it's how you connect the keyboard in FCEUX.
...and it
does work. I can make the error screen appear by switching the setting to
<none> and rebooting, and it recognizes the keyboard again when I set it back to
Family Keyboard.
All the hash detection does is change that setting to Family Keyboard automatically, you can do the same thing manually. I can change the file hash with a trivial edit to the ROM, and it doesn't automatically set the keyboard up when I run it (i.e. error screen) but I can still plug it in via the settings no problem.
What I meant was: the hash check isn't preventing the keyboard from working on the modified ROM, it's just automatically enabling it for the unmodified ROM. If you remove the hash check, the keyboard simply won't be automatically enabled for the unmodified ROM anymore, and you'll get the same error message would both ROMs, which doesn't solve your problem. Just enable the keyboard manually.
tokumaru wrote:
What I meant was: the hash check isn't preventing the keyboard from working on the modified ROM, it's just automatically enabling it for the unmodified ROM. If you remove the hash check, the keyboard simply won't be automatically enabled for the unmodified ROM anymore, and you'll get the same error message would both ROMs, which doesn't solve your problem. Just enable the keyboard manually.
Yeah, now its work. Thanks.
But there was another problem. The program doesn't want to identify the replaced symbols in VirtuaNES. I replaced the Shift-N, Shift-M and Shift-< on Russian (Japanese) layout to ":", ";" and "*". And the program doesn't want to define them as symbols.
Here is error screen:
Attachment:
err.PNG [ 221.72 KiB | Viewed 2653 times ]
I'm not sure what you did? Did you just change the CHR ROM or did you hack the game's code?
That syntax error looks weird. Usually it should say what line you have an error in unless you input a command in direct mode (not using a line number). But your screenshot doesn't show any direct mode inputs.
Does the same thing happen on the clean ROM?
rainwarrior wrote:
lancuster wrote:
Pokun wrote:
Yes and as Lidnariq says, that error shows up (in V3 only, earlier Family BASIC just shows a black screen when no keyboard are connected) because emulators automatically connects the keyboard when detecting one of the Family BASIC ROM hashes. But you can still connect one manually in most emulators if you have hacked the ROM. In most emulators including Nestopia you select it from a menu and in FCEUX you press Scroll Lock.
It doesn't working.
I tried, but no results. Can someone to remove this hash verification?
In FCEUX just go to the
Config menu, choose
Input..., and and under
Famicom Expansion Port select
Family Keyboard.
Other emulators should have similar things for selecting input devices
Ah my bad, sorry about that. Scroll Lock only toggles the enabling of the Fami keyboard inputs via your computer keyboard, it doesn't connect it.
Of course, I changed the values in ROM.
In short. This problem would not exist if STTONES would support savestates from FCEU/FCEUX and Nestopia.
lancuster wrote:
Of course, I changed the values in ROM.
In short. This problem would not exist if STTONES would support savestates from FCEU/FCEUX and Nestopia.
Savestates are generally incompatible between emulators, but save RAM can usually be shared. In FCEUX this goes in the "sav" folder by default, and is an 8 KB file that should be usable with most other emulators if you just put it in the correct place and/or rename it.
rainwarrior wrote:
lancuster wrote:
Of course, I changed the values in ROM.
In short. This problem would not exist if STTONES would support savestates from FCEU/FCEUX and Nestopia.
Savestates are generally incompatible between emulators, but save RAM can usually be shared. In FCEUX this goes in the "sav" folder by default, and is an 8 KB file that should be usable with most other emulators if you just put it in the correct place and/or rename it.
Will this work with STTONES? Will not give a black screen? Savestate from VirtuaNES weighs 25.192 bytes.
lancuster wrote:
Will this work with STTONES?
You would have to explain what STTONES means.
lancuster wrote:
Will not give a black screen? Savestate from VirtuaNES weighs 25.192 bytes.
NOT savestates. I'm talking about save RAM. VirtuaNES will save it in the "save" folder by default, and it is also an 8 KB file with a .sav extension, same as FCEUX, same as most emulators will store it.
rainwarrior wrote:
lancuster wrote:
Will this work with STTONES?
You would have to explain what STTONES means.
lancuster wrote:
Will not give a black screen? Savestate from VirtuaNES weighs 25.192 bytes.
NOT savestates. I'm talking about save RAM. VirtuaNES will save it in the "save" folder by default, and it is also an 8 KB file with a .sav extension, same as FCEUX, same as most emulators will store it.
File RAM does nothing, have checked more than once. Only need savestates (*.st0-.st9) completely written game with the RUN command at the end. And, seems to be, games made for STTONES, written using the real keyboard on VirtuaNES. That's why without the original keyboard, the program doesn't want to work correctly on this emulator.
lancuster wrote:
File RAM does nothing
The game has a battery backed RAM.
I believe what you need to do to use it is type the "BACKUP" command before turning the emulator off, which will preserve the program in its battery backed save RAM. (There might be a second step, "BGGET" for saving graphics too, check the manual.)
I have tried this and been able to transfer a saved program from one emulator to another by copying the .sav file.
rainwarrior wrote:
lancuster wrote:
File RAM does nothing
The game has a battery backed RAM.
I believe what you need to do to use it is type the "BACKUP" command before turning the emulator off, which will preserve the program in its battery backed save RAM. (There might be a second step, "BGGET" for saving graphics too, check the manual.)
I have tried this and been able to transfer a saved program from one emulator to another by copying the .sav file.
It's too hard for me. I've done a lot of work to optimize this program for VirtuaNES, and I really want to write and save data on it. Just tell me is it possible to optimize the special characters like ":", ";" and "*" to display them in VirtuaNES and ran it without crashing? I would also like to know why after replacing the graphics in FB, on the emulator FCE Ultra program shows an error for 2-3 seconds and then goes crazy and constantly triggered a RETURN command.
I think that received FB games from savestates still need to turn on the keyboard, otherwise, the game is just to buggy. Maybe, should to disable the hash verification.
The hash does exactly one thing, and only one thing:
It automatically turns on the keyboard when the hash matches.
That's it. Nothing more.
lidnariq wrote:
The hash does exactly one thing, and only one thing:
It automatically turns on the keyboard when the hash matches.
That's it. Nothing more.
So, if you write a game on a modified version of FB, in the future will have to enable the keyboard to play in the game? How the game will behave on a real console?
You should think "enabling the keyboard in the emulator" as identical to "plugging the keyboard into the Famicom"
Now I only care about whether future games to work without the mandatory inclusion of the keyboard. As for the emulator, and on consoles.
Somewhere on one site I have found information that you can copy and paste the code in Family BASIC. How this is done, anyone tried it?
Some emulators supports "pasting" text you have in the clipboard into Family BASIC. Nestopia and maybe Virtuanes supports this I think. It's a macro where the emulator types everything in your clipboard in the game, it takes a while if it's a big program. Copying text in Family BASIC isn't possible, best you can do is screenshot it.
How to paste code into Nestopia?
Who knows, the engine of this program can support sprites larger than 2x2 tiles?
The command DEF SPRITE allows you to define each 8x8 sprite (OAM entry) manually, if I remember correctly, while DEF MOVE will automatically make an animated 2x2 character metasprite. It was a long time ago I played around with this so I can't really help, sorry.
lancuster wrote:
How to paste code into Nestopia?
It's in the emulator menu I think. Or just press F12.
So I can insert sprites Mario or another character from another game without any changes? I'm asking to know if the game will work normally after I specify a larger number of tiles.
Yes it should work. Though I'd test with a few sprites first to make sure it works as you expect. You need to follow the same format for animations to work.
I checked the manual and it seems DEF SPRITE doesn't simply make an OAM entry as I thought. It makes an animated 2x2 character big metasprite if you pass a 1 to parameter B (as explained in the manual on page 88). You have to pass 0 to parameter B if you only want a single 8x8 dot sprite (but it's also animated).
Just remember that doing bigger metasprites is going to take more code and therefore also use up more program memory.
Clear. How to use the editor background and music which commands are responsible for it? I tried to draw back, but nothing happened.
The background editor is accessed from a new command in V3, you type BGTOOL (in earlier versions you just access it from the BASIC menu). V3 also allows saving the background to battery RAM. Read the original manual (not the V3 manual) on how to use it, and read the V3 manual to see how you save and such in V3.
Sound is done using an MML (Music Macro Language) which allows you to use the APU's two square channels and the triangle channel. It's done with the PLAY command (page 80~81 in the original manual). Sound effects are simple to do in MML, but if you want to make background music that runs in parallel to your game using MML, you'll have to write a sound engine that runs every main loop of your program.
For the noise channel you either have to
POKE the APU registers or write the sound engine in 6502 subroutines and CALL them.
I understand that a "spacebar" is responsible for the printing of tiles on the screen, and F1-F4 - for their palette. But I don't know how to choose the other tiles.
Also I wanted to clarify, whether the use of abbreviations to save more space for code.
Have you downloaded the
manual at all? It explains how to use the editor better than I can.
Yes if memory is a concern you can sacrifice readability by using more abbreviations and cut down on spaces (the interpreter mostly ignores spaces). I've never done it, but I also never done a big enough project where memory became a problem.
It turns out that the program can only play 7 notes plus the change of tone and other indicators?..
By the way, about BGTOOL in this document is not a word. Give me some examples or tutorials.
lancuster wrote:
It turns out that the program can only play 7 notes plus the change of tone and other indicators?..
The MML gives you full control of the
square duty cycle setting (Y0~Y3), hardware saw envelope flag (M1 and M0 for on and off respectively) and volume (V0~V15, V0 is silent and V15 is loudest, only works for square channel and if saw envelope is off). You also have six full octaves (O0~O5) with twelve notes each (A~#F, plus a "rest" note R), eight levels of tempo per note (T1~T8) and a length counter per note (x0~x9).
Square channel 1 is called channel A in the manual, Square channel 2 is B and the Triangle channel is C. You can play all three of them at the same time as explained in the manual (multiphonic).
Making a sound engine in Family BASIC is probably very memory consuming so it's quite rare to see games with background music. Most games only use it for sound effects or when playing a short Title Screen or Game Over melody when the game isn't accepting input from the player, so that a sound engine isn't needed.
Quote:
By the way, about BGTOOL in this document is not a word. Give me some examples or tutorials.
BGTOOL is a command in V3 only, and the original manual doesn't mention it. The name of the actual editor is BG GRAPHIC. Usage is explained on page 40 in the manual. The main difference in V3 is that you don't type SYSTEM (that will shut down the game), instead you type BGTOOL to access it. Read from page 40 and ask again if there's something that's not clear.
The V3 manual can be found
here. I included the translation in the attachment of this post.
I just got back to deal.
I would like to find out what values are responsible for including BIGTOOL and other commands that can't be entered on a standard keyboard, due to the lack of such keys. Who can tell how to find these values in the ROM to move commands to existing keys for programming without a proprietary keyboard?
Like this:CTRL+W - change language to English
CTRL+V - change language to Japanese
It's BGTOOL not BIGTOOL and doesn't require any special characters to enter. But it's only available in V3. If it doesn't work I guess you are running V1 or V2.
I'm not sure what you are talking about standard keyboard. There is only one keyboard for Famicom unless you are using a Famiclone one? Or are you running on an emulator? The emulator should emulate all keys, but it may fail to support all PC keyboards. Some emulators doesn't allow my Swedish keyboard to use all keys (I forgot which).
For control codes look at page 104 in the manual. For example CTR+V is the same as the kana key and CTR+W goes back into alphanumeric mode. CTR+G is the same as entering BEEP and the most useful of all: CTR+D (restores sprites, palettes etc to default).
Pokun wrote:
It's BGTOOL not BIGTOOL and doesn't require any special characters to enter. But it's only available in V3. If it doesn't work I guess you are running V1 or V2.
I'm not sure what you are talking about standard keyboard. There is only one keyboard for Famicom unless you are using a Famiclone one? Or are you running on an emulator? The emulator should emulate all keys, but it may fail to support all PC keyboards. Some emulators doesn't allow my Swedish keyboard to use all keys (I forgot which).
For control codes look at page 104 in the manual. For example CTR+V is the same as the kana key and CTR+W goes back into alphanumeric mode. CTR+G is the same as entering BEEP and the most useful of all: CTR+D (restores sprites, palettes etc to default).
On the emulator. I tried to find the missing keys on the keyboard (like "GRAPH") and didn't find them. On Virtuanes doesn't want to be printed ":" and ";". Because STТONES only supports Virtuanes, I'll have to have programming on it.
The
online help of VirtuaNES lists some of the key assignments:
STOP: End
CLR/HOME: Home
GRAPH: Press and hold/release PageDown,PageUp
KANA: F12
Gilbert wrote:
GRAPH: Press and hold/release PageDown,PageUp
How practical is that on laptops where PageDown and PageUp are behind the Fn modifier key? On a Dell Inspiron 11 3000 series, for example, they're Fn+Down and Fn+Up.
Don't know, as I never used VirtuaNES myself (though it's EXTREMELY popular in Japan, especially for those using Family Basic).
There doesn't seem to have any way to
reassign keys either. This makes me wonder, in that case, haven't laptop users complained already, because of its popularity? Maybe it's possible to do that by editing an INI file?
This reminded me of the IBM (now Lenovo) ThinkPad laptop line, whose keyboards still did not have the Window keys many years after the release of Win95 (until quite recently), which was quite annoying. You might repurpose some other keys for this though as far as I remember, which was a big bummer considering you have to sacrifice at least one of your Ctrl or Alt keys for this.
Lack of Super keys (sometimes called Windows keys) on a laptop isn't quite as much of a loss as one might think, as Ctrl+Esc opens the Start menu. Mostly you lose the extra window management shortcuts added over the years.
Mostly the complaints about lack of a Super key come from people in occasional threads on Hacker News (e.g.
2013 and
2017) trying to use a Model M keyboard on a Mac through a USB adapter. Normally, you'd map Command and Option to Alt and Super or vice versa. But on a keyboard without a Super key, you'd have to map left Alt to Command and right Alt to Option, as if they were the apple keys on an Apple II, II Plus, or pre-platinum IIe. Macs are one reason why
Unicomp's continuation of the Model M has a Super key.
lancuster wrote:
Pokun wrote:
I'm not sure what you are talking about standard keyboard. There is only one keyboard for Famicom unless you are using a Famiclone one? Or are you running on an emulator? The emulator should emulate all keys, but it may fail to support all PC keyboards. Some emulators doesn't allow my Swedish keyboard to use all keys (I forgot which).
On the emulator. I tried to find the missing keys on the keyboard (like "GRAPH") and didn't find them. On Virtuanes doesn't want to be printed ":" and ";". Because STТONES only supports Virtuanes, I'll have to have programming on it.
Oh I see, yeah both Virtuanes and Nestopia suck because not all keys work and you can't remap them in Virtuanes. I think I typed in programs in a text file in Windows, pasted it in Nestopia with F12 and then saved it to a tape and loaded it in Virtuanes to get it to work with SSTONES.
Gilbert wrote:
The
online help of VirtuaNES lists some of the key assignments:
STOP: End
CLR/HOME: Home
GRAPH: Press and hold/release PageDown,PageUp
KANA: F12
Hmmm, interesting, thanks.
But how to write ":" sign? VirtuaNES can't wrote this sign from the keyboard.