"new" games as COM files.

Everything about Memotech CP/M and CP/M Software.
Post Reply
User avatar
Crazyboss
Site Admin
Posts: 274
Joined: 09 Aug 2012 21:45
Location: Sweden
Contact:

"new" games as COM files.

Post by Crazyboss »

Hi

I do have plans to release my converted games in .COM format to be run under CP/M. First one will be Spectron, I hope I can do it durring the eastern but cant promis anything ;)

I also had think about an easy way to put the .COM file into a FDX box or Remeorizer. It could be possible for me to create some file which could be loaded via a wavefile into a real Memotech, and then make it create the COMfile on Disk or SDcard.
//CLAUS - Webmaster at www.mtxworld.dk
Bill B
Posts: 590
Joined: 26 Jan 2014 16:31

Re: "new" games as COM files.

Post by Bill B »

Claus,

I don't think you can write COM files to/from tape (not in an easy way anyway).

I can think of a number of solutions:

1. SD Cards for REMEMOTECH or REMEMOrizer are easy. You only need a machine with an SD card writer and Andy's "CP/M Callback Filesystem" (for Windows) or "CP/M filesystem in userspace" (for Linux).

2. Floppy disks for real FDX or MTX are more difficult. If you have a Linux system with an internal drive which takes the correct size disks then you can use CPMTools and Andy's MFLOPPY software. Doesn't work with USB drives.

3. For the later SDX with 3.5" drive, and a PC system that will write 720K FAT floppies (and many USB drives will not cope with 720K format), then you can use my IBMDISC software to read these on the SDX. But that raises the chicken and egg problem of getting IBMDISC.COM onto the MTX.

4. Use the serial port (if fitted) and a program such as Contact or Kermit to transfer the file.

Bill.
User avatar
Crazyboss
Site Admin
Posts: 274
Joined: 09 Aug 2012 21:45
Location: Sweden
Contact:

Re: "new" games as COM files.

Post by Crazyboss »

Hi Bill.

I think its simple enough ;)

when rememorizer or fdx box is connected I guess BASIC have user commands that can be used.

I guess I could create a basic program which could create the .com file on the disk or sd card. This program could be saved as a wave and then loaded into a real memotech.

if there is a way a user command can save a file to disk or sd card, with no headers and binary only I think it can be done.

But else you are right .COM files are org 0100, so cant be run or loaded into basic normally.

Anyone know what the default stackpointer is when running cp/m?
//CLAUS - Webmaster at www.mtxworld.dk
User avatar
AndyKey
Posts: 74
Joined: 12 Aug 2012 01:29
Location: Southampton, UK
Contact:

Re: "new" games as COM files.

Post by AndyKey »

I think the SDX User Manual probably has an example USER command to save a block of memory.
Probably showing an example of how to make a .RUN file.

I have a script somewhere that prepends a BASIC loader in front of a .COM file to produce a .mtx file you can LOAD "".
If you look at Z.mtx, you'll see its exactly that kind of loader followed by Z.COM.
Not every .COM file works in this way, I think they need to turn off interrupts and set a sensible stack, and not assume this is already the case.
{{{ Andy
User avatar
Crazyboss
Site Admin
Posts: 274
Joined: 09 Aug 2012 21:45
Location: Sweden
Contact:

Re: "new" games as COM files.

Post by Crazyboss »

yes could, put the comfile in Basic Memory, and save it back to a comfile use the user write command (i think its write?)

Then people could easy hook the MTX upto a computer and load the wave and run it, to create the .com file at disk or sdcard.

Or just use some of the other ways to copy the .COM file to disk or sdcard (need right tools and time to find out).

Especially for people with FDX boxes I think its easier to use the load from tape method.

But anyway, anyone will use it - is another question ;)

But some time in the future I will release all my converted games, as .RUN .COM .MTX and Waves ;)

Not including Space Invasion, since I lost the source years ago :(

It could be cool to in some way let the game exit without need to reset, just return smooth to CP/M - anyone have a clue how to do that, in Assembler?

And must I set back the stackpointer, or what is the current stackpointer in CP/M ?
//CLAUS - Webmaster at www.mtxworld.dk
Bill B
Posts: 590
Joined: 26 Jan 2014 16:31

Re: "new" games as COM files.

Post by Bill B »

Claus,

The usual way for a CP/M application to return to CP/M is to do a warm boot, either through the BIOS (jp 0) or BDOS (ld c,0; jp 5). With either of these techniques you don't have to worry about the stack pointer. Alternately, providing you have not overwritten the CCP, you can reset the stack pointer to its original value, and just do a return.

However, I don't know what you have done to the memory map to get the games to run. For the approach above to wrk, the page (RELCPMH) register has to have its standard CP/M value of 0x80 and both low memory (0x0000-0x0080) and high memory (BDOS and above) must be un-corrupted. So if you have changed the page register you will first have to reset that.
User avatar
Crazyboss
Site Admin
Posts: 274
Joined: 09 Aug 2012 21:45
Location: Sweden
Contact:

Re: "new" games as COM files.

Post by Crazyboss »

by the way SASA is available as .COM file too
http://www.mtxworld.dk/SASA.COM
//CLAUS - Webmaster at www.mtxworld.dk
Post Reply