Page 1 of 1

(classic) HRG1 graphics option for the TRS80

Posted: Thu Feb 18, 2021 4:06 pm
by stefano
Yet another graphics library for the TRS-80.
Lib option: -lgfxhrg1

This card was a crap implementation of a 384x192 pixel interface. It is famous for its slowness, but I suspect that part of the problem was on the odd addressing method, requiring a couple of divisions by odd values,
I used a conversion table to try to speed-up the pixel addressing, I'll add an optimized 'putsprite' too.

The emulators are not very kind with this interface. It is often forgotten, e.g. the graphics page is not refreshed on SDL2TRS, nor it is explained the need of choosing a different font.

hrg1.png

Re: (classic) HRG1 graphics option for the TRS80

Posted: Fri Feb 19, 2021 7:47 pm
by JenGun
Thanks for the hint: it should now be fixed in SDL(2)TRS ... :)

Re: (classic) HRG1 graphics option for the TRS80

Posted: Sat Feb 20, 2021 9:18 am
by stefano
Thankyou, I'll check it in the next week.
Can I suggest to keek a copy of sdl2.dll in the bin folder?
Not all the versions if it are valid, and luckily it's the only DLL required.

Re: (classic) HRG1 graphics option for the TRS80

Posted: Sat Feb 20, 2021 9:22 am
by stefano
Thankyou, I'll check it in the next week.
Can I suggest to keek a copy of sdl2.dll in the bin folder?
Not all the versions of it are valid, and luckily it's the only DLL required.

..one more suggestion, the emulators accepting a CMD file on startup do first initialize the boot area at the beginning of memory.
That CMD trick is very useful, thus I'm using it already even if not fully functional :)

Re: (classic) HRG1 graphics option for the TRS80

Posted: Sat Feb 20, 2021 12:35 pm
by JenGun
Which version of SDL2.DLL (32/64 bit) should be uploaded?
The emulator just loads the CMD file into memory and sets the Z80 PC to the entry point. In order for some programs to work, the appropriate ROM and / or DOS must be loaded beforehand. The options for this should be passed on the command line or in a configuration file.

Re: (classic) HRG1 graphics option for the TRS80

Posted: Mon Feb 22, 2021 7:41 am
by stefano
I'd say the 64bit version.
Thankyou for the hints on the CMD trick.

Re: (classic) HRG1 graphics option for the TRS80

Posted: Mon Feb 22, 2021 4:40 pm
by stefano
I finally succeded on getting an optimized putsprite() function for the HRG1 board, hopefully fast enough to be used in games.

It includes useful changes which might be reused on other targets, e.g. where we wish to alter a smaller number of bits than 8 on video memory.
https://raw.githubusercontent.com/z88dk ... sprite.asm

hrg1b.png