(New Target) TIM-011
(New Target) TIM-011
Over the past few days I've added support for the TIM-011 computer.
This is a fairly late CP/M 3 machine created in Serbia in 1987. Apparently around about 1200 of them were made.
What's interesting from a z88dk perspective is that it's based on a z180, so this machine is the first z180 target within classic. The hardware is summarised on the wiki page: https://github.com/z88dk/z88dk/wiki/Platform---TIM011
There's support for generic console and hires graphics all in several shades of green.
The machine (in Mame) takes quite a long time to boot up, so don't be too worried if you're looking at a blank screen for a while!
This is a fairly late CP/M 3 machine created in Serbia in 1987. Apparently around about 1200 of them were made.
What's interesting from a z88dk perspective is that it's based on a z180, so this machine is the first z180 target within classic. The hardware is summarised on the wiki page: https://github.com/z88dk/z88dk/wiki/Platform---TIM011
There's support for generic console and hires graphics all in several shades of green.
The machine (in Mame) takes quite a long time to boot up, so don't be too worried if you're looking at a blank screen for a while!
Re: (New Target) TIM-011
Thanks, highres targets are always interesting!
I'm struggling to get the created floppy images to work in the current Mame version 0.255, maybe am I doing something wrong.
Obviously only one floppy drive is emulated, so I'm booting the tim011 system from the CP/M disc tim011pcw.img, which works fine, and then I try to attach the created .img file. As soon as there is a different disc in the drive other than the CP/M disc, the system hangs with keyboard shortcuts and some garbage characters appearing on the screen.
I'm struggling to get the created floppy images to work in the current Mame version 0.255, maybe am I doing something wrong.
Obviously only one floppy drive is emulated, so I'm booting the tim011 system from the CP/M disc tim011pcw.img, which works fine, and then I try to attach the created .img file. As soon as there is a different disc in the drive other than the CP/M disc, the system hangs with keyboard shortcuts and some garbage characters appearing on the screen.
Re: (New Target) TIM-011
I'm using a built from source Name version from last week (I was looking to see if I could get the Partner Delta running and my laptop has now dropped below the requirements of the release build!) so I think it should be roughly the same version.
It's tricky changing discs - any mistyping and you end up in an error recovery RSX which isn't quite set up correctly for the terminal (hence the random characters) and is almost impossible to quit as a result.
Since navigating the Mame menus also puts some of the keypresses to the machine, I've got into a habit of backspacing and deleting the inserted characters and then starting the program.
It's tricky changing discs - any mistyping and you end up in an error recovery RSX which isn't quite set up correctly for the terminal (hence the random characters) and is almost impossible to quit as a result.
Since navigating the Mame menus also puts some of the keypresses to the machine, I've got into a habit of backspacing and deleting the inserted characters and then starting the program.
Re: (New Target) TIM-011
Ok, I was suspecting something like that. Unfortunately, it seems to be impossible to change the floppy image on the fly under Windows without creating unwanted keyboard input. The problem always comes when closing the UI menu (either with the escape key or with the "Close menu" option), this sets the cursor to the beginning of the line, and then the system hangs.
Any hints from other Windows users would be appreciated...
Have you already tried this emulator?
http://matejhorvat.si/sl/slorac/delta/partner/index.htm
Any hints from other Windows users would be appreciated...
That's great news! I had never heard of the TIM-011 before, but the Delta Partner target was already on my wish list.
Have you already tried this emulator?
http://matejhorvat.si/sl/slorac/delta/partner/index.htm
Re: (New Target) TIM-011
Back to the TIM-011, here's a crazy idea: how about letting appmake create a bootable disc? That means, taking the machine-specific CP/M boot disc image and putting the binary file on it?
CP/M has been made open source by Digital Research last year, but the hardware-specific part could be legally problematic. But If the machine's manufacturer is no longer in the business, there shouldn't be any legal problems.
Just an idea...
CP/M has been made open source by Digital Research last year, but the hardware-specific part could be legally problematic. But If the machine's manufacturer is no longer in the business, there shouldn't be any legal problems.
Just an idea...
Re: (New Target) TIM-011
There’s already an option to write to the boot tracks - -Cz—bootfile=XXX
To add extra files use -Cz—add-file=YYY
Which apart from the actual binaries should be all that’s needed
To add extra files use -Cz—add-file=YYY
Which apart from the actual binaries should be all that’s needed
Re: (New Target) TIM-011
Please elaborate: how do I take the boot tracks and the required CP/M boot files out of tim011pcw.img?
Maybe with the Samdisk tool mentioned on the CP/M platform page?
A step-by-step description would be nice to have, we could later add this to the CP/M platform wiki page.
Maybe with the Samdisk tool mentioned on the CP/M platform page?
A step-by-step description would be nice to have, we could later add this to the CP/M platform wiki page.
Re: (New Target) TIM-011
I'm seriously considering to extend appmake with one of my dirty hacks add an option involving samdisk 
It could be an option like "--getsys <diskfile>".
Frankly, samdisk is poorly documented, so most of the conversion commands need to be guessed by trial and error.
I recently tried to convert a disk image from D88 to IMD, but the resulting disk image is not a good one. I think the tool sorted out the sector numbering in some way, perhaps un-skewing them.
This sequence is apparently very powerful, but requires more tests:
samdisk --cyls=3 --merge lnw80.imd a.imd
The numbers of cylinders to copy is the "boottracks" attribute specified in cpm2.c (part of appmake):
// TRS80 Holmes VID-80 DDSS
static disc_spec holmes_spec = {
.name = "TRS80Holmes",
.disk_mode = MFM250,
.sectors_per_track = 10,
.tracks = 40,
.sides = 1,
.sector_size = 512,
.gap3_length = 0x17,
.filler_byte = 0xe5,
.boottracks = 1,
.directory_entries = 64,
.extent_size = 1024,
.byte_size_extents = 1,
.first_sector_offset = 0,
};
The limit of the current bootfile implementation is that it refers to the current disk image specs to craft the target boot sectors, sometimes it is preferrable to have a dumb track copy from a donor file already created in the same format of the target one (imd -> imd, dsk -> dsk, etc..).

It could be an option like "--getsys <diskfile>".
Frankly, samdisk is poorly documented, so most of the conversion commands need to be guessed by trial and error.
I recently tried to convert a disk image from D88 to IMD, but the resulting disk image is not a good one. I think the tool sorted out the sector numbering in some way, perhaps un-skewing them.
This sequence is apparently very powerful, but requires more tests:
samdisk --cyls=3 --merge lnw80.imd a.imd
The numbers of cylinders to copy is the "boottracks" attribute specified in cpm2.c (part of appmake):
// TRS80 Holmes VID-80 DDSS
static disc_spec holmes_spec = {
.name = "TRS80Holmes",
.disk_mode = MFM250,
.sectors_per_track = 10,
.tracks = 40,
.sides = 1,
.sector_size = 512,
.gap3_length = 0x17,
.filler_byte = 0xe5,
.boottracks = 1,
.directory_entries = 64,
.extent_size = 1024,
.byte_size_extents = 1,
.first_sector_offset = 0,
};
The limit of the current bootfile implementation is that it refers to the current disk image specs to craft the target boot sectors, sometimes it is preferrable to have a dumb track copy from a donor file already created in the same format of the target one (imd -> imd, dsk -> dsk, etc..).
Re: (New Target) TIM-011
The theory was good, but for some reason I couldn't get it to work. Probably not the best machine to experiment on since it takes so long to boot. A quick work around might be to use cpmtools to copy the .COM file onto the boot disc.
Diskdefs seems to be:
Diskdefs seems to be:
Code: Select all
# TIM011/MM6 Micromint SB180 - DSDD 3.5" - 1024 x 5
diskdef tim011
seclen 1024
tracks 160
sectrk 5
secbase 17
blocksize 2048
maxdir 256
skew 1
boottrk 2
os 2.2
end
Re: (New Target) TIM-011
To clarify, the current support level for the CP/M disks is really good.
Specialized tools like samdisk or cpmtools (to name some of the best ones) are still limited after years of clever development. Those CP/M systems able to read disk formats from other systems were continously improved during the product life, sometimes the user interface was radically reworked to allow those options which weren't considered at the beginning (different disk density, a parameter file to customize the disk formats, etc..).
On the other side improving the flexibility makes using the tool less straightforward, in example cpmtools to some extent permits to work around the problem of a different size in track#0 but the online tutorials never mention it, in one case it is suggested to truncate the file at the beginning, first !
I havent the TIM011 boot disk, but if you can get it in IMD format you can use the MSDOS tool IMDU.COM:
IMDU /D /B boot.imd boot.raw
It will show a disk map repeating the sector numbering everytime it differs from the previous track.
I've met a case where the the disk had 3 boot tracks and they were in 3 different formats !
If they're all identical, it is worth to try the Dominic's suggestion.
If it won't work, we should fix the tool.
Specialized tools like samdisk or cpmtools (to name some of the best ones) are still limited after years of clever development. Those CP/M systems able to read disk formats from other systems were continously improved during the product life, sometimes the user interface was radically reworked to allow those options which weren't considered at the beginning (different disk density, a parameter file to customize the disk formats, etc..).
On the other side improving the flexibility makes using the tool less straightforward, in example cpmtools to some extent permits to work around the problem of a different size in track#0 but the online tutorials never mention it, in one case it is suggested to truncate the file at the beginning, first !
I havent the TIM011 boot disk, but if you can get it in IMD format you can use the MSDOS tool IMDU.COM:
IMDU /D /B boot.imd boot.raw
It will show a disk map repeating the sector numbering everytime it differs from the previous track.
I've met a case where the the disk had 3 boot tracks and they were in 3 different formats !
If they're all identical, it is worth to try the Dominic's suggestion.
If it won't work, we should fix the tool.
Re: (New Target) TIM-011
Swapping disks in MAME is working better now in Windows (as of Version 0.268), so I have now released my games H-Tron and Mastermind RK for the TIM-011.
Two issues/questions:
1. Is there a math library that can be used with this target? When using -lm I am getting this error:
error: file not found: genmath_z180.lib
2. When trying to compile my game Deepspace, I'm getting this error:
w_draw_callee.asm:48: error: undefined symbol: w_line_r
^---- w_line_r
What's wrong here?
Two issues/questions:
1. Is there a math library that can be used with this target? When using -lm I am getting this error:
error: file not found: genmath_z180.lib
2. When trying to compile my game Deepspace, I'm getting this error:
w_draw_callee.asm:48: error: undefined symbol: w_line_r
^---- w_line_r
What's wrong here?
Re: (New Target) TIM-011
1. Try with --math32, or --math-dai32 or --math-bbc or -lmath48_z180
2. That routine uses ixh and ixl so can't be assembled for the z180 - it'll need a bit of rework to sort out.
[edited several times]
2. That routine uses ixh and ixl so can't be assembled for the z180 - it'll need a bit of rework to sort out.
[edited several times]
Re: (New Target) TIM-011
For point #2, there's a C implementation for the c128 in targets/c128/c128.
lineivdc.c. and linevdc.c
lineivdc.c. and linevdc.c
Re: (New Target) TIM-011
Good point. I've hooked in the portable line drawing routines for the tim011. Hopefully that'll solve the problem (apologies @RobertK I've not been able to test this)
Re: (New Target) TIM-011
Excellent, line drawing is working fine now. I've also tested diagonal lines since there are only straight lines in my game Deepspace.
A new Deepspace release is out now, with support for the TIM-011.
However, globe.c won't compile with any of them, mostly giving an error "pi not defined".
Having now released three of my four programs for this target, I'm still struggling with EPB: the programs keeps hanging for several seconds after every keyboard input. I have already changed virtual joystick polling to the "pool only once per game loop" logic and disabled the second joystick, but that didn't help. I will keep on investigating.
A new Deepspace release is out now, with support for the TIM-011.
All four are working and doing everything I need for my Elite Planet Browser, thanks.
However, globe.c won't compile with any of them, mostly giving an error "pi not defined".
Having now released three of my four programs for this target, I'm still struggling with EPB: the programs keeps hanging for several seconds after every keyboard input. I have already changed virtual joystick polling to the "pool only once per game loop" logic and disabled the second joystick, but that didn't help. I will keep on investigating.
Re: (New Target) TIM-011
blind suggestiom: try replacing pi() or PI with M_PI
Re: (New Target) TIM-011
Ok, I've just noticed that for the Galaksija I had to do this, so I just added an OR condition for the TIM (and I compile it defining -D__TIM011__):
And that was it. The TIM is indeed very powerful, it draws the entire globe in a few seconds.
Code: Select all
#if defined(__GAL__) || defined(__TIM011__)
double_t pi() /* pi */
{
return 3.141592654;
}
#endif