(classic) New targets: Hubler Grafik MC and Kramer MC

Discussion about other targets
Post Reply
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

(classic) New targets: Hubler Grafik MC and Kramer MC

Post by dom »

Another couple of machines from the DDR have been added.

The Kramer MC is a fairly unspecial monitor style machine with a 64x16 display. Gencon is supported in addition to really lores graphics.

The H?bler Grafik MC is a little more interesting, it's another monitor style machine, but this time comes with a 256x256 pixel bitmapped display, as result under z88dk it supports redefinable fonts, UDGs and high resolution graphics.

On all of these machines the keyboard interface emits the ascii code of the key that has been pressed so there's no chance of an inkey interface.

Wiki links with more information are below:

https://github.com/z88dk/z88dk/wiki/Platform--KramerMC
https://github.com/z88dk/z88dk/wiki/Pla ... erGrafikMC
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Post by RobertK »

Many thanks for each new target!

A few test results:

H?bler/Evert MC: gotoxy() does not work.
H?bler Grafik MC: gotoxy() does not work (Graphics is ok).
Kramer MC: gotoxy() and clearing the screen do no work.
dom wrote:On all of these machines the keyboard interface emits the ascii code of the key that has been pressed so there's no chance of an inkey interface.
Does this mean that kbhit() and getch() will not work? Because that's what I noticed when I tried to run H-Tron on the H?bler Grafik MC.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

That's odd - I've never seen that function break before and my ansivt52 tests worked ok - are you compiling with --generic-console?

The firmware console driver on some of the machines supports code 12 for CLS so given the lack of colour etc it might not be noticeable if the option was omitted.

I think something is wrong with getk() - let me read the firmware source code again and get a fix for you. Sorry about that.
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Post by RobertK »

dom wrote:That's odd - I've never seen that function break before and my ansivt52 tests worked ok - are you compiling with --generic-console?
The firmware console driver on some of the machines supports code 12 for CLS so given the lack of colour etc it might not be noticeable if the option was omitted.
Sorry, my mistake! I thought that only the Generic Console was supported so I omitted the console parameter. With -pragma-redirect:fputc_cons=fputc_cons_generic added, gotoxy() and clearing the screen work fine.
dom wrote:I think something is wrong with getk() - let me read the firmware source code again and get a fix for you. Sorry about that.
No problem, it wouldn't be fun if everything worked perfectly from the beginning. :)

So my final test results are:

- The H?bler/Evert MC is just perfect, with the current features you can call this target complete.

- The H?bler Grafik MC has the above mentioned keyboard problem when using kbhit() and getch(), it does not recognize any keyboard input.

- The Kramer MC also seems to have such a problem, and in addition it fills the screen with horizontal lines when going through the main loop of my EPB program. Another small bug: the inverse control code turns underlining on instead of inverse printing.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

So for the build tonight, the Grafik-MC should be fixed.

The Kramer is proving awkward, the console status routine in the ROM doesn't seem to be working as expected so I'll have to recreate it in user-space. The horizontal lines were because the wrong entry point was being called (oops).

The Kramer doesn't have inverse - the higher characters are underlined so I picked that instead.
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Post by RobertK »

The Grafik-MC is perfect now, thanks. I have already released a new version of my H-Tron game which now supports the H?bler-Grafik-MC.

Let's see what you can do about the Kramer. BTW, the horizontal lines are still there, but I assume that you have not commited your changes yet.

Ah, I thought that we already have console support for underlining, but this is one of the ToDos in issue #1360. So underlining instead of bold is quite a good provisional solution and incidentally quite useful in my EPB program.
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I've just merged the start of the underline/bold work - it feels unlikely that the text based machines will support it. I'll slowly add support to the other targets as, well, to be blunt, I feel like it - I think about 15 or so of them have the feature now.

To make your porting life a little bit easier I've added in a ioctl to query the console capabiilities so it can be detected at runtime what has effect - it's obviously dependent on the screen mode what can be done.

Yeah, the Kramer change wasn't committed - I'll try and figure out what can be done with it, we'll probably end up with inkey support to be honest.
User avatar
RobertK
Well known member
Posts: 347
Joined: Mon Feb 26, 2018 12:58 pm

Post by RobertK »

dom wrote:Yeah, the Kramer change wasn't committed - I'll try and figure out what can be done with it, we'll probably end up with inkey support to be honest.
It seems that you have already done something last night, because kbhit() and getch() work now - not very responsive in the emulator, but still enough for me, thanks!

I have finally released a new version of EPB which supports the latest batch of new machines.
dom wrote:I've added in a ioctl to query the console capabiilities so it can be detected at runtime what has effect
Please elaborate (in a spearate thread), how can we query the available capabilities?
User avatar
dom
Well known member
Posts: 2076
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Re the Kramer: I ended up calling deep into the ROM to get to the routine I wanted. There's something a bit odd with the keyboard within jkcemu - many times I've had no input for various machines. The Kramer is actually also emulated by mame though I'm not sure how to get files into it.

The console_ioctl() addition has been documented here: https://github.com/z88dk/z88dk/wiki/Cla ... pabilities
Post Reply