Help with Family Basic & question about 2nd controller mic

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

Previous topic - Next topic

UglyJoe

Quote from: P on July 29, 2012, 10:54:51 am
So the calculator are using floats with 6502 assembly or do the V2.1 support floating points?
If not then most likely V2.1 is mostly a bug fix, manual correction and said update of the calculator.


The calculator must be making use of a 6502 floating point library.  2.0, 2.1, and 3.0 all use integers when in BASIC mode.

Frank_fjs

Just checked and I have V2.1A.

Re the manual, is there not a decent scan of it available online anywhere?

Maybe we could work as a team and divide the workload of scanning in the manual? E.g. I could do the first 40 pages, someone else the next 40 and so on.

UglyJoe

Quote from: 80sFREAK on July 30, 2012, 04:47:50 am
What about famiclones with keyboard? Just patch over the original FB?


I don't have any clone BASIC hardware, so I'm not sure.  I know, in at least one instance, 133MHz told me that his clone gave him a syntax error when he tried to use the SAVE/LOAD commands.  This would imply that the hackers did alter the software in some way, at least enough to make those commands throw syntax errors rather than attempt to save/load data to/from the tape drive.

Quote from: 80sFREAK on July 30, 2012, 04:47:50 am
Good thing, that is possible to make small subroutines in 6502 code and execute'em from Basic programm


Yeah, it's something I've only barely tried.  Maybe someday I'll get really bored and try to port the Woz's Apple II floating point code :D

UglyJoe

Quote from: 80sFREAK on July 30, 2012, 07:01:59 am
Only the problem is very limited RAM. 8kB would be much better. Make one out of DragonQuest? :)
Oh, just remebered one thing - hows memory size defined? Fixed or software testing memory on startup?


I don't know, but I would bet that it's fixed.

I have another idea to investigate, though: is the calculator app's floating point library still in memory when you are using BASIC?  If so, one could probably just POKE the arguments into the right locations and then CALL the floating point routines.

Frank_fjs

I've been having fun going through the book and coding away.

Still can't seem to work out how to perform multiple tasks simultaneously, but I'll get there. E.g. I code some music then gosub to a different part of the program to execute some other stuff whilst the music plays in the background, however it never jumps until the music has stopped playing which defeats the purpose of what I'm trying to do.

Also have to work out if you can create & use your own sprites, I have a feeling that you're restricted to the built in presets though. Need to work out sound effects too, the manual says there is an effect generator but doesn't mention how to use it anywhere.

Frank_fjs

Music editor is fun too, though rather simple and restrictive it is very easy to use.

Had a bit of fun getting a rough version of Alex Kidd intro music in there. :D

http://www.youtube.com/watch?v=KmI6pE8WkMo

Quote from: Frank_fjs on August 01, 2012, 07:39:34 am
Still can't seem to work out how to perform multiple tasks simultaneously, but I'll get there. E.g. I code some music then gosub to a different part of the program to execute some other stuff whilst the music plays in the background, however it never jumps until the music has stopped playing which defeats the purpose of what I'm trying to do.
Quote from: 80sFREAK on August 01, 2012, 07:45:48 am
i don't think it's possible



Well that's unfortunate. I know it's Basic but I was expecting a little more flexibility and power. :)

UglyJoe

Quote from: Frank_fjs on August 01, 2012, 07:39:34 am
Still can't seem to work out how to perform multiple tasks simultaneously, but I'll get there. E.g. I code some music then gosub to a different part of the program to execute some other stuff whilst the music plays in the background, however it never jumps until the music has stopped playing which defeats the purpose of what I'm trying to do.


Not possible.  It only does one task at a time.  If you wanted to create background music, you'd have to setup a routine that plays one "note" at a time and call that routine in each iteration of your main program loop.

Quote from: Frank_fjs on August 01, 2012, 07:39:34 am
Also have to work out if you can create & use your own sprites, I have a feeling that you're restricted to the built in presets though.


You are stuck with the existing graphics, but you can arrange the graphics into your own sprites.  You could make half-crab/half-mario sprite, for example.

Quote from: Frank_fjs on August 01, 2012, 07:39:34 am
Need to work out sound effects too, the manual says there is an effect generator but doesn't mention how to use it anywhere.


There is indeed a "noise" channel on the FC, but I'm not sure how to use it via BASIC commands.  I'd have to check the manual for that one.  Otherwise, you make sound effects by playing really short "music" sequences.

Frank_fjs

Thanks for the answers Joe, I suspected as much. Guess my game won't be featuring background music then. it would run too slow if I did it the way you suggested. I might just do some intro music and leave it at that.

Re the sound effect generator, it's mentioned in the specifications of the manual (it states the 3 main music channels + 1 additional effects generator) but nowhere does it mention how to access it. I know about the trick you suggested re making quick little sequences of notes, just thought there might be something more powerful available.

Going to have to be creative me thinks!

fredJ

I just wonder, all the games basically involve the character sprite, avoiding an enemy or obstacle?
Selling  Japanese games in Sweden since 2011 (as "japanspel").
blog: http://japanspel.blogspot.com

P

There is one sample game that seems to be a compatibility check horoscope thingy (using the microphone even) so no dodging there.

Quote from: Frank_fjs on July 29, 2012, 08:03:22 pm
Maybe we could work as a team and divide the workload of scanning in the manual? E.g. I could do the first 40 pages, someone else the next 40 and so on.

I guess it's quite a lot of work to scan that thing? I heard it's not just thick but also larger than A4 or Letter size. I wouldn't be able to translate the whole thing anytime soon but we could start with the most important things. If you find any important looking pages that are not yet translated you could try scanning it and see if we find something useful. It helps if you can read katakana though (as you can find English loan words in Japanese that way).

What no graphics drawing and no music? Maybe you could draw pixels with assembly calls?

BTW here is the changing of batteries part that I skipped last time, translated as promised:
Spoiler
Regarding changing batteries........

* The cartridge makes use of 2 dry cell AA batteries for memory backup use.
When setting the backup switch to ON, it's life is about 2 months (if using SUM-3(E) dry cell AA batteries). When set to OFF the electricity consumption rate becomes large, and it's life span becomes shorter.
* If the batteries are replaced when the cartridge is inserted to the Family Computer (and the main unit is ON), stored data, programs and such remains but, if batteries are changed when the cartridge is not inserted it will disappear.
* Please look at the "Warnings concerning the handling of batteries" on page 111.
[close]


Edit: I see that page 111 is already translated by that other guy.

Frank_fjs

Re translating the manual, I've downloaded the one we linked to before and it's really good. He only missed pages 1 to 15 and pages 114-117, so it wouldn't be much work to translate the last 20 odd pages.

Re music, you can code it of course but nothing else can happen whilst it's playing so it's kind of pointless.

I don't know why, but  I thought this (family Basic)was going to be a bit more powerful/flexible but I guess it was aimed more at the average gamer/novice programmer, and in that regard it does work well.

UglyJoe

Quote from: 80sFREAK on August 02, 2012, 05:12:55 am
Woz's style assembler

10 !ORG &1000h
20 !NOP
30 !NOP
40 !RET
50 !END
doesn't work


What made you think it would work that way?

fredJ

Is it possible to do anything fun with it, other than very simple games?
Selling  Japanese games in Sweden since 2011 (as "japanspel").
blog: http://japanspel.blogspot.com

fredJ

Selling  Japanese games in Sweden since 2011 (as "japanspel").
blog: http://japanspel.blogspot.com

fredJ

in reality , it would be cool with linux, but actually I would like to make some kind of graphical demo. Not with sprites, but with pixels. Like a screensaver.
Is it possible to create anything other than simple sprite-based games?
Selling  Japanese games in Sweden since 2011 (as "japanspel").
blog: http://japanspel.blogspot.com