FM77AV - learning how to program it (english thread)

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor pser1 » 04 Ago 2023 00:07

Último mensaje de la página anterior:

Hello,
After testing the first example MMRSAMPLE as it was uploaded here by Malik, I have tried to add access to the other three colour planes
I have got an example that paints thin bars that repeat every four.
First from the left is blue (it writes also on fourth column)
Next is red that writes also on fourth column
Third one is Green that also writes on fourth column
When a plane is done, the program waits for the user to press 'C'. Carefull, *must* be UpperCase!
You will see how they are added and the effect on the fourth column
Once drawn the three planes pressing 'C' will exit the program
Next step will be practicing with SUBMODE example by Malik!
I attach here the source file, the d77 virtual file and the TEMPLATE I am using to autostart the programs
Besides I am attaching three screenshots showing the result of each plane ...
cheers!
pere
TEST02.ZIP
(106.45 KiB) Descargado 16 veces

1-First plane BLUE (columns 1and 4).jpg
1-First plane BLUE (columns 1and 4).jpg (60.95 KiB) Visto 1846 veces
2-Second plane RED (columns 2 and 4).jpg
2-Second plane RED (columns 2 and 4).jpg (82.52 KiB) Visto 1846 veces
3-Third plane GREEN (columns 3 and 4).jpg
3-Third plane GREEN (columns 3 and 4).jpg (94.67 KiB) Visto 1846 veces

malikto999
Mensajes: 105
Registrado: 09 Jun 2017 11:20
Agradecimiento recibido: 133 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor malikto999 » 04 Ago 2023 04:38

malikto999 escribió:What happens if you change the number of files in AUTOUTY to the default of 2?


I understand the cause.
The entry address of the machine language file "GAME" is $0000.

If it is possible to specify the entry address when creating the MOT file, please set it.
If the assembler does not support it, I think that the method of exec after LOADM as it is.

malikto999
Mensajes: 105
Registrado: 09 Jun 2017 11:20
Agradecimiento recibido: 133 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor malikto999 » 04 Ago 2023 05:46

jltursan escribió:I know that the 77AV family doesn't have hardware sprites; but I wonder..., is there any "blitter", custom chip or DMA-alike support to speed up memory transfers with the subsystem's VRAM?.

There're some impressive graphic specs in these modes; but seems too much data for the "humble" 6809 to transfer...


Unfortunately, as far as I know, there is no such functionality.
DMA was installed in FM77AV20EX/40EX, but it is for floppy disk access.

For pattern drawing to VRAM, 64-color dual-screen mode may be Fujitsu's answer.
If the size of the screen ratio is the same, the number of bytes of 8-color pattern data(FM-7 ) and 64-color pattern data(77AV ) is the same.
(FM-7: 32*16 8 colors pattern -> 192bytes, 77AV: 16*16 64 colors pattern -> 192bytes)

Considering that there is no need for mask data for superimposition or superimposition processing itself, it can be said that the burden on the program is lighter than that of the FM-7.

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor pser1 » 04 Ago 2023 17:50

malikto999 escribió:
malikto999 escribió:What happens if you change the number of files in AUTOUTY to the default of 2?

I understand the cause.
The entry address of the machine language file "GAME" is $0000.
If it is possible to specify the entry address when creating the MOT file, please set it.
If the assembler does not support it, I think that the method of exec after LOADM as it is.
Oh, sorry!
I'd have seen that :-(
When I do compile the source file, I *must* add the file header, as I do for the SHARK:

Código: Seleccionar todo

         org   $1000-21                  ; file header
         fcc   /SHARK38 /
         fcb   $00,$00,$02,$00,$00
         fcc   /XM7/
         fcb   $00
         fdb   PLong
         fdb   Entry

This is my fault!
I will add this part to the beginning of the test programs and will compile them again, after modifying the STARTUP file back to its
previous content: 10 LOADM"GAME",,R
Thanks a lot for spotting this awkard error!
cheers!
pere

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor pser1 » 04 Ago 2023 17:59

malikto999 escribió:
jltursan escribió:I know that the 77AV family doesn't have hardware sprites; but I wonder..., is there any "blitter", custom chip or DMA-alike support to speed up memory transfers with the subsystem's VRAM?.
There're some impressive graphic specs in these modes; but seems too much data for the "humble" 6809 to transfer...

Unfortunately, as far as I know, there is no such functionality.
DMA was installed in FM77AV20EX/40EX, but it is for floppy disk access.
For pattern drawing to VRAM, 64-color dual-screen mode may be Fujitsu's answer.
If the size of the screen ratio is the same, the number of bytes of 8-color pattern data(FM-7 ) and 64-color pattern data(77AV ) is the same.
(FM-7: 32*16 8 colors pattern -> 192bytes, 77AV: 16*16 64 colors pattern -> 192bytes)
Considering that there is no need for mask data for superimposition or superimposition processing itself, it can be said that the burden on the program is lighter than that of the FM-7.

Hi,
I don't know if it would be very complicated or even possible to change the CPUs, installing Hitachi HD63C09 instead of the 68B09
We do this on the CoCo and Dragon machines and with this humble change we can expect almost 15+% extra speed
Not to mention that then we could use the special 6309 opcodes among which there are the transfer of data in blocks, for instance tfr x+,y+
that uses regW as a counter of bytes to be copied. A simple blitter ;-)
cheers!
Pere

Ps I have found an auction about a module that is named HD63C09 expansion for FM-7 and FM77, but that module has a lot of glue logic
and seems to neex an expansion slot to be used, together with a customized ROM (?). Does anybody know about that?
We simply change the CPUs on our european machines ...
pere

jltursan
Mensajes: 5419
Registrado: 20 Sep 2011 13:59
Ubicación: Madrid
Agradecido : 919 veces
Agradecimiento recibido: 1939 veces
Contactar:

Re: FM77AV - knowing how to program it (english thread)

Mensajepor jltursan » 04 Ago 2023 21:28

I've read about it and seems possible, at least for the main CPU and always using the HD6309P CPU model.

I need to try with replacing both CPUs, this can speed up the machine quite a bit. No idea if the same could be done with the 77AV tho.

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor pser1 » 04 Ago 2023 21:39

jltursan escribió:I've read about it and seems possible, at least for the main CPU and always using the HD6309P CPU model.
I need to try with replacing both CPUs, this can speed up the machine quite a bit. No idea if the same could be done with the 77AV tho.

The HD63C09 is able to work at 3MHz and on our Dragons it doesn't get warm at all. In fact it draws very little current compared to the 6809
Why can't it be used as 68B09E replacement? Pin assignement, maybe? Or?
cheers!
pere

Ps In my CoCo and Dragon computers I used these two versions: HD63B09EP and HD63C09EP (2MHz and 3MHz respectively)

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor pser1 » 04 Ago 2023 22:05

Hi,
I have read that the FM-7 uses 68B09P but the FM77AV uses 68B09E ... These have only two differences in the pin names
But the Hitachi we use are all HD63X09EP and these have the very same pinout than the 68B09E
So I would say that there should be no harm to substitute the ones on the FM77AV by the better HD63C09EP
I cannot have a peek right now at these CPUs in my FM77AV, so I don't know if they are soldered or socketed.
I hope they did use sockets for the big chips!
cheers!
pere

Ps I have never seen the schematics for the FM77AV anywhere in the wildnet

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor pser1 » 04 Ago 2023 22:54

Hello,
I have modified the source files adding them the header and a coco-like footer as I had done for the SHARK game
It all works flawlessly, so I am attaching here a zip named TEST02corrected.zip that contains
- TEMPLATE.d77 this is the template I have into D77Man182
- TEST02.ASM the source file with header and footer/trailer added
- TEST02.d77 the virtual disk that contains the compiled program
I hope it all works for you too!
cheers
pere
TEST02corrected.ZIP
(106.59 KiB) Descargado 8 veces
Ps as the system doesn't allow me to upload a bat file even zipping it, I put it here in a code block

Código: Seleccionar todo

rem Compile for FM-7 machines
   asm6809 -9 -S -v --listing=%1%mg%.LST --o=%1%mg%.MOT %1.ASM
   if not "%errorlevel%" == "0" goto failed

rem move motorola output file to D77Manager and switch there
   move %1.MOT d:\APLI\D77Man182\
   cd d:\APLI\D77Man182

rem copy template disk (no game inside) but with autostart
   copy TEMPLATE.d77 %1.d77

rem import the motorola file as GAME and delete from directory
   D77IMP.exe %1.d77 GAME %1.MOT
   del %1.MOT

rem move the DISK to the emulator and switch there
   move %1.d77 d:\APLI\XM7\
   cd d:\APLI\XM7

rem execute emulator and start the SHARK game
   xm7 %1.d77

rem move virtual file with source files
   move %1.d77  d:\APLI\ASM6809\56-FM77AV2\
   
rem switch back to the compiler with source files
   goto final

:failed
   echo ERRORS FOUND
   pause

:final
   cd d:\APLI\ASM6809\56-FM77AV2\

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor pser1 » 05 Ago 2023 00:19

yet another test using the 640x200x8 colours related to the FM77AV only (using the MMR)
In the attached zip you will find the source file and the virtual disk to use on XM7
cheers!
pere
TEST03.ZIP
(54.76 KiB) Descargado 13 veces

TEST03.jpg
TEST03.jpg (26.86 KiB) Visto 692 veces

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor pser1 » 05 Ago 2023 16:43

Hello,
I have modified TEST03 to add a routine to choose the system TYPE
So, I have created TEST03A that uses TYPE_A and TEST03C that uses TYPE_C
Both work perfectly on the FM77AV giving the same result ... the eight colours shown on screen
But as they use MMR and fill main CPU memory, this doesn't reach the VRAM when executed on a FM-7,
this was to be expected, of course.
The question is, what is the difference between TYPE_A and TYPE_C when applied to a FM77AV?

Next step, trying to use TYPE_B I will need to change from Page0 to Page1 and the other way round too,
how could I do that?
The IO.ZIP map seems a bit complicated to me to find out the memory byte that controls the Page number ...
thanks in advance
pere

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor pser1 » 05 Ago 2023 19:42

just guessing ... might be $d24f the Page switcher?
For instance setting bit 0 and resetting bit 1 ---> Page 0
and setting bit 1 and resetting bit 0 ---> Page1
thanks
pere

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor pser1 » 05 Ago 2023 22:08

concerning the 63C09 module I saw in an auction (with some bidders already on)
The list of chips that has that module are:
- HD63C09EP exactly the one we use for the CoCo-Dragon computers
- HC74F244N octal buffer (bus driver) DIP-20
- Three SRM20256C CMOS 256Kbit SRAM DIP-28 This means 96Kb of extra RAM ... as much as VRAM in the FM77AV ... coincidence?
- Three MC74HC245N octal buffer (bus driver/transceiver) DIP-20
- 74HC4053AP three dual channel analog multiplexer/demultiplexer DIP-16
- Four custom chips labelled KA1P - KA2P - KA3P - KA4P
- Four switches in DIP switch format
- 1 red LED
- 1 group of 8 resistors 100 ohm (DIL)
This has to be put in an expansion slot, but why 96Kbyte SRAM and unless the four custom chips have ROM contents
it seems difficult to use that 'added' CPU ...
The name written in the back of the board is simply "63C09 card"
Any idea about that strange add-on?
cheers!
pere
FM77AV-PlacaCPU-HD63C09EP components side.jpg
FM77AV-PlacaCPU-HD63C09EP components side.jpg (38.1 KiB) Visto 630 veces
FM77AV-PlacaCPU-HD63C09EP traces side.jpg
FM77AV-PlacaCPU-HD63C09EP traces side.jpg (43.5 KiB) Visto 630 veces

malikto999
Mensajes: 105
Registrado: 09 Jun 2017 11:20
Agradecimiento recibido: 133 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor malikto999 » 06 Ago 2023 06:02

pser1 escribió:The name written in the back of the board is simply "63C09 card"
Any idea about that strange add-on?


This is the board of the article "63C09 card production" published in the November 1988 issue of Oh!FM.

I don't know much about hardware, so I don't know the details.
It is an extension CPU board inserted into the Z80 card slot for FM-7. (Therefore, it cannot be used with FM77AV.)

The article was originally posted by a reader, but there are many materials such as circuit diagrams, parts lists, and parts layout diagrams, and it is quite large with 13 pages.

Also, it seems that the poster was selling PAL and printed circuit boards at the time, but it was 25 years ago, so I don't think they are available now.

I found some things that touched on this card on the web, so I'll put the link. (Please see with google translation.)

http://www.6809.net/6809/?6309%A4%CB%A4%C4%A4%A4%A4%C6
about 6309

http://asakita.net/kabekin/2015/11/13312.html
Try using DOS mode with 63C09P card on Fujitsu FM-77D2.

http://www.yk.rim.or.jp/~tvn/fm/fm7/63c09.html
63C09 CARD

http://asakita.net/kabekin/2015/09/13196.html
HD63C09E card production for Fujitsu FM-7/77 Part 1

malikto999
Mensajes: 105
Registrado: 09 Jun 2017 11:20
Agradecimiento recibido: 133 veces

Re: FM77AV - knowing how to program it (english thread)

Mensajepor malikto999 » 06 Ago 2023 06:30

pser1 escribió:just guessing ... might be $d24f the Page switcher?
For instance setting bit 0 and resetting bit 1 ---> Page 0
and setting bit 1 and resetting bit 0 ---> Page1
thanks
pere


$D42F is the VRAM bank selector for FM77AV40.

FM77AV VARM page switching is done with bit 5 of subsystem I/O $D430. (set 0 -> page0, set1 -> page1)
This bit is called the "active page".

By the way, bit 6 of $D430 is also a page switching flag, but this is called "display page" and specifies the VRAM page to be displayed in 640*200 mode. (Disabled in 4096 color mode)

jltursan
Mensajes: 5419
Registrado: 20 Sep 2011 13:59
Ubicación: Madrid
Agradecido : 919 veces
Agradecimiento recibido: 1939 veces
Contactar:

Re: FM77AV - learning how to program it (english thread)

Mensajepor jltursan » 06 Ago 2023 16:21

Here's a recreation of the 63C09 card:

富士通 FM-7/77用HD63C09Eカード製作 その1

Oops, malikto999 already posted the same link :oops:

...but no schematic or Gerbers are made public. No GAL jed files either... -cray

It's a really cool hardware. Seems that it can be switched to even 6Mhz!. Here're some benchmarks

Btw, I can't see too many socketed chips in the 77AV. I'm afraid that you'll need to desolder the CPUs just to test it -banghead.

The FM77AV40SX has some kind of "turbo" mode (only two POKE commands or pressing TAB when booting) just disabling some wait states when using the MMR. Seems that the gain is about a 25%. I've tested it and it really works.

EDIT: Oh, and I've tested the replacement of the main/sub CPUs of the FM-7. Replacing the main CPU with a HD63B09P gives me a flashing cursor and nothing more. If I replace the SUB cpu, only black screen.
...and guess what?, it's the same behaviour that I get when I try with a HD63C09EP(the CoCo/Dragon ones); so I'm 99% sure that I've a nice batch of fake chinese HD63B09P CPUs! ,all of them are, probably, EP CPUs -banghead

Avatar de Usuario
pser1
Mensajes: 3901
Registrado: 08 Dic 2012 18:34
Agradecido : 1182 veces
Agradecimiento recibido: 1088 veces

Re: FM77AV - learning how to program it (english thread)

Mensajepor pser1 » 06 Ago 2023 22:19

Hello,
First attempt at using TYPE_B (4096 colours)
As I am unable to design a layout to show that many colours at once on the screen, I have decided to mix two colours
First we see 16 grades of Blue as vertical stripes, then after pressing 'C', 16 horizontal red bars are added
This results in a screen with 256 colours that are exactly 16x16 grades of Blue and Red with Green value 0

Each time we press 'C', a value of Green is added in its plane, so after pressing 16 times (0-15) the final
screen will be 16x16 blue and red with green at maximum value (15)
Next 'C keypress exits the program.
You have been presented the 4096 colours in screens of 256 grades ... 16x256=4096

I must say that this TYPE_B is complicated as hell -507
Each screen row uses 40 bytes each one containing the same bit of EIGHT pixels on the screen
So converting a color value to the three planes could be a nightmare -banghead
Hopefully Malik will tell us how to program the two palettes with just 64 colours in order to use them
as backgroud and foreground ...
I attach here the source file and the d77 virtual disk for anyone that wants to give it a try
cheers!
pere
TEST04.zip
(91.03 KiB) Descargado 7 veces

TypeB-16 grades of Blue.jpg
TypeB-16 grades of Blue.jpg (10.15 KiB) Visto 517 veces
TypeB-256 grades of Blue-Red.jpg
TypeB-256 grades of Blue-Red.jpg (12.6 KiB) Visto 517 veces

TypeB-256 grades of Blue-Red over Green grade 7.jpg
TypeB-256 grades of Blue-Red over Green grade 7.jpg (12.85 KiB) Visto 517 veces
TypeB-256 grades of Blue-Red over Green grade 15.jpg
TypeB-256 grades of Blue-Red over Green grade 15.jpg (12.92 KiB) Visto 517 veces


Volver a “Fujitsu FM7”

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 3 invitados