ENTERPRISE KLUB
Előfizetés a 2018-as évre
RÉSZLETEK és ELŐFIZETÉS
Welcome, Guest. Please login or register.


Author Topic: Dither256b (Read 816 times)

Offline IstvanV

  • EP addict
  • *
  • Posts: 4343
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 51.0 Firefox 51.0
    • View Profile
Re: Dither256b
« Reply #15 on: 2017.April.26. 21:08:44 »
5 colors:
* dith256.out (0.25 kB - downloaded 60 times.)

Offline geco

  • EP addict
  • *
  • Posts: 4578
  • Country: hu
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 45.0 Firefox 45.0
    • View Profile
Re: Dither256b
« Reply #16 on: 2017.April.27. 08:35:58 »

Offline IstvanV

  • EP addict
  • *
  • Posts: 4343
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 51.0 Firefox 51.0
    • View Profile
Re: Dither256b
« Reply #17 on: 2017.April.27. 10:31:44 »
The optimization could be better, creating the character set takes up the majority of the code. :oops:

Edit: it could also be simplified by reducing the character height to 8 pixels, that way the dither has a tile size of 4*8 instead of 4*9, or even 4*4 (the lower half of the character is the same as the upper) which is ideal for 16 levels.
« Last Edit: 2017.April.27. 10:46:45 by IstvanV »

Offline g0blinish

  • EP fan
  • *
  • Posts: 110
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 57.0.2987.98 Chrome 57.0.2987.98
    • View Profile
Re: Dither256b
« Reply #18 on: 2017.April.27. 10:38:35 »
I have another little algorithm for generating dither, but generation of 128 chars takes same space.

Offline IstvanV

  • EP addict
  • *
  • Posts: 4343
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 51.0 Firefox 51.0
    • View Profile
Re: Dither256b
« Reply #19 on: 2017.April.27. 21:36:43 »
Some optimizations allowed for saving 12 bytes, leaving enough space for synchronization to vertical blanking:
* dith256_opt.out (0.25 kB - downloaded 50 times.)
Another modified version with 8 pixel character height, 40x28 screen, EXOS compatible reset routine, and some other minor changes:
* dith256_8.out (0.25 kB - downloaded 48 times.)

The effect can be changed with some minor edits, for example:
Code: ZiLOG Z80 Assembler
  1. A   0167  16 0E        LD    D, 0E
  2.  
  3. A   0178  15           DEC   D
Perhaps instead of the reset routine, the saved space could be used for changing the parameters with the keyboard, or the plasma effect could be made more complex and interesting.
« Last Edit: 2017.April.28. 10:59:47 by IstvanV »

Offline SlashNet

  • EP user
  • *
  • Posts: 264
  • Country: ua
  • Enterprise 128K | Cubietruck
  • OS:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Vivaldi 1.92.917.39 Vivaldi 1.92.917.39
    • View Profile
Re: Dither256b
« Reply #20 on: 2017.September.08. 18:53:31 »
Another modified version with 8 pixel character height, 40x28 screen, EXOS compatible reset routine, and some other minor changes:
dith256_8.out

Video on Zozosoft request
https://youtu.be/tmma1KatmlY
Press ENTER to exit BASIC