appmake +cpm

stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

appmake +cpm

Post by stefano »

I'm so proud of this result !
I just inserted a new option in appmake to handle odd CP/M disk images which hardly worked with CPMTOOLS.

It is a simplified disk image handling program able to create a disk image holding a single file, I was able to deal with the Otrona and NCR formats.

Owners of the real hardware to test the results on physical floppy disks are welcome.



* Otrona Attache'
I'll rework the online documentation soon, this new approach (compared to the past "appmake +inject" trick) solves the program size limit.
The created raw disk image won't directly work on the MAME emulator, so I used ImageDisk to rebuild the sector assignment.
An OS boot disk image is required too.

appmake +cpm -f ATTACHE -b a.com
bin2imd a.raw a.imd /2 DM=5 N=40 SS=512 SM=1-10
mame attache -flop1 oattache.td0 -flop2 A.IMD



* NCR Decision Mate V:
The 'bin2imd' step can be skipped here (just run mame with '-flop2 a.raw'), but the IMD format is still necessary to transfer the disk image on a real floppy.

appmake +cpm -f DMV -b a.com
bin2imd a.raw a.imd /2 DM=4 N=40 SS=512 SM=1-8
mame dmv -flop1 dm5-cpm.td0 -flop2 A.IMD



Any Linux equivalent to bin2imd ?


Stefano
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

As an update on disc creation fun.

-subtype options have been added to the CP/M target to allow creation of .dsk images which can be used in mame/converted as you wish - for example using the tools inside John Elliot's libdsk.

The following machines have support at the moment:

* Tatung Einstein
* Otrona Attache
* Osborne 1

For these targets, the bin2imd stage can be omitted.

The code is a fairly generic CP/M image creator so adding support for new layouts should be fairly trivial.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Great news, thakyou Dom ! ..obviously also the DMV is in the list, right ?

The IMD format is useful to create real floppy disks, every format requires its specific hw parameters (tracks sector size, numberings..). With MAME in many cases the raw format is enough.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I think edsk embeds all of that information. Though I'm deliberately ignoring skew (my sectors are all 0...x or 1...x in the track blocks) and some of the numbers I've had to make up based on other discs (gap length etc) I think libdsk can convert to imd so that's still possible.

I've not added DMV yet - I've not tracked down relevant ROMs and boot discs for the NEC to test against.
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Post by RobertK »

That's great news, now you no longer need to be a rocket scientist to get something running on one of these three machines. :-)

I have noticed that the -o option sets only the name of the disk image file, but it has no effect on the program file on the disk, its name is always APP.COM.

Do you think you can set the program file's name as well?
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

The Einstein method was particularly awful, I didn't get along with EDIP at all

Yes. It's erm, hardcoded to APP.COM at the moment.

I'll endeavour to un-hardcode it this evening.

BTW, I've just add the NCR Decision Mate format so that makes 4. Any requests for another one?

It should be possible to make bootable discs with -Cz--bootfile -Cz[filename] where boot file is a CP/M image/DOS/whatever but I've not had a chance to extract an appropriate image for each target (and besides we couldn't ship them with z88dk in anywise).
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

ok, I didn't realise your improvement was so powerful, well done!
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Post by RobertK »

> Any requests for another one?

C128 and Kaypro would be on my wish list...
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I've added and tested Kaypro II support.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

MZ-2500 CP/M format ?
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

@stefano point me to some discs and I'll add it if it's fairly standard.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

I had them but deleted them accidentally.
I couldn't find the files in the same way, but please try this one: http://slt.retroprograms.com/MZ2500Dumps.7z
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Thank you. I'm find that finding software for MZ2500 is tricky to say the least...don't suppose you've got some non CP/M discs I can take a look at?

Anyway, -subtype=mz2500 has been added to the CP/M target and verified by running Adventure A.
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

:)
This one is very useful because we can go on with the library development without the limit of the 4k of my original tool.

..other sharp targets in CP/M mode would be interesting as well (x1, mz80b/mz2000, mz700/800).
Also the Sanyo targets can be useful.

BTW some of the targets could really take benefit of this tool, because there is no other way to pass the programs.
At the moment I have in my mind the NortStar Horizon, but I first need to sort out my wish list :)
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

This one is puzzling me. With that disc it obviously boots CP/M directly using the PCPM.SYS and MON.SYS files that are on the disc.

I'm not sure how though, I was expecting a bit of a bootstrap on the boot tracks to handle the CPM disc format, but I can't spot an obvious one. PCPM.SYS is about 34k on disc and MON.SYS is about 110k so I think we're missing a trick in native disc creation.

I'll extract the files and give them a good disassembly - if we use the same mechanism we should be able to create a disc image that allows us to create binaries in 64k of RAM. I don't suppose you've got a disassembly of the BDOS/BIOS have you?

With regard to CP/M discs. I'm hoping at some point we'll end up some duplicate formats, though we're now up to 8 and no overlaps!
stefano
Well known member
Posts: 2137
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

I chose the odd formats which didn't work with the standard CP/M tools, so we are far from the similarities :)

On your doubts about the MZ2500, it could even be that the CP/M and the HuBasic formats tickle the BIOS to make it boot differently ?
Also the X1 could have such format separation, or at least the disk image sizes differ on both the targets.

I tried to verify it on the X1 documentation but it is all in Japanese or badly translated, so I still have no answers :(
tschak909
Well known member
Posts: 171
Joined: Sun Sep 09, 2018 5:44 pm

Post by tschak909 »

I have tried to use -create-app with -subtype=einstein, with the latest snap (20180918), and while it produces a disk, I can't read that disk in Xtal (I get a bad data error)

This is especially frustrating especially as the tools to create tatung einstein disk images have all but disappeared.

-Thom
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I've using DOS80 rather than Xtal for testing against. Though I'm guessing that shouldn't make a difference.

I'll run a sanity check this evening.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I've just run a test with DOS80.DSK and XTAL205_40TSS.DSK and a disc generated by appmake works.

If you can reproduce, could you raise an issue at GitHub and attach the generated .dsk please?
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Post by RobertK »

dom wrote:though we're now up to 8 and no overlaps!
Tatung Einstein
Otrona Attache
Osborne 1
NCR Decision Mate
Kaypro II
MZ-2500

What are the other two that I missed?

A complete list on the CP/M platform wiki page would be nice to have?

BTW, the NCR DMV is not listed on the platforms page, does this target support lo-res graphics?

Anyway, that's great progress! I never had any personal experience with CP/M machines, but for some reason I really like them.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

It's a bit clunky (okay, very clunky at the moment), but if you run:

appmake +cpmdisk -b a

Then the supported -f parameters will be printed out along with a summary of the format.

I can't spot any specific library support for the NCR DMV - it's disc format can't be created using cpm tools hence why Stefano wrote the original creator.
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Post by RobertK »

Code: Select all

C:\Misc\z88dk\bin>appmake +cpmdisk -b a
Supported CP/M formats:

attache             Otrone Attache
40 tracks, 10 sectors/track, 512 bytes/sector, 128 entries, 2048 bytes/extent

cpcsystem           CPC System Disc
40 tracks, 9 sectors/track, 512 bytes/sector, 64 entries, 1024 bytes/extent

dmv                 NCR Decision Mate
40 tracks, 8 sectors/track, 512 bytes/sector, 256 entries, 2048 bytes/extent

einstein            Tatung Einstein
40 tracks, 10 sectors/track, 512 bytes/sector, 64 entries, 2048 bytes/extent

kayproii            Kaypro ii
40 tracks, 10 sectors/track, 512 bytes/sector, 64 entries, 1024 bytes/extent

microbee            Microbee
80 tracks, 10 sectors/track, 512 bytes/sector, 128 entries, 4096 bytes/extent

mz2500cpm           Sharp MZ2500 - CPM
80 tracks, 16 sectors/track, 256 bytes/sector, 128 entries, 2048 bytes/extent

osborne1            Osborne 1
40 tracks, 5 sectors/track, 1024 bytes/sector, 64 entries, 1024 bytes/extent
Ah, yes, the CPC and Microbee are also there, great!
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

The CPC creator is also hooked in via +cpc -subtype=dsk so native compiles can also be output to disc.
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Post by RobertK »

dom wrote:The CPC creator is also hooked in via +cpc -subtype=dsk so native compiles can also be output to disc.
Off-topic: this was very helpful because for some reason I never got the CPC tape files working, but the disk files work like a charm. So my game H-Tron now supports the CPC (in native CPC mode, not CP/M).

Back to the topic: disk creation for the TIKI-100 would also be nice to have - that's such a cool machine! :-)

You can find a CP/M boot disk here:
http://www.djupdal.org/tiki/program/
(KP/M 1.17 for example)
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

RobertK wrote:Back to the topic: disk creation for the TIKI-100 would also be nice to have - that's such a cool machine! :-)

You can find a CP/M boot disk here:
http://www.djupdal.org/tiki/program/
(KP/M 1.17 for example)
If you've got it, could you send me the ROM set - I'm missing 53ls140.u4 which looks like it's quite essential in the boot process.
Post Reply