scene.org File Archive

File download

<root>­/­demos­/­artists­/­tk90x/tk90xfanraphaelgoulart_br-tk-hue.zip

File size:
155 808 bytes (152.16K)
File date:
2023-03-06 05:45:01
Download count:
all-time: 15

Preview

  • 000-doc/ dir
  • 000-doc/BR-TK-HUE_Doc.txt 4.51K
  • 000-doc/Dutch_Latin1.txt 137B
  • 000-doc/FZXdriver.txt 4.12K
  • 000-doc/ZX7.txt 3.50K
  • 001-src/ dir
  • 001-src/BR-TK-HUE-P1.asm 12.66K
  • 001-src/BR-TK-HUE-P2.asm 34.91K
  • 001-src/Delay24BCT.asm 691B
  • 001-src/dzx7_mega.asm 8.30K
  • 001-src/fuleco3_04.asm 2.39K
  • 001-src/FZXdriver_mod.asm 8.72K
  • 001-src/Goalkeeper.asm 3.05K
  • 001-src/Header_Basic.asm 5.64K
  • 001-src/Header_Print.asm 8.67K
  • 001-src/HUEHUEHUE1.asm 133.76K
  • 001-src/Player.asm 2.13K
  • 001-src/ReclaimTRDOSVars.asm 951B
  • 001-src/tk90x2.asm 103.38K
  • 002-Hobeta/ dir
  • 002-Hobeta/brtkhue1.$c 6.02K
  • 002-Hobeta/brtkhue2.$c 39.02K
  • 002-Hobeta/brtkhue_.$b 785B
  • BR-TK-HUE.tap 45.58K
  • BR-TK-HUE.trd 640.00K
  • BR-TK-HUE.tzx 45.61K

file_id.diz

===============
FZX FONT DRIVER
===============
BY EINAR SAUKAS
===============

  The FZX driver code is a free reference implementation of proportional PRINT
  for the ZX-Spectrum, that supports the FZX font format standard.

  After installing this driver, any FZX font can be used from Sinclair BASIC
  using PRINT #4.


=====
USAGE
=====

  To create the channel and attach it to stream #4, load this driver from tape
  (together with any FZX font of your choice) and execute it only once, as
  follows:

CLEAR 59999: LOAD "Sinclair"CODE 60000: LOAD "FZXdriver"CODE 65000: RANDOMIZE USR 65000

  Afterwards, you can use PRINT #4 to print your text, for instance:

PRINT #4;AT 0,0;"FZX driver code (c) Einar Saukas"'"FZX font format (c) Andrew Owen"
FOR f=32 TO 127: PRINT #4;CHR$ f;: NEXT f

  This driver supports regular ASCII characters (from space afterwards), AT
  control codes (specifying hires coordinates), and you can also use apostrophe
  as carriage return.


========
ASSEMBLY
========

  The easiest way to use this driver in Assembly is as follows:

        call    65000           ; activate driver (call it only once)
        ...
        ld      a, 4
        call    $1601           ; open channel #4
        ld      a, 'Z'
        rst     $10             ; print letter 'Z'

  For instance, if you want to execute PRINT #4;AT 100,0;"Hello world!" but in
  Assembly, this is a way to do it:

        call    65000           ; activate driver (call it only once)
        ...
        ld      a, 4
        call    $1601           ; open channel #4
        ld      hl, STRING
LOOP:   ld      a, (hl)         ; for each character of this string...
        or      a
        ret     z               ; check string terminator
        rst     $10             ; print character
        inc     hl
        jr      LOOP
        ret
STRING: defb $16, 100, 0, 'Hello world!', 0

  Alternatively you could skip channel initialization from the FZX driver and
  call the routine directly at "entry point" 2, without using channels. In this 
  case, the code above will look as follows:

        ld      hl, STRING
LOOP:   ld      a, (hl)         ; for each character of this string...
        or      a
        ret     z               ; check string terminator
        exx                     ; preserve HL
        call    FZX_START       ; print character
        exx                     ; recover HL
        inc     hl
        jr      LOOP
        ret
STRING: defb $16, 100, 0, 'Hello world!', 0


======
CONFIG
======

  The driver code is compiled starting at address 65000 by default. If you want
  a different address, change "org 65000" at the beginning of the source code,
  then recompile it.

  The font is located at address 60000 by default. If you want to use a font
  located at another address without recompiling the code (so you can alternate
  between several fonts in memory for instance), you can directly change the
  font address stored at addresses DRIVER+60 and DRIVER+61 (addresses 65060 and
  65061 by default). From BASIC, it can be done as follows:

POKE 65061,INT (FONT/256): POKE 65060,FONT-256*PEEK 65061

  From Assembly, setting a new font address is even easier:
  
        ld hl, FONT
        ld (65060), hl

  Whenever the routine moves to a new line, it restarts at pixel column 0 by
  default. However if your program uses a PAPER color different from BORDER, it
  may look better to keep a small distance from the border. To configure the
  distance (in pixels) from the left margin, you can directly change the value
  stored at address DRIVER+238 (address 65238 by default). From BASIC, it can
  be done as follows:

POKE 65238, MARGIN


=======
LICENSE
=======

  You can freely use the FZX driver code in your programs (even for commercial
  releases), or adapt this code according to your needs. In particular, porting
  this code to other platforms is permitted and encouraged.

  The only requirement is that you must clearly indicate in your documentation
  that you have either used this code or created a derivative work based on it.


=======
CREDITS
=======

  FZX font driver - Copyright (c) 2013 Einar Saukas

  FZX font format - Copyright (c) 2013 Andrew Owen
;============================================================================
; BR?-TK-HUE!
;
; O segundo demo brasileiro para TK90X
; The second brazilian demo for TK90X 
;
; Autores/authors:  
;           TK90Fan (code and graphics)
;           raphaelgoulart (musics)
; Código adicional por/additional code by: 
;           Einar Saukas (FZX driver + ZX7)
;
; Data/date: 10.06.2014/Jun-10-2014
;============================================================================

========== Texto em português ================

Eu estou assumindo que o primeiro demo feito para o TK90X foi aquele produzido
pela Microdigital, destinado a exibir nas lojas as capacidades do computador. 
O demo era distribuído num cartucho contendo uma EPROM, ligado ao conector
traseiro de expansão do TK90X. Este programa não tem um nome conhecido, mas o 
cartucho é intitulado "Demo Cartridge". O vídeo do demo pode ser assistido em
http://youtu.be/vpuogVHy37Q. Ele é bem pobre e poderia ser classificado como 
um crazy demo. :)

Como não se ouve falar de nenhum outro demo produzido no Brasil desde então,
eu ouso afirmar que "BR?-TK-HUE!" é o segundo demo genuinamente brasileiro 
para TK90X. Mas isto não é a coisa mais importante, o que interessa é manter
este maravilhoso computador vivo entre nós. 

O demo "BR?-TK-HUE!" é composto por três partes. A parte 1 é uma intro curta
com textos escritos em fonte proporcional (graças ao FZX Driver do Einar) e
música para Explorer "mega,", composta por raphaelgoulart. Partes 2 e 3 têm
figuras coloridas gigantes rolando pela tela (na verdade piscando loucamente...
desculpe-me!) e alguns efeitos com atributos de cores, embaladas sob música AY
conhecida como "pulsating". 

O programa está disponível como arquivos de imagem de fita (TAP, TZX) e disco 
Beta (TRD, Hobeta). Use-os no hardware real ou emulador. A temporização está 
ajustada para TK90X com mod de 50Hz, mas pode ser mudada para operar com outros 
computadores. Logo após carregar a primeira parte do demo, é possível escolher
entre as máquinas listadas na tela, ou entrar manualmente os parâmetros de 
tempo. Durante a execução do demo, as teclas space ou enter servirão para pular
as partes ou sair do programa. 

Não acho que este programa seja um exemplo brilhante de arte de programação para
o TK90X. Mesmo assim, todas os códigos fontes em assembly estão disponíveis e
devem ter sido distribuídos junto com o próprio programa. 

Eu espero que você possa apreciar este demo. Por favor, mantenha TK90X/Spectrum
vivos. 

TK90X Fan (reikainosuke-tk@yahoo.com.br)

========== English text ================

I presume that the first demo ever made for TK90X was the one produced by
Microdigital, aimed to show at shops capabilities of the computer. The demo
was distributed in a cartridge containing an EPROM, connected to the rear 
expansion port of TK90X. This program does not have a proper name, but the 
cartridge is named "Demo Cartridge". The demo video can be watched at 
http://youtu.be/vpuogVHy37Q. It is very crap and could be described as crazy 
demo. :) 

Since it is unheard of any other demo has been produced in Brazil since then, 
I'm daring to claim that "BR?-TK-HUE!" is the true second Brazilian demo for 
TK90X. This is not the most important thing though, what matters is that this 
wonderful computer would still live among us. 

The "BR?-TK-HUE!" demo itself is composed by three parts. Part 1 is a short 
intro with texts written in proportional fonts (thanks to Einar's FZX driver)
and AY song named "mega," composed by raphaelgoulart. Parts 2 and 3 have huge
colored picture being scrolled on the screen (flickering wildly actually... 
sorry!) and some color attribute effects, playing AY song known as "pulsating". 

The program is available in tape (TAP, TZX) and disk (TRD, Hobeta) image files. 
Use any of them to run in a real hardware or emulator. The timing is adjusted
for TK90X with 50Hz mod, but can be changed to work with another computer. Right
after loading the first part of demo, it is possible to select among the 
machines listed on screen or enter manually time parameters. During execution of
demo, space or enter key may be pressed to skip parts or to quit the program at
all. 

I do not think this program is a fine example of the art of programming on
TK90X. Nevertheless, all assembly source codes are available and must be 
distributed with the program itself. 

I hope you can enjoy this demo. Please keep TK90X/ZX Spectrum alive. 

TK90X Fan (reikainosuke-tk@yahoo.com.br)

Dutch 9pt Roman
copyright (c) 1996 Andrew Owen
Latin-1 characters added by TK90X Fan (2014)
- a serif font inspired by Times Roman

=======================
"ZX7" - by Einar Saukas
=======================

"ZX7" is an optimal LZ77/LZSS data compressor for all platforms, including the
ZX-Spectrum.

Available implementations of standard LZ77/LZSS compression algorithm use either
a "greedy" or "flexible parsing" strategy, that cannot always guarantee the best
possible encoding. In comparison, "ZX7" provides a highly efficient compression
algorithm that always generate perfectly optimal LZ77/LZSS encoding. Technically
it means compressing within space and time O(n) only.


=====
USAGE
=====

To compress a file, use the command-line compressor as follows:

    zx7 Cobra.scr

This will generate a compressed file called "Cobra.scr.zx7".

Afterwards choose a decompressor routine in assembly Z80 for the ZX-Spectrum,
according to your requirements for speed and size:

  * "Standard" routine: 69 bytes only

  * "Turbo" routine: 90 bytes, about 25% faster

  * "Mega" routine: 244 bytes, about 30% faster

Finally compile the chosen decompressor routine and load the compressed file
somewhere in memory. To decompress data, just call the routine specifying the
source address of compressed data in HL and the target address in DE.

For instance, if you compile the decompressor routine to address 65000, load
"Cobra.scr.zx7" at address 51200, and want to decompress it directly to the
screen, execute the following code:

    LD    HL, 51200  ; source address (put "Cobra.scr.zx7" there)
    LD    DE, 16384  ; target address (screen memory in this case)
    CALL  65000      ; decompress routine compiled at this address


=======
LICENSE
=======

The optimal C compressor is available under the "BSD-3" license. In practice,
this is relevant only if you want to modify its source code and/or incorporate
the compressor within your own products. Otherwise, if you just execute it to
compress files, you can simply ignore these conditions.

The Z80 assembly decompressors can be used freely within your own ZX-Spectrum
programs, even for commercial releases. The only condition is that you must
indicate somehow in your documentation that you have used "ZX7".


=======
HISTORY
=======

2012-12-30: Initial release (with optimal compressor and Z80 decompressors)

2012-12-31: Minor changes to source code since it wasn't strictly ANSI C (thanks
            to Metalbrain!)

2013-01-03: Minor changes to data format increasing maximum offset by 6% thus
            improving compression, and some improvements in the "Standard" Z80
            routine (thanks to Antonio Villena!)

2013-01-05: Further improvements in the "Standard" Z80 routine (thanks to
            Metalbrain!)


=======
CREDITS
=======

The compressed file format is directly based (although slightly improved) on
  Team Bomba's Bitbuster - http://www.teambomba.net/bombaman/downloadd26a.html
  and Gasman's Bitbuster Extreme - www.west.co.tt/matt/speccy/apology/

Some of the size improvements used in "Standard" version were suggested by
  Antonio Villena and Metalbrain.

The main speed improvement used in "Turbo" version was originally suggested by
  Urusergi for Magnus Lind's Exomizer - http://hem.bredband.net/magli143/exo/

The optimal LZ77/LZSS compress algorithm was invented by myself (Einar Saukas).
  To the best of my knowledge, there was no similar high-performance solution
  available. I thereby present this implementation as evidence of "prior art",
  thus preventing anyone from ever patenting it. Software patents are evil!!!