Giter Club home page Giter Club logo

Comments (11)

suborb avatar suborb commented on September 23, 2024

@zx70 is doing some fairly major tweaks on the zx81 video at the moment, so this is probably a fallout from that.

from z88dk.

zx70 avatar zx70 commented on September 23, 2024

Right. Hopefully the latest snapshot altready includes a fix for it, please let me know.

from z88dk.

Fabrizio-Caruso avatar Fabrizio-Caruso commented on September 23, 2024

Hi @zx70, I could get one of my games to work. Have you improved the performance of the WRX driver?
It looks still very slow.
It would be nice to have some sort of UDG (solid, non-trasparent, 8 pixel-aligned tiles). It would make my games playable.
I currently use sprites, which cannot assume they are alligned on 8 pixel boundaries and I have to delete and draw them each single time I draw a "tile".

from z88dk.

zx70 avatar zx70 commented on September 23, 2024

there's little space for speed improvements on the driver itself. I can say that the 64 rows mode is faster and that hrg_blank() will make the programs run faster when the display is blanked.
On the libraries you could achieve a little bit of boost by using clga() to delete the sprites area, iirc I tuned it to help with the putsprite() slowness.
I also think that the text driver allows the font redefinition in graphics mode, I don't remember if the udg is supported.
I've also fixed the arx driver, it is still slower than wrx but it is now overall improved.

from z88dk.

Fabrizio-Caruso avatar Fabrizio-Caruso commented on September 23, 2024

I am not aware of UDG for the ZX81. That is what I need. Hopefully they are faster than sprites.

Is the arx driver meant for a more exotic hardware?

How can I use clga()?

from z88dk.

zx70 avatar zx70 commented on September 23, 2024

I was going to integrate my answer, the zx81 had several video modifications to extend its capabilities.
The earlier hardware mods simply aimed to replace the ROM font.
You can look at examples/zx81/dstar.c, I've managed to support most of the possible font positions by pressing the numeric keys: different DIY projects existed on the magazines as well as some commercial interface.
At its maximum extent this mod allows a software trick, the ARX driver (by Andy Rea, recently improved by Fruitcake) which swaps the fonts during the video raster pass to get a full graphics mode. This means that the ARX graphics library is not your best choice when you use 8x8 symbols because you'd rather prefer a font redefinition option in text mode.

The WRX mode is different, it uses ram areas in different positions which couldn't be used in text mode. Other historical graphics extensions were the Memotech HRG, the G007 and few other rare and expensive interfaces.

In graphics mode you can speed up the sprites by

  • reducing their size (see microman),
  • running in 64 rows mode (which also requires less ram memory),
  • and where library is well written, using clga() to clean the video portion.

void clga(int tlx, int tly, int width, int height)

from z88dk.

zx70 avatar zx70 commented on September 23, 2024

I noticed that the optimized clga() could be extended to some more target with 'narrow' HRG graphics.
I just did it for the PX4 and the MC-1000 but testing it is a lenghty process.

You can test the code on your favourite target yourself, you need to spot the right 'lst' file (something like 'libsrc/target/mc1000/mc1000.lst'), alter it and rebuild the target library.
The list file must have a line referring to the 'narrow' graphics list:

@gfx/narrow/gfx_narrow.lst

alter it by inserting the reference to the alternative code BEFORE the gfx list inclusion:

gfx/narrow/obj/${TARGET}/clrarea2
@gfx/narrow/gfx_narrow.lst

Then, move into {z88dk}/libsrc and use make to rebuild the specific target libraries and move the resulting lib files into {z88dk}/lib/clibs

Do not try it on low resolution targets (like the Mattel Aquarius), it won't work.

EDIT: nor it will work on the MSX/SVI VDP, but I'm on it

`
; --- Different way to compute the horizontal byte boundary ---

ld      a,h
and     7
dec     a
ccf               ; CY reset if we're at a byte boundary
ld      a,0
adc     b         ; otherwise add 1/8 more and include one extra byte
rra
srl a
srl a
ld      (rowbytes1+1), a
ld      (rowbytes2+1), a            ; 0 means that area is within same address

; --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---

`

from z88dk.

Fabrizio-Caruso avatar Fabrizio-Caruso commented on September 23, 2024

@zx70 I see a significant improvement on the ZX81 WRX target.
Not much on the C128 80col mode (which in my case should not use sprites by redefined characters but which are not possible (yet or may ever) possible on the C128 when controlled by the Z80 (???)

from z88dk.

zx70 avatar zx70 commented on September 23, 2024

I just spotted a partial regression which I never fixed after a big clean-up activity happened some year ago.
I suspect we have faster replacements of putsprite() and draw_profile() for the zx81 in high resolution.

from z88dk.

zx70 avatar zx70 commented on September 23, 2024

I think the sprites on the ZX81 and on the TS2068 should be slightly faster now

Note that on the ZX81 several HRG modes are available:
WRX
ARX (probably the UDG is a better choice here, but putsprite is supported).

..and with some memory constraint:
Memotech WRX (not all the graphics patterns are usable)
G007

from z88dk.

zx70 avatar zx70 commented on September 23, 2024

+Commodore 128, this should speed-up clga(), xorclga() and fillb().
The vertical overflow protection is missing, but I think it is a good compromise already

from z88dk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.