Welcome, Guest. Please login or register.
Did you miss your activation email?
September 16, 2019, 03:21:43 AM
Home Famicom World Search Calendar Login Register

+  Famicom World
|-+  Family Computer
| |-+  Famicom / Disk System (Moderators: manuel, L___E___T)
| | |-+  LOCATE F,B: The Family BASIC Wiki
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: LOCATE F,B: The Family BASIC Wiki  (Read 143 times)
noattack
Famiclone
*
Posts: 5


« on: September 13, 2019, 07:10:43 PM »

Hello,

In the past few weeks, I've taken up an interest in Family BASIC, including writing an article about making a game with the software:  http://metopal.com/2019/09/02/family-basic-in-2019/. While working on the game, I relied heavily on the contributions of many community members here, especially the translators who put so much work into the English versions of the FB manuals.

However, I thought it was a lot of work having to bounce between multiple PDFs, sites, and text files to reference FB materials, so I decided to start compiling the information into a wiki called LOCATE F,B: ex-artist.com/fb/

The site is fairly skeletal at the moment, but I've prioritized compiling a reference list of Family BASIC Keywords & Syntax (which is not yet complete). Right now I'm doing some light edits to the existing translations, but I plan to rewrite many of the entries for better clarity and redo some of the Japanese translations. Especially in the V2 manual, the translations are pretty literal/clunky, and make many of the keywords  and programming terminology difficult to understand. For instance, using "grammar" instead of the more appropriate "syntax," or "working" instead of "function" to describe a keyword's purpose. (This is no disrespect to the original translators—translation is difficult, time-consuming, and never perfect.)

I'd also like to transcribe and archive any program listings or applications folks have made, old or new—especially those things that might otherwise be lost. Today, for instance, I documented and translated an old Windows utility called FamilyBasicEditor: http://ex-artist.com/fb/doku.php?id=familybasiceditor. More importantly, documenting that obscure application meant recovering six Family BASIC games the author had made using the app's proprietary file formats: http://ex-artist.com/fb/doku.php?id=program_list_archive. These are FB games made in the 2000s, so they're an interesting historical document.

Hopefully folks looking to dabble in FB programming will find this resource helpful, and I plan to continue to add and edit items in the coming weeks. But I could use help with a few things:
  • Feedback on organization and style. There's some basic organization in place, but it's not too late to re-organize some things. If you have suggestions, feel free to post here.
  • Links to documents or resources for archiving. Game listings and book scans are particularly useful. Have you ever made a FB game? Let me know and send it my way! It's worth preserving, no matter how inconsequential you think it might be.  Grin
  • Technical help: all versions of FB include the keywords SPC and TAB that are no documented anywhere I've found. I've tried using them in a program, but can't manage to figure out their use. Have info? lmk
  • If anyone has the patched VRC7 v2.1 or v3...um, files...please lmk. I can't get the patch application to work (but I do have the MMC5 file). Also, if you've used Makimura's FB hacks, let me know. I'm currently transcribing their program lists, and any information (esp. about how the keywords work) is helpful.

Also, I will be listing credits on the Wiki for all the folks whose work I've integrated in the site. And thanks to all of you who made this project possible!
Logged
UglyJoe
Administrator
Disk-kun
*****
Gender: Male
United States United States
Posts: 5474



WWW
« Reply #1 on: September 14, 2019, 03:10:59 AM »

Very cool stuff!

I'm assuming you already found the Family BASIC Super Thread here?  There are a few program listing threads in there (along with other references).

  • Technical help: all versions of FB include the keywords SPC and TAB that are no documented anywhere I've found. I've tried using them in a program, but can't manage to figure out their use. Have info? lmk

I doubt I'll get a chance to look into this in the next few days, but this is my guess: they're not actually commands.

If you've poked around FB in an emulator and checked out how the programs get stored in memory, you'll see that each command really only takes one byte.  That is, it's not using six bytes to store "LOCATE" or five bytes to store "CGSET" (and so on), it's just using one byte per command.  There is a table of commands (of sorts) stored in the rom (I'm guessing this is where you saw the two commands).  I think the bytes used to store the program translate to indices in the table.  My suspicion is that SPC and TAB are merely placeholders in that table and they represent literal spaces and tabs in the stored program.

But then it's about midnight here, I'm rather tired, and I haven't messed with FB in an emulator for like five years, so maybe I'm completely wrong Embarrassed
Logged
80sFREAK
Sharp C1
*****
Gender: Male
Posts: 1220

Hardware freak


« Reply #2 on: September 14, 2019, 05:22:54 AM »

Quote
My suspicion is that SPC and TAB are merely placeholders in that table and they represent literal spaces and tabs in the stored program.
Yup, some dialects of Basic utilize them as

SPC(n), where n is amount of "spaces"(&20h)
TAB(n), where n is amount of tabulation(could be 4,6 or 8 spaces for one tabulation)

SPC and TAB are from v3, isn't it? Just checked my disasm, they presented in the token list, but  using them will genereate "ERROR"

Quote
If anyone has the patched VRC7 v2.1 or v3...um, files...please lmk. I can't get the patch application to work (but I do have the MMC5 file). Also, if you've used Makimura's FB hacks, let me know. I'm currently transcribing their program lists, and any information (esp. about how the keywords work) is helpful.
While ago i just soldered YM2413 to v2.x cart, mapped as VRC7, and tried test programm to squize out some tunes. Unfortunately, i'm not a musician, so cart with sound chip went to the "storage box".
« Last Edit: September 14, 2019, 05:37:23 AM by 80sFREAK » Logged

I don't buy, sell or trade at moment.
UglyJoe
Administrator
Disk-kun
*****
Gender: Male
United States United States
Posts: 5474



WWW
« Reply #3 on: September 14, 2019, 03:40:37 PM »

SPC and TAB are from v3, isn't it? Just checked my disasm, they presented in the token list, but  using them will genereate "ERROR"

They're in 2.1, as well.  My theory doesn't hold water, anyway.  It's storing spaces internally as 0x20 (even if you use multiple spaces).
Logged
noattack
Famiclone
*
Posts: 5


« Reply #4 on: September 14, 2019, 06:00:33 PM »

Yeah, SPC and TAB are both perplexing. I've tried every syntax I can think of, but everything throws an error. However, they appear to be reserved keywords, as FB won't let you assign a variable to SPC or TAB.

My best guess at this point, without looking at a disassembly, is that they're reserved but not implemented? Maybe a vestigial holdover from their parent language? Too bad, since they'd be useful in situations where you want to control spacing and have to type lots of blank "   "s to get the proper distance.
Logged
UglyJoe
Administrator
Disk-kun
*****
Gender: Male
United States United States
Posts: 5474



WWW
« Reply #5 on: September 14, 2019, 07:38:43 PM »

My best guess at this point, without looking at a disassembly, is that they're reserved but not implemented?

That's my new current guess, but I'm going to try and poke around the rom a bit more.

Too bad, since they'd be useful in situations where you want to control spacing and have to type lots of blank "   "s to get the proper distance.

You can do tabbed output with the PRINT command by separating your strings with commas.

Code:
PRINT "A","B","C","D"
Logged
80sFREAK
Sharp C1
*****
Gender: Male
Posts: 1220

Hardware freak


« Reply #6 on: Yesterday at 04:45:57 AM »


SPC and TAB are from v3, isn't it? Just checked my disasm, they presented in the token list, but  using them will genereate "ERROR"

They're in 2.1, as well.  My theory doesn't hold water, anyway.  It's storing spaces internally as 0x20 (even if you use multiple spaces).
My disasm is for v2.0
Code:
TOKENLST:   .byte "€GOTOGOSUB‚RUNƒRETU"
            .byte "RN„RESTORE…THEN†LIST"
            .byte "‡SYSTEMˆTO‰STEPŠSPRI"
            .byte "TE‹PRINTŒFORNEXTŽPA"
            .byte "USEINPUTLINPUT‘DAT"
            .byte "A’IF“READ”DIM•REM–ST"
            .byte "OP—CONT˜CLS™CLEARšON"
            .byte $9B
            .byte "OFFœCUTNEWžPOKEŸCGS"
            .byte "ET VIEW¡MOVE¢END£PLA"
            .byte "Y¤BEEP¥LOAD¦SAVE§POS"
            .byte "ITION¨KEY©COLORªDEF«"
            .byte "CGEN¬SWAP­CALL®LOCAT"
            .byte "E¯PALET°ERAïXORðORñA"
            .byte "NDòNOTó<>ô>=õ<=ö=÷>ø"
            .byte "<ù+ú-ûMODü/ý*ÊABSËAS"
            .byte "CÌSTR$ÍFREÎLENÏPEEKÐ"
            .byte "RNDÑSGNÒSPCÓTABÔMID$"
            .byte "ÕSTICKÖSTRIG×XPOSØYP"
            .byte "OSÙVALÚPOSÛCSRLINÜCH"
            .byte "R$ÝHEX$ÞINKEY$ßRIGHT"
            .byte "$àLEFT$áSCR$"
            .byte $FF
TOKENJMP:   .word $9146,$90C6,$857C,$9126
            .word $98E0,$836D,$85AF,$80D7
            .word $836D,$836D,$A7F3,$8740
            .word $927E,$930D,$9198,$93C2
            .word $94F6,$8343,$9204,$994D
            .word $964E,$8343,$86DA,$8717
            .word $AB75,$9226,$954D,$836D
            .word $C0F0,$8382,$91DF,$A746
            .word $A932,$C0CE,$820B,$9A1D
            .word $B30F,$97FC,$978C,$C0B6
            .word $95AA,$BA4E,$A887,$A6CA
            .word $9496,$918C,$91CA,$A6EA
            .word $C0ED
TOKENJMP2:  .word $A369,$A40A,$A485,$A31A
            .word $A3FF,$A358,$A39F,$A379
            .word $836D,$836D,$A5FB,$A6AA
            .word $A6B9,$A346,$A34F,$A4BE
            .word $A32E,$A2F3,$A461,$A4B5
            .word $A520,$A5BD,$A574,$A41D

Code:
TOKENLST:   .byte "€GOTOGOSUB‚RUNƒRETU"
            .byte "RN„RESTORE…THEN†LIST"
Note, that token THEN is 6th in the table
Code:
TOKENJMP:   .word $9146,$90C6,$857C,$9126
            .word $98E0,$836D,$85AF,$80D7
and it's subroutine located at $836D

Code:
           .byte "RNDÑSGNÒSPCÓTABÔMID$"
Code:
TOKENJMP2:  .word $A369,$A40A,$A485,$A31A
            .word $A3FF,$A358
            .word $A39F,$A379         ;RND, SGN
            .word $836D,$836D,$A5FB,$A6AA;SPC, TAB, MID$
            .word $A6B9,$A346,$A34F,$A4BE
            .word $A32E,$A2F3,$A461,$A4B5
            .word $A520,$A5BD,$A574,$A41D
SPC and TAB utilizing same $836D routine, which appeared to be "error handler" or something like that. There is also tricky code  Embarrassed
Code:
L836D:      lda #$01
            .byte $AE
L836D+2:    lda #$04
            jmp LA98F

At $A98F located main routine of "error handler". Parameter sent in A.
« Last Edit: Yesterday at 05:30:24 AM by 80sFREAK » Logged

I don't buy, sell or trade at moment.
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!