News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

M4 Board - running Batman Forever Demo

Started by AndyRCM, 17:38, 05 May 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AndyRCM

Hi - has anybody had any issues running the Batman Forever Demo on the M4 (2.5c 2019) Board?
I have tried the one disc version as well as the multi-disc version - all I get is a blue screen?
Currently using a 6128 and a Scart cable to my flatscreen - NOT using an Amstrad Monitor at the moment.

Thanks in advance.

Andy
Chairman
Retro Computer Museum
Leicester, UK

Duke


It will not work as it uses direct FDC I/O for the discloading.

So unless someone makes a crack (@Chany maybe?) or @Rhino decides to make the 800+ M4 users happy with a modified version (ie. using similar track/sector loading as Pinball Dreams), you will need a real floppy disc or disc emulator to run it.

Quote from: AndyRCM on 17:38, 05 May 20
Hi - has anybody had any issues running the Batman Forever Demo on the M4 (2.5c 2019) Board?

AndyRCM

Thanks @Duke  - I thought i was going mad! Everything else is working. Great hardware. :)
Chairman
Retro Computer Museum
Leicester, UK

Scarlettkitten

Glad you've got yourself an m4 Andy, lovely bit of kit isn't it. 8)
Sophie Rose:- My musical works https://soundcloud.com/sophierosemusics

XeNoMoRPH

Quote from: Duke on 18:56, 05 May 20
It will not work as it uses direct FDC I/O for the discloading.

So unless someone makes a crack (@Chany maybe?) or @Rhino decides to make the 800+ M4 users happy with a modified version (ie. using similar track/sector loading as Pinball Dreams), you will need a real floppy disc or disc emulator to run it.
WOW !!! , 800 M4 boards around the world ?  :o :o
your amstrad news source in spanish language : https://auamstrad.es

Duke

Quote from: XeNoMoRPH on 04:26, 06 May 20
WOW !!! , 800 M4 boards around the world ?  :o :o
Yup. Actually 825 when I get the backlog done...

roudoudou

Quote from: XeNoMoRPH on 04:26, 06 May 20
WOW !!! , 800 M4 boards around the world ?  :o :o
This board is amazing  8)

My pronouns are RASM and ACE

GUNHED

Well, looks like the M4 production keeps Duke that busy that he has no time for new projects.


825 is amazing!!! Congratulations!!! Do we really have that much CPC users on this planet? Or did lot's of people buy two units (like I did)? Let hope for the former.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

greeno76

I received mine yesterday and I'm thrilled with it! Thanks Duke. It's a VERY clever bit of kit.


I've enjoyed playing some of the games that played back in 1985 when I received the 6128 for Christmas already. Fun memories.


I noticed that Starglider doesn't load past the "cheats" prompt due to "missing disc". However, is this solved by installing the modified lowerrom or is this a similar issue to that described above?


Best wishes,


Jason

Duke

Quote from: GUNHED on 11:20, 06 May 20
Well, looks like the M4 production keeps Duke that busy that he has no time for new projects.
Yes, aswell as the Imperium Solo boards.
Quote
825 is amazing!!! Congratulations!!! Do we really have that much CPC users on this planet? Or did lot's of people buy two units (like I did)? Let hope for the former.  :)
I think yes, there is really that many (real) CPC users, since I get new orders every week from people I have never heard of before. Many has bought more than one, but not the majority.
Some day I will run some stats on my database, to see how many from each country.

Quote from: greeno76 on 12:00, 06 May 20
I noticed that Starglider doesn't load past the "cheats" prompt due to "missing disc". However, is this solved by installing the modified lowerrom or is this a similar issue to that described above?
Yes, missing disc will be fixed by using the modified lowerrom. See also this thread with an easy installable version I posted:
https://www.cpcwiki.eu/forum/technical-support/the-compatibility-of-the-m4-card/msg179713/#msg179713

greeno76

Wonderful, thank you!  8)


I'll give this a go this evening.

Targhan

#11
QuoteIt will not work as it uses direct FDC I/O for the discloading.

@Duke Slightly out of topic sorry (but not so much), but is it possible to adapt a code to M4 if there is no system anymore and if the memory between #b000-#c000 is already used (basically, I don't want to pretend to make system calls)? Unless I didn't search well, I couldn't find a doc about that. So to sum up: what are the low-level ROM calls to make to load/save a file with the M4, in a reliable way, if the system is 100% gone from RAM.

edit: I found some low level stuff on your github, but nothing as simple as "load file"?
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Duke

You can take a look at the romup.s example on github:
https://github.com/M4Duke/M4examples/blob/master/romup.s

(maybe that is what you looked at already?)

You have to copy a few functions out to do a full load or save file from above, not a lot though.

Only thing simpler would be to compile a .DSK image and use C_READSECTOR / C_WRITESECTOR


Quote from: Targhan on 22:49, 06 May 20
@Duke Slightly out of topic sorry (but not so much), but is it possible to adapt a code to M4 if there is no system anymore and if the memory between #b000-#c000 is already used (basically, I don't want to pretend to make system calls)? Unless I didn't search well, I couldn't find a doc about that. So to sum up: what are the low-level ROM calls to make to load/save a file with the M4, in a reliable way, if the system is 100% gone from RAM.

edit: I found some low level stuff on your github, but nothing as simple as "load file"?

Targhan

#13
Oh ok, so if a DSK image is loaded, all I have to do is change my ReadSector/WriteSector with yours? That would be simple and awesome. But no musical trackload :).

Mmmh, C_READSECTOR does not use the "head"? What about double-sided DSK?
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Duke


Quote from: Targhan on 09:35, 07 May 20
Oh ok, so if a DSK image is loaded, all I have to do is change my ReadSector/WriteSector with yours?
Yes, of course you will have to copy it out of the "ROM" buffer as any other M4 command.

Quote
Mmmh, C_READSECTOR does not use the "head"? What about double-sided DSK?
Yeah not implemented atm. if needed I can add it.

Targhan

QuoteYeah not implemented atm. if needed I can add it.
I think it is important! It may provoke some retro-compatibility issues though, I believe... You will need to add one more byte in the command.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

GUNHED

So, the M4 can emulate a disc using a DSK and we can use read/write sector? And all this without the need form firmware etc?

Awesome!!!!!!!!!!!!!!!!!!!!!  :) :) :) :) :) :) :) :) :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Duke

Quote from: Targhan on 14:21, 07 May 20
You will need to add one more byte in the command.
Yep, will add it soonish.

Quote from: GUNHED on 14:45, 07 May 20
So, the M4 can emulate a disc using a DSK and we can use read/write sector? And all this without the need form firmware etc?

Well it just allows you to read/write sectors from a .DSK image using M4 commands (no firmware needed, but not quite similar to the FDC), here is an example I made some years ago:

            ; M4 board
            ; DSK read sector example
            ; Duke 2016
           
            org    &4000
            nolist

DATAPORT        equ &FE00
ACKPORT        equ &FC00           

C_READSECTOR    equ &430B                       

start:        di
            ld    bc,&7F85                        ; GA select upper rom, and mode 1
            out    (c),c
            ld    a,(m4_rom_num)
            cp    &FF
            call    z,find_m4_rom    ; find rom (only first run)
            cp    &FF
            call    nz,read_sec
            ld    bc,&7F8D                        ; GA deselect upper rom, and mode 1
            out    (c),c
            ei
            ret
               
read_sec:        ld    bc,DATAPORT                    ; data out port
            out (c),c
            ld    a,&0B
            out    (c),a                        ; command lo
            ld    a,&43
            out    (c),a                        ; command    hi
           
            ; parameters hardcoded for now
           
            ld    a,0                            ; track 0
            out    (c),a                        ;
            ld    a,&c1                        ; sector 0
            out    (c),a                        ;
            ld    a,0                            ; drive 0
            out    (c),a                        ;
            ld    bc,ACKPORT
            out (c),c                            ; tell M4 that command has been send
         
            ld    a,(m4_rom_num)
            ld    bc,&DF00
            out    (c),a                        ; select M4 rom
            ld    hl,&FF02                        ; get response buffer address
            ld    e,(hl)
            inc    hl
            ld    d,(hl)
            ex    de,hl
            ld    de,sector_buf
            ld    bc,#512
            ldir
            ret
           
            ;
            ; Find M4 ROM location
            ;
               
find_m4_rom:
            ld    iy,m4_rom_name    ; rom identification line
            ld    d,127        ; start looking for from (counting downwards)
           
romloop:        push    de
            ld    bc,&DF00
            out    (c),d        ; select rom
           
            ld    a,(&C000)
            cp    1
            jr    nz, not_this_rom
           
            ; get rsxcommand_table
           
            ld    a,(&C004)
            ld    l,a
            ld    a,(&C005)
            ld    h,a
            push    iy
            pop    de
cmp_loop:
            ld    a,(de)
            xor    (hl)            ; hl points at rom name
            jr    nz, not_this_rom
            ld    a,(de)
            inc    hl
            inc    de
            and    &80
            jr    z,cmp_loop
           
            ; rom found, store the rom number
           
            pop    de            ;  rom number
            ld     a,d
            ld    (m4_rom_num),a
            ret
           
not_this_rom:
            pop    de
            dec    d
            jr    nz,romloop
            ld    a,255        ; not found!
            ret


m4_rom_name:    db    "M4 BOAR",&C4        ; D | &80
m4_rom_num:    db    &FF
sector_buf:    ds    512

Targhan

#18
Pretty great stuff, I check this out in due time. If if you have to add the head, what about the size? Some prods may handle different sector size.

Mmmmh, your code reads: ld    bc,#512.
I don't know your assembler, but shouldn't it be ld bc,512?? If in hex, you're copying way too much data!
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

Duke

#19
The supported DSK formats are still the same (amsdos data/system, Romdos, parados etc), so nothing exotic with custom sector sizes. One could extend the number of tracks to have more than plenty of space in one of the formats, no checks preventing that.

The assembler used for the example is sdasz80 and # is used for immediate values and & for hex. Nowadays I stick to RASM, but ie. the M4 ROM is still in sdasz80 format.

EDIT: Actually it looks like it was written for MAXAM, so yeah its supposed to be 512 decimal, not hexdecimal. My bad.

Quote from: Targhan on 16:54, 07 May 20
Pretty great stuff, I check this out in due time. If if you have to add the head, what about the size? Some prods may handle different sector size.

Mmmmh, your code reads: ld    bc,#512.
I don't know your assembler, but shouldn't it be ld bc,512?? If in hex, you're copying way too much data!

GUNHED

Using Maxam too. Thanks a lot for the example. The M4 is still full or wonders!
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod