Author Topic: M4 Board - running Batman Forever Demo  (Read 988 times)

0 Members and 1 Guest are viewing this topic.

Offline AndyRCM

  • Speccy
  • *
  • Posts: 2
  • Country: gb
  • Retro Forever! ;)
    • Retro Computer Museum
  • Liked: 1
  • Likes Given: 2
M4 Board - running Batman Forever Demo
« on: 19:38, 05 May 20 »
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

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.168
  • Country: dk
    • spinpoint.org
  • Liked: 1289
  • Likes Given: 999
Re: M4 Board - running Batman Forever Demo
« Reply #1 on: 20: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.

Hi - has anybody had any issues running the Batman Forever Demo on the M4 (2.5c 2019) Board?

Offline AndyRCM

  • Speccy
  • *
  • Posts: 2
  • Country: gb
  • Retro Forever! ;)
    • Retro Computer Museum
  • Liked: 1
  • Likes Given: 2
Re: M4 Board - running Batman Forever Demo
« Reply #2 on: 21:08, 05 May 20 »
Thanks @Duke  - I thought i was going mad! Everything else is working. Great hardware. :)
Chairman
Retro Computer Museum
Leicester, UK

Offline Scarlettkitten

  • CPC664
  • ***
  • Posts: 62
  • Country: gb
  • Liked: 50
  • Likes Given: 211
Re: M4 Board - running Batman Forever Demo
« Reply #3 on: 23:07, 05 May 20 »
Glad you've got yourself an m4 Andy, lovely bit of kit isn't it. 8)
Sophie Rose:- My musical works https://soundcloud.com/sophierosemusix

Offline XeNoMoRPH

  • Supporter
  • 6128 Plus
  • *
  • Posts: 721
  • Country: es
  • " ... in space no one , can hear you scream ... "
  • Liked: 1523
  • Likes Given: 1197
Re: M4 Board - running Batman Forever Demo
« Reply #4 on: 06:26, 06 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

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.168
  • Country: dk
    • spinpoint.org
  • Liked: 1289
  • Likes Given: 999
Re: M4 Board - running Batman Forever Demo
« Reply #5 on: 09:57, 06 May 20 »
WOW !!! , 800 M4 boards around the world ?  :o :o
Yup. Actually 825 when I get the backlog done...

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 839
  • Country: fr
    • urban exploration
  • Liked: 1135
  • Likes Given: 684
Re: M4 Board - running Batman Forever Demo
« Reply #6 on: 10:58, 06 May 20 »
WOW !!! , 800 M4 boards around the world ?  :o :o
This board is amazing  8)

use RASM, the best assembler ever made :p

I will survive

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 1.862
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 841
  • Likes Given: 2093
Re: M4 Board - running Batman Forever Demo
« Reply #7 on: 13:20, 06 May 20 »
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 (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline greeno76

  • CPC464
  • **
  • Posts: 3
  • Country: gb
  • Liked: 1
  • Likes Given: 2
Re: M4 Board - running Batman Forever Demo
« Reply #8 on: 14:00, 06 May 20 »
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

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.168
  • Country: dk
    • spinpoint.org
  • Liked: 1289
  • Likes Given: 999
Re: M4 Board - running Batman Forever Demo
« Reply #9 on: 14:47, 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.

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

Offline greeno76

  • CPC464
  • **
  • Posts: 3
  • Country: gb
  • Liked: 1
  • Likes Given: 2
Re: M4 Board - running Batman Forever Demo
« Reply #10 on: 15:27, 06 May 20 »
Wonderful, thank you!  8)


I'll give this a go this evening.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.116
  • Country: fr
  • Liked: 1048
  • Likes Given: 152
Re: M4 Board - running Batman Forever Demo
« Reply #11 on: 00:49, 07 May 20 »
Quote
It 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"?
« Last Edit: 00:52, 07 May 20 by Targhan »
Targhan/Arkos

Arkos Tracker 2 - alpha 9 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

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.168
  • Country: dk
    • spinpoint.org
  • Liked: 1289
  • Likes Given: 999
Re: M4 Board - running Batman Forever Demo
« Reply #12 on: 07:37, 07 May 20 »
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


@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"?

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.116
  • Country: fr
  • Liked: 1048
  • Likes Given: 152
Re: M4 Board - running Batman Forever Demo
« Reply #13 on: 11: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? That would be simple and awesome. But no musical trackload :).

Mmmh, C_READSECTOR does not use the "head"? What about double-sided DSK?
« Last Edit: 11:43, 07 May 20 by Targhan »
Targhan/Arkos

Arkos Tracker 2 - alpha 9 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

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.168
  • Country: dk
    • spinpoint.org
  • Liked: 1289
  • Likes Given: 999
Re: M4 Board - running Batman Forever Demo
« Reply #14 on: 15: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.

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.116
  • Country: fr
  • Liked: 1048
  • Likes Given: 152
Re: M4 Board - running Batman Forever Demo
« Reply #15 on: 16:21, 07 May 20 »
Quote
Yeah 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 - alpha 9 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

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 1.862
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 841
  • Likes Given: 2093
Re: M4 Board - running Batman Forever Demo
« Reply #16 on: 16: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?

Awesome!!!!!!!!!!!!!!!!!!!!!  :) :) :) :) :) :) :) :) :) :) :)
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.168
  • Country: dk
    • spinpoint.org
  • Liked: 1289
  • Likes Given: 999
Re: M4 Board - running Batman Forever Demo
« Reply #17 on: 17:19, 07 May 20 »
You will need to add one more byte in the command.
Yep, will add it soonish.

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

Offline Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.116
  • Country: fr
  • Liked: 1048
  • Likes Given: 152
Re: M4 Board - running Batman Forever Demo
« Reply #18 on: 18: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!
« Last Edit: 18:56, 07 May 20 by Targhan »
Targhan/Arkos

Arkos Tracker 2 - alpha 9 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

Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.168
  • Country: dk
    • spinpoint.org
  • Liked: 1289
  • Likes Given: 999
Re: M4 Board - running Batman Forever Demo
« Reply #19 on: 21:35, 07 May 20 »
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.

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!
« Last Edit: 21:42, 07 May 20 by Duke »

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 1.862
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 841
  • Likes Given: 2093
Re: M4 Board - running Batman Forever Demo
« Reply #20 on: 22:41, 07 May 20 »
Using Maxam too. Thanks a lot for the example. The M4 is still full or wonders!
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)