Thread in English for Fujitsu FM7

Avatar de Usuario
pser1
Mensajes: 2013
Registrado: 08 Dic 2012 18:34
Agradecido : 198 veces
Agradecimiento recibido: 181 veces

Re: Thread in English for Fujitsu FM7

Mensajepor pser1 » 25 Jun 2017 15:59

Último mensaje de la página anterior:

malikto999 escribió:The binary file format of F-BASIC exports sectors (1sector=256 bytes) of FD as it is, so there is an extra 0 at the end.
Just import does not check end 0, so it is unnecessary if you create your own file.
However, if the file size is less than 272 bytes in the format check at the time of import, it is set as an error.
This assumes header 16 bytes + sector 256 bytes (minimum 1 sector).
So please add 0 to the end if the imported file size is less than 272 bytes.

Thanks for that point!
Untill now all files compiled gave an output greater than 272 bytes, so this problem did not arise.
cheers
pere

Avatar de Usuario
pser1
Mensajes: 2013
Registrado: 08 Dic 2012 18:34
Agradecido : 198 veces
Agradecimiento recibido: 181 veces

Re: Thread in English for Fujitsu FM7

Mensajepor pser1 » 25 Jun 2017 16:14

malikto999 escribió:I searched for Tiburon (Shark), but I did not know exactly what kind of game it was.

Right, this game has not yet been 'officially' released. I am waiting for the graphics designer's OK
in order to do that.
Anyway I am attaching here a VDK file that can be used on XRoar or MAME emulating a Dragon32
- Issuing RUN"TE" the game will start in english language
- Issuing RUN"VERPANT" you will see all of the screens used on that game. To change from one to the next just press 'C' key
If you had any problem using it on XRoar I would prepare a zip file containing an XRoar configured
to load the VDK and start the game automatically (for Windows only)
pere
Ps in this url you will find the whole thread (retrowiki) from the initial idea till the 'final version'
viewtopic.php?f=62&t=771
39 - DemoTiburonV37C.zip
(73.22 KiB) Descargado 12 veces

Avatar de Usuario
pser1
Mensajes: 2013
Registrado: 08 Dic 2012 18:34
Agradecido : 198 veces
Agradecimiento recibido: 181 veces

Re: Thread in English for Fujitsu FM7

Mensajepor pser1 » 25 Jun 2017 16:36

malikto999 escribió:First of all, if the original screen resolution is 256×192 and ported to FM-7's 640×200, I think that it is good to create pattern data with the original size and double it horizontally when displaying it.
That will save memory.

I have already done this but sloooowly with basic, just to verify the idea works.
As our Dragon screens are black and white 8 pixels on every byte at 256x192, I have doubled every bit so that a byte
occupies two bytes on the FM-7 VRAM giving 512x192, the image shows really great!
But the game has over 12 screens and the main characters changes from one to another very fast on the Dragon (just moving/loading 6144 bytes)
To do the same on the FM-7 I should load 16k to the main CPU RAM and then transfer it to VRAM, don't know how fast could this be.
If I have the time I will make a test.

As I wrote before, I think that the main side is better where to put the pattern data.Transfering every time you draw a pattern
does not affect speed.
If you just want to put the pattern on the sub side, there is also a way to put the pattern data in one plane of the VRAM.
In this case, the number of usable colors becomes 4 colors. It will look like an old Apple II game screen.
Set the color palette so that the plane of the pattern data is not displayed on the screen.
In this method, if it is combined with the console buffer, an area of 20KB can be secured.

Well, most probably we 'need' to learn a lot about that computer. On Dragon, to move the character we have 3 images that are
shown onto screen say 1-2-3-2 being 2 a static one and 1,3 images that give movement 'feeling'
These images have been preprocessed so that the part of the pattern that is *not* the character has value 0 so that is not 'added' to the
background image where the character will be superimpossed. Besides that one, we have another pattern which is almost the negative
of this one, it has zeroed the character bits.
Then we get a byte from the screen, AND it with that last mask and then we OR the result with the first chunk, the result is the character
over the background without losing any detail. For each movement we do that 4 times as I have said it moves 1-2-3-2
These chunks are big: 4x56 bytes on the Dragon, so will be 8x56 on FM-7 this means 448 bytes per chunk = 896 bytes per step (1-2-3)
and the global will be 2,688 bytes for the three steps. And still we need a similar area (448) to save the contents of the screen to restore
it while the character is moving .... some 3,136 bytes for only one char moving along the screen
I know this is an extreme case because 'normal' games will have smaller characters moving on the screen, but this is an adventure game
where characters are quite big ...
pere

jltursan
Mensajes: 1880
Registrado: 20 Sep 2011 13:59
Agradecido : 48 veces
Agradecimiento recibido: 141 veces

Re: Thread in English for Fujitsu FM7

Mensajepor jltursan » 25 Jun 2017 20:43

I can see a lot of information coming from Malik here, cool! -thumbup

Some random thoughts:

- The FM-7 can be pushed really hard with some clever coding. Some examples:
Fast screen switching
https://www.youtube.com/watch?v=d4PDvVtSd2M

Big sprites
https://www.youtube.com/watch?v=MjwxAbUC28g

More big sprites...and a classic game
https://www.youtube.com/watch?v=QOpDGx3G4ok

Mix of nice sprites and screen scroll
https://www.youtube.com/watch?v=dhRKlTju48o

- FM-7's 6809 works at 2Mhz and I think there's no VRAM contention. The 2Mhz must be constant during all the frame, that's a nice plus.

- I agree with malik when he says that there's no hit performance when sending data to the subCPU. Thinking about how shared RAM works, I believe that you can build a data pipeline between CPUs splitting the 128 bytes into 2x64 areas. You can work with them like when you have a graphics double buffer: CPU pushes data to first 64 bytes and launchs subCPU, then it fills data to the second area (no address collision at all), waits until subCPU finishes and launch again the process over this second area, last repeat again. This way the data flow can be mostly continous and steady.

malikto999
Mensajes: 53
Registrado: 09 Jun 2017 11:20
Agradecimiento recibido: 51 veces

Re: Thread in English for Fujitsu FM7

Mensajepor malikto999 » 26 Jun 2017 08:19

pser1 escribió:Right, this game has not yet been 'officially' released. I am waiting for the graphics designer's OK
in order to do that.
Anyway I am attaching here a VDK file that can be used on XRoar or MAME emulating a Dragon32
- Issuing RUN"TE" the game will start in english language
- Issuing RUN"VERPANT" you will see all of the screens used on that game. To change from one to the next just press 'C' key
If you had any problem using it on XRoar I would prepare a zip file containing an XRoar configured
to load the VDK and start the game automatically (for Windows only)
pere
Ps in this url you will find the whole thread (retrowiki) from the initial idea till the 'final version'
http://www.retrowiki.es/viewtopic.php?f=62&t=771
39 - DemoTiburonV37C.zip


I ran the game on XRoar. Great! How wonderful this game work on FM-7!
Is this game monochromatic for both characters and backgrounds? If so, I have a proposal.


FM-7's VRAM has three planes, blue, red, green.
You draw the background graphic on blue plane. Then draw the characters on the remaining red and green planes.
The color of the character's pattern data is assigned to the transparent color when both red and green bits are 0, and to black and white otherwise.
To superimpose characters and backgrounds, set color palettes as follows.

B R G -> ColorCode PaletteCode
-----
0 0 0 -> 0 black(0) background
1 0 0 -> 1 white(7) background
0 1 0 -> 2 black(0) character
1 1 0 -> 3 black(0) character
0 0 1 -> 4 white(7) character
1 0 1 -> 5 white(7) character
0 1 1 -> 6 white(7) character
1 1 1 -> 7 white(7) character

You can set color palettes with the COLOR command of F-BASIC or you can set them directly to $fd38-$fd3f of I/O address.
In this way, it is not necessary to perform the superimposing process, and drawing of the character is completed by writing on red and green planes.

This technique was used in the game 'dragon slayer XANADU'.

https://www.youtube.com/watch?v=OdfSO8sRppo&t=425s

It moved pretty big patterns.(watch the video from 6 minutes 12 seconds.)

Avatar de Usuario
pser1
Mensajes: 2013
Registrado: 08 Dic 2012 18:34
Agradecido : 198 veces
Agradecimiento recibido: 181 veces

Re: Thread in English for Fujitsu FM7

Mensajepor pser1 » 26 Jun 2017 17:47

malikto999 escribió:I ran the game on XRoar. Great! How wonderful this game work on FM-7!
Is this game monochromatic for both characters and backgrounds? If so, I have a proposal.

Yes, for both unfortunately!
The Dragon has the worst video generator I have ever seen!
You just can have 256x192 with two colors: black-white or black-green
To be able to play with *only* four colors the resoltution is reduced to 128x192
So the graphics designer decided to go just two colors to get the best resolution ... we all agreed with that.
FM-7's VRAM has three planes, blue, red, green.
You draw the background graphic on blue plane. Then draw the characters on the remaining red and green planes.
The color of the character's pattern data is assigned to the transparent color when both red and green bits are 0, and to black and white otherwise.
To superimpose characters and backgrounds, set color palettes as follows.
B R G -> ColorCode PaletteCode
0 0 0 -> 0 black(0) background
1 0 0 -> 1 white(7) background
0 1 0 -> 2 black(0) character
1 1 0 -> 3 black(0) character
0 0 1 -> 4 white(7) character
1 0 1 -> 5 white(7) character
0 1 1 -> 6 white(7) character
1 1 1 -> 7 white(7) character
You can set color palettes with the COLOR command of F-BASIC or you can set them directly to $fd38-$fd3f of I/O address.
In this way, it is not necessary to perform the superimposing process, and drawing of the character is completed by writing on red and green planes.

This is a great idea, malikto
First I will try to load the 6k Dragon image to main CPU RAM and process it there sending chunks of 32 already calculated bytes
to the SS that will have to send them to the blue plane or maybe sending just 16 bytes to be worked on the SubSystem
Then, step by step the 'move' code could be added with a pattern of Boss Brody and see what happens!
This technique was used in the game 'dragon slayer XANADU'.
It moved pretty big patterns.(watch the video from 6 minutes 12 seconds.)

I have seen the video, great game indeed!
Thanks a bunch for your help (explanations, ideas ...) you are very kind -drinks
pere
Ps By the way, I had almost forgotten about that ...
Would it be possible to have an electronic copy of the magazine "Oh! FM-7" from January 1985?
It seems that none of us is able to find it on the internet -banghead

malikto999
Mensajes: 53
Registrado: 09 Jun 2017 11:20
Agradecimiento recibido: 51 veces

Re: Thread in English for Fujitsu FM7

Mensajepor malikto999 » 27 Jun 2017 09:09

malikto999 escribió:
pser1 escribió:Hi,
in the last test I have done to convert an image from the Tiburon (Shark) game for the Dragon64 to the FM-7,
I compiled the image without the extra zeros and it works flawlessly as malikto999 suggested
Now I need to know how could I save the VRAM to disk and how can I load it back later from within Basic (by now)
thanks beforehand
pere


Unfortunately, there is no function to save and load VRAM directly to disk with normal F-BASIC.
You can do it by combining the GET@A/PUT@A command with the SAVEM/LOADM command, but this is not practical.

In the old magazine, because there should have been an article to expand BASIC, and to save/road the screen, I look for it.
Please wait a while.


I will introduce the tool from the article "Direct Access to Sub and Back RAM!" Of January 1985 issue of Oh! FM.
This program extends F-BASIC to allow direct access to subsystem memory and back RAM.

Import DIRECT.mot in the attached zip file to the F-BASIC disk and execute the following command on F-BASIC.
LOADM"DIRECT",,R
The program is relocated before BASIC text area.

Extended commands are POKE, PEEK, EXEC, LOADM, SAVEM.
If you add '*' after the command name, you access the back RAM and if you add '@', you access the subsystem memory.

e.g. Save the VRAM to disk
SAVEM@ "VRAM",0,&HBFFF,0

The format of each command is as follows.

POKE[@/*] address,data[,data[,data...]]
PEEK[@/*](address)
EXEC[@/*] [address]
LOADM[@/*] "file" [,offset[,R]]
SAVEM[@/*] "file" ,start,end,entry

It can be omitted in [ ], if @/* is omitted, the original command

Although it is not the tool for exclusive use of screen save/load, I think that it can be used for development because it is quite useful.
By the way, "back RAM" is 32 KB of RAM which can be used by switching to F-BASIC ROM.
Adjuntos
DIRECT.zip
(1.56 KiB) Descargado 8 veces

malikto999
Mensajes: 53
Registrado: 09 Jun 2017 11:20
Agradecimiento recibido: 51 veces

Re: Thread in English for Fujitsu FM7

Mensajepor malikto999 » 27 Jun 2017 09:17

pser1 escribió:Ps By the way, I had almost forgotten about that ...
Would it be possible to have an electronic copy of the magazine "Oh! FM-7" from January 1985?
It seems that none of us is able to find it on the internet -banghead


Yes, it's ok.
However, since I do not have a scanner it will take time.
Please wait patiently...

Avatar de Usuario
pser1
Mensajes: 2013
Registrado: 08 Dic 2012 18:34
Agradecido : 198 veces
Agradecimiento recibido: 181 veces

Re: Thread in English for Fujitsu FM7

Mensajepor pser1 » 27 Jun 2017 11:37

malikto999 escribió:
pser1 escribió:Ps By the way, I had almost forgotten about that ...
Would it be possible to have an electronic copy of the magazine "Oh! FM-7" from January 1985?
It seems that none of us is able to find it on the internet -banghead

Yes, it's ok.
However, since I do not have a scanner it will take time.
Please wait patiently...

Hi Malik,
don't worry, we are not in a hurry!
We can wait as long as needed to have that magazine!
cheers
pere

Avatar de Usuario
pser1
Mensajes: 2013
Registrado: 08 Dic 2012 18:34
Agradecido : 198 veces
Agradecimiento recibido: 181 veces

Re: Thread in English for Fujitsu FM7

Mensajepor pser1 » 27 Jun 2017 11:47

@malikto999
that's great news indeed!
So we have a chance to load and save to/from VRAM and even from the 32k hidden RAM (by the ROM) -thumbup
I will test that, in fact if the LOADM@ allows access to all of the subsystem RAM, we could load our user command handler
right to the subsystem at $c000 instead of using the Yamauchi maintenance command.
These tricks could be very helpful.
Now we just need a lot of time to practice these new functions ...
again, thanks a lot -drinks
pere

Avatar de Usuario
minter
Mensajes: 1322
Registrado: 22 Jul 2014 18:51
Agradecido : 545 veces
Agradecimiento recibido: 280 veces

Re: Thread in English for Fujitsu FM7

Mensajepor minter » 27 Jun 2017 14:46

pser1 escribió:@malikto999
that's great news indeed!
So we have a chance to load and save to/from VRAM and even from the 32k hidden RAM (by the ROM) -thumbup
again, thanks a lot -drinks
pere

This looks fantastic!!! -thumbup

Avatar de Usuario
pser1
Mensajes: 2013
Registrado: 08 Dic 2012 18:34
Agradecido : 198 veces
Agradecimiento recibido: 181 veces

Re: Thread in English for Fujitsu FM7

Mensajepor pser1 » 27 Jun 2017 16:06

but remember what Malik said in his message ...

- This works great for tests (development)

But I am pretty sure we will prefer to send the code to the SS using the Yamauchi routine
pere

jltursan
Mensajes: 1880
Registrado: 20 Sep 2011 13:59
Agradecido : 48 veces
Agradecimiento recibido: 141 veces

Re: Thread in English for Fujitsu FM7

Mensajepor jltursan » 27 Jun 2017 22:30

Btw, I've found Oh! FM 85/01 in Yahoo Auctions so I've just purchased it :-)
It won't be cheap but seems that it has really nice contents. I've scanner, the problem is the magazine won't be here in some time :-(

Avatar de Usuario
pser1
Mensajes: 2013
Registrado: 08 Dic 2012 18:34
Agradecido : 198 veces
Agradecimiento recibido: 181 veces

Re: Thread in English for Fujitsu FM7

Mensajepor pser1 » 27 Jun 2017 22:45

jltursan escribió:Btw, I've found Oh! FM 85/01 in Yahoo Auctions so I've just purchased it :-)
It won't be cheap but seems that it has really nice contents. I've scanner, the problem is the magazine won't be here in some time :-(

Fantastic -drinks
I have been searching for it but I have not succeded on https://auctions.yahoo.co.jp -banghead
By the way, do you know if the Disk System has ever had a manual?
I cannot copy files from one disk to another, and I have not been able to find that manual on yahoo auctions either ...
cheers
pere

malikto999
Mensajes: 53
Registrado: 09 Jun 2017 11:20
Agradecimiento recibido: 51 veces

Re: Thread in English for Fujitsu FM7

Mensajepor malikto999 » 28 Jun 2017 03:51

jltursan escribió:Btw, I've found Oh! FM 85/01 in Yahoo Auctions so I've just purchased it :-)
It won't be cheap but seems that it has really nice contents. I've scanner, the problem is the magazine won't be here in some time :-(


You could get it. Was good!
That's a really good article.
I read it at the age of a student and was helped very much to understand the sub system.

Avatar de Usuario
pser1
Mensajes: 2013
Registrado: 08 Dic 2012 18:34
Agradecido : 198 veces
Agradecimiento recibido: 181 veces

Re: Thread in English for Fujitsu FM7

Mensajepor pser1 » 01 Jul 2017 18:38

jltursan escribió:Btw, I've found Oh! FM 85/01 in Yahoo Auctions so I've just purchased it :-)
It won't be cheap but seems that it has really nice contents. I've scanner, the problem is the magazine won't be here in some time :-(

Hello,
could you confirm the magazine you bought has this cover?
I have found it on buyee for some 1,500 yen (12,29€) ... don't know it is worth buying it, if shipping were not too high, might be interesting
What do you think of that?
regards
pere
Maybe Oh!FM-7 1985-01.jpg
Maybe Oh!FM-7 1985-01.jpg (59.53 KiB) Visto 305 veces

Avatar de Usuario
pser1
Mensajes: 2013
Registrado: 08 Dic 2012 18:34
Agradecido : 198 veces
Agradecimiento recibido: 181 veces

Re: Thread in English for Fujitsu FM7

Mensajepor pser1 » 01 Jul 2017 18:55

@malikto999
Do you know of other issues of magazine Oh! FM-7 that could be interesting because of their content?
I could have a chance to find some on internet, but I don't know which ones are related to FM-7,
I mean really related to FM-7, not to FM77 nor FM Towns
Any advice would be very appreciated!
Thanks in advance
pere


Volver a “Fujitsu FM7”

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado