I take the opportunity to ask about the way the console output defaults are configured.
Is it enough to spot the TAR-* flags in the crt0 startup files?
VG5000 ROM console output
Re: How do I get z88dk to work on a completely new target system?
It should be...
Code: Select all
defc TAR__fputc_cons_generic = 1
Re: How do I get z88dk to work on a completely new target system?
I see, what if I'm willig to add, say, the NATIVE console support to the VG5000 ?
Should it be changed to '0' ?
Should it be changed to '0' ?
Re: VG5000 ROM console output
I've split this out into a new topic to avoid confusion.
I've just refreshed my memory about the VG5000. I half wish I hadn't - it looks like we skipped implementing the ROM console printer because of some issue?
If you change that value to 0 then the ROM (well fputc_cons_native) as the default printer.
Even with the setting as it currently is, you could compile with a ROM printer with --pragma-redirect:fputc_cons=fputc_cons_native
I've just refreshed my memory about the VG5000. I half wish I hadn't - it looks like we skipped implementing the ROM console printer because of some issue?
If you change that value to 0 then the ROM (well fputc_cons_native) as the default printer.
Even with the setting as it currently is, you could compile with a ROM printer with --pragma-redirect:fputc_cons=fputc_cons_native
Re: VG5000 ROM console output
Basing on my recent ROM analysins I'm now confident enough to propose a workaround:
https://github.com/z88dk/z88dk/pull/2204
The problem was on the interrupt code, which we disabled to preserve IX, but necessary to provide the display refresh.
My current workaround is very basic but works.
I wonder if it could be worth to rewrite it and guarantee a constant speed independently on the ROM versions, but before developing this target furtherly I'd ask you to undo the IXIY workaround, I'm a bit scared to break something ! Similarly, if you find time to add the code for the custom interrupt handling, you're welcome.
https://github.com/z88dk/z88dk/pull/2204
The problem was on the interrupt code, which we disabled to preserve IX, but necessary to provide the display refresh.
My current workaround is very basic but works.
I wonder if it could be worth to rewrite it and guarantee a constant speed independently on the ROM versions, but before developing this target furtherly I'd ask you to undo the IXIY workaround, I'm a bit scared to break something ! Similarly, if you find time to add the code for the custom interrupt handling, you're welcome.
Re: VG5000 ROM console output
I'm similarly nervous about this one!
The gencon has a refresh display routine here: https://github.com/z88dk/z88dk/blob/mas ... e.asm#L208 which is used for scrolling and clearing - for normal printing we call $0092 which I'm assuming deals with the hardware.
I've just looked at the ROM and your PR. That really is spectacularly evil - I was wondering why there was a weird pop iy in there, but it's to stop the rest of the ROM interrupt code from running. I'm a bit worried about the ei in the ROM code - whether we might end up interrupting the tailend of the interrupt routine in the crt0 (I think we have a similar-ish theoretical issue in +cpc as well)
The gencon has a refresh display routine here: https://github.com/z88dk/z88dk/blob/mas ... e.asm#L208 which is used for scrolling and clearing - for normal printing we call $0092 which I'm assuming deals with the hardware.
I've just looked at the ROM and your PR. That really is spectacularly evil - I was wondering why there was a weird pop iy in there, but it's to stop the rest of the ROM interrupt code from running. I'm a bit worried about the ei in the ROM code - whether we might end up interrupting the tailend of the interrupt routine in the crt0 (I think we have a similar-ish theoretical issue in +cpc as well)
Re: VG5000 ROM console output
Generally, the entry point and BASIC system variables positions were strictly respected, thus also a jump in the scrolling or clearing code is acceptable (it is advisable to init IX everytime first, perhaps we can provide a simple ROM interposer).
Thus, what I know so far is that this trick should be valid on all the existing ROM versions (there are 3 versions out there, in my information).
A next, better version of the interrupt hook can easily adjusted to be more elegant, e.g. avoiding to touch the index register in the frequent situation of the simple counters increment and directly entering the DISPLAY refresh code after a simple, clean, PUSH IX (after removing IXIY).
Thus, what I know so far is that this trick should be valid on all the existing ROM versions (there are 3 versions out there, in my information).
A next, better version of the interrupt hook can easily adjusted to be more elegant, e.g. avoiding to touch the index register in the frequent situation of the simple counters increment and directly entering the DISPLAY refresh code after a simple, clean, PUSH IX (after removing IXIY).
Re: VG5000 ROM console output
I think I'll try myself.. feel free to blame me soon