Question #2: EXEROM and tape loading

Include new and ported/converted games, and old games/tools. Subjects about CP/M software goes in the CP/M Forum.
Martin A
Posts: 799
Joined: 09 Nov 2013 21:03

Re: Question #2: EXEROM and tape loading

Post by Martin A »

Dave wrote: 05 Apr 2021 13:16 Hi, I'm sure that you can load blocks from tape, it's just that I'm not sure how to do it.

I am also sure that someone else will jump in here - Martin perhaps?

regards
Dave
Details of load/save blocks posted on the other thread. Unfortunately the MTX's built in tape facilities were just the bare minumum. Possibly down to shortage of space. The state of the error messages should give you an idea of how tight the fit was getting everything in to 24k.
User avatar
Dave
Posts: 1280
Joined: 11 Aug 2012 18:16
Contact:

Re: Question #2: EXEROM and tape loading

Post by Dave »

Yes, I know how cramped the ROM is.

Going back to the code that you wrote for EXEROM, could a user written block of code be used to replicate the USER READ commands to load the EXEROM and game ROMs?
Martin A
Posts: 799
Joined: 09 Nov 2013 21:03

Re: Question #2: EXEROM and tape loading

Post by Martin A »

Dave wrote: 05 Apr 2021 14:47 Yes, I know how cramped the ROM is.

Going back to the code that you wrote for EXEROM, could a user written block of code be used to replicate the USER READ commands to load the EXEROM and game ROMs?
It's doable. Starting with the the basic/assembler mix of the original loader:

Code: Select all

1 GOTO 40
10 CODE
800F DS 254
810D DS 254
 	 . . . 
BD93 DS 254
BE91 RET
Symbols:	 
40 USER READ “EXEROM04.ROM”,32768
50 CODE
C0AD DI
C0AE LD A,#80
C0B0 OUT (0 ),A
C0B2 LD BC,#4000
C0B5 LD DE,#0
C0B8 LD HL,#8000
C0BB LDIR
C0BD LD A,(#FAD2)
C0C0 OUT (0 ),A
C0C2 EI
C0C3 RET
Symbols:	 
70 USER READ “GALAGA.ROM”,16384
80 CODE
C11F DI
C120 LD A,#80
C122 LD (#FAD2),A
C125 OUT (0 ),A
C127 JP #3FF0
C12A RET
Assuming you have a tape with the loader, then EXEROM then the requred game rom as headerless blocks, then,

Code: Select all

40 USER READ “EXEROM04.ROM”,32768
would translate to:

Code: Select all

LD A,1
LD (#FD68),A
LD HL,#8000
LD DE,#4000
CALL #0AAE
The other User read is simplter as the load save variable is already set.

Code: Select all

70 USER READ “GALAGA.ROM”,16384
for a 32k rom would translate to:

Code: Select all

LD HL,#4000
LD DE,#8000
CALL #0AAE
The configure your MTX512 as a MTX500 is still needed. The GOTO 40 is replaced with a Assembler JP instruction and one or 2 extra DS 254 lines, as theres no no assembler "padding" between lines 10 and 40. You'd end up with something like

Code: Select all

10 CODE
8007 JP START
8xxx DS 254
8xxx DS 254
 	 . . . 
Bxxx DS 254
Bxxx DS 254
Bxxx DS 254
Cxxx START:LD A,1
Cxxx LD (#FD68),A ;set load/save flag to 1 for loading
Cxxx LD HL,#8000 ; USER READ EXEROM 32768
Cxxx LD DE,#4000 ; read 16k
Cxxx CALL #0AAE
Cxxx DI
Cxxx LD A,#80
Cxxx OUT (0 ),A
Cxxx LD BC,#4000
Cxxx LD DE,#0
Cxxx LD HL,#8000
Cxxx LDIR
Cxxx LD A,(#FAD2)
Cxxx OUT (0 ),A
Cxxx EI
Cxxx LD HL,#4000 ; USER READ GAME ROM 16384
Cxxx LD DE,#8000 ; assumes 32k rom #4000 for a 16k rom
Cxxx CALL #0AAE
Cxxx DI
Cxxx LD A,#80
Cxxx LD (#FAD2),A
Cxxx OUT (0 ),A
Cxxx JP #3FF0
Cxxx RET
All totally untested of course!
User avatar
1024MAK
Posts: 757
Joined: 24 Dec 2012 03:01
Location: Looking forward to summer, in Somerset, UK

Re: Question #2: EXEROM and tape loading

Post by 1024MAK »

Dave wrote: 05 Apr 2021 13:16 Hi, I'm sure that you can load blocks from tape, it's just that I'm not sure how to do it.

I am also sure that someone else will jump in here - Martin perhaps?

regards
Dave
Martin also talked about how games loaded code blocks here ;-)

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer in Somerset later in the year :D

Not as many MTXs as Dave! :lol:
kokkiklhs
Posts: 23
Joined: 31 Mar 2021 21:08

Re: Question #2: EXEROM and tape loading

Post by kokkiklhs »

Oh, I see... So we've really got a very complicated situation here...
User avatar
Dave
Posts: 1280
Joined: 11 Aug 2012 18:16
Contact:

Re: Question #2: EXEROM and tape loading

Post by Dave »

Yes, not as simple as it might have been on the Spectrum perhaps, but a little assembler, courtesy of Martin, should do the trick.

The program loads the EXEROM, then the games ROM. As I mentioned before, it will be a little more cumbersome with tapes than disk, and of course, you’ll need to get EXEROM and the games ROM put on tape, which is probably the hardest part.
kokkiklhs
Posts: 23
Joined: 31 Mar 2021 21:08

Re: Question #2: EXEROM and tape loading

Post by kokkiklhs »

Dave wrote: 06 Apr 2021 11:37 Yes, not as simple as it might have been on the Spectrum perhaps, but a little assembler, courtesy of Martin, should do the trick.

The program loads the EXEROM, then the games ROM. As I mentioned before, it will be a little more cumbersome with tapes than disk, and of course, you’ll need to get EXEROM and the games ROM put on tape, which is probably the hardest part.
Yes, I finally understand... Of course it's frustrating for a completely fresh MTX user, who has ALL the good will to look at this superb machine positively...
Pity that such an extremely simple thing becomes that hard especially on MTX, and of course it's the designers to blame, who did such a lame job on this particular chapter back then...
Any chances for e.g. an improved ROM today? Hasn't anybody considered something like that?
:roll:
Martin A
Posts: 799
Joined: 09 Nov 2013 21:03

Re: Question #2: EXEROM and tape loading

Post by Martin A »

kokkiklhs wrote: 07 Apr 2021 12:35 Any chances for e.g. an improved ROM today? Hasn't anybody considered something like that?
:roll:
Leaving aside the reluctance of MTX owners to open their systems, (external fit CFX and Magrom outnumber their internal cousins about 4 to 1), and the small number of "active" Z80 coders in the MTX scene (count them on your fingers, whether you need both hands or not, depends on how you define active!). The very nature of the MTX roms makes replacing the system roms "tricky"

Ths CPM boot rom has a well defined set of entry points used by the CPM BIOS making updating the hardware under CPM simple. Which is why modern expansions like Rememorizor's SD card and CFX's compact flash are able to host the original 59k CPM BDOS from the mid 80's that was designed for 320k floppies.

The SDX extensions to Basic also connect to the system via the USER command allowing the langage to be extended. Extending the SDX rom requires re-compiling the whole rom, but there's no real compatibility issues doing that as long as the pseudo CPM function call entry point is left alone.

The MTX OS and Basic roms themselves are severely lacking in any internal structure. That forced programmers in the past to dig in and find the routines they needed. The most obvious symptom of that is is the use of CALL 0AAE for loading and saving a memory block to tape. There is no general purpose OS entry point for loading and saving.

There are others, Call 0079 to read the keyboard, JP 0205 to return to the basic prompt from a user routine. What routines are used is determined by what any particular programmer found.

The MTX system much more like the ZXspectrum in nature than MSX or CPM. Rememeber, Amstrad had to include a complete copy of the 48k Spectrum rom in the +2 and +3 to ensure compatibility with older software.

Writing a new OS has the potential to break all sorts of hostorical software and hardware by not having routines where they're expected to be.

Bill's recent software improvement to the CFX-II roms show what's possible with expansion roms and new hardware, without breaking the older code.
Bill B
Posts: 593
Joined: 26 Jan 2014 16:31

Re: Question #2: EXEROM and tape loading

Post by Bill B »

One option might be an external ROM 7 which defined some new USER commands, perhaps including improved tape handling.

But then if you are adding additional hardware anyway, might as well add CFX-I, -II or Rememorizer.

I suppose it might be possible to add some improved tape handling to the CFX ROM. But I think that ROM (at least for CFX-II) is also getting fairly full.

Not sure how much of a modification it would be for the CFX-II to claim ROM slots 6 & 7 as well. Not much reason not to do so as there can be at most two expansions to the MTX, and only one if not opening the box.
User avatar
gunrock
Posts: 245
Joined: 28 Oct 2020 21:17

Re: Question #2: EXEROM and tape loading

Post by gunrock »

Will a ROM 7 on the edge connectors work with Nordic MTX's that have the piggy back ROM 7, Bill?

Does the GROM signal on the edge connector override any internal one?
Steve G
Danish Memotech MTX 512, MFX and loving it
Post Reply