mirror of https://github.com/zxdos/zxuno.git
Optimizo
This commit is contained in:
parent
f30c240e9a
commit
5ef262b131
|
@ -1,7 +1,7 @@
|
||||||
#include "lodepng.c"
|
#include "lodepng.c"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
unsigned char *image, *pixel, output[0x300];
|
unsigned char *image, *pixel, output[0x280];
|
||||||
unsigned error, i, j, k, l, celda, fondo, tinta, outpos= 0;
|
unsigned error, i, j, k, l, celda, fondo, tinta, outpos= 0;
|
||||||
FILE *fo;
|
FILE *fo;
|
||||||
|
|
||||||
|
@ -18,14 +18,14 @@ int main(int argc, char *argv[]){
|
||||||
if( error )
|
if( error )
|
||||||
printf("\nError %u: %s\n", error, lodepng_error_text(error)),
|
printf("\nError %u: %s\n", error, lodepng_error_text(error)),
|
||||||
exit(-1);
|
exit(-1);
|
||||||
if( i!= 96 || j!= 48 )
|
if( i!= 96 || j!= 40 )
|
||||||
printf("\nError. Incorrect size, must be 96x48\n"),
|
printf("\nError. Incorrect size, must be 96x40\n"),
|
||||||
exit(-1);
|
exit(-1);
|
||||||
fo= fopen("fuente6x8.bin", "wb+");
|
fo= fopen("fuente6x8.bin", "wb+");
|
||||||
if( !fo )
|
if( !fo )
|
||||||
printf("\nCannot create output file\n"),
|
printf("\nCannot create output file\n"),
|
||||||
exit(-1);
|
exit(-1);
|
||||||
for ( i= 0; i < 6; i++ )
|
for ( i= 0; i < 5; i++ )
|
||||||
for ( j= 0; j < 16; j++ ){
|
for ( j= 0; j < 16; j++ ){
|
||||||
pixel= &image[((j|i<<7)*6)<<2];
|
pixel= &image[((j|i<<7)*6)<<2];
|
||||||
fondo= tinta= tospec(pixel[0], pixel[1], pixel[2]);
|
fondo= tinta= tospec(pixel[0], pixel[1], pixel[2]);
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
@ -1,17 +1,16 @@
|
||||||
|
|
||||||
output scroll.bin
|
output scroll.bin
|
||||||
org $5d29
|
org $5ee2
|
||||||
ld hl, fuente
|
|
||||||
ld b, 3
|
|
||||||
ld de, $c100
|
|
||||||
ldir
|
|
||||||
jp start
|
|
||||||
fuente incbin fuente6x8.bin
|
|
||||||
string include string.asm
|
string include string.asm
|
||||||
block $6d35-$
|
display $
|
||||||
ld (vari+2), ix
|
music ld (vari+2), ix
|
||||||
incbin music.bin
|
incbin music.bin
|
||||||
start ld hl, fondo
|
fuente incbin fuente6x8.bin
|
||||||
|
display $
|
||||||
|
start ld hl, fuente
|
||||||
|
ld b, 3
|
||||||
|
ld de, $c180
|
||||||
|
ldir
|
||||||
|
ld hl, fondo
|
||||||
ld b, $40 ; filtro RCS inverso
|
ld b, $40 ; filtro RCS inverso
|
||||||
start0 ld a, b
|
start0 ld a, b
|
||||||
xor c
|
xor c
|
||||||
|
@ -29,15 +28,51 @@ start0 ld a, b
|
||||||
ld a, b
|
ld a, b
|
||||||
sub $58
|
sub $58
|
||||||
jr nz, start0
|
jr nz, start0
|
||||||
; ld hl, $5800
|
|
||||||
; ld de, $5801
|
|
||||||
ld b, 3
|
ld b, 3
|
||||||
; ld (hl), l
|
|
||||||
ldir
|
ldir
|
||||||
; xor a
|
|
||||||
out ($fe), a
|
out ($fe), a
|
||||||
inc a
|
inc a
|
||||||
ex af, af'
|
ex af, af'
|
||||||
|
ld de, $401f
|
||||||
|
rever ld hl, $ffe1
|
||||||
|
add hl, de
|
||||||
|
ld c, (hl)
|
||||||
|
ld a, $80
|
||||||
|
revl1 rl c
|
||||||
|
rra
|
||||||
|
jr nc, revl1
|
||||||
|
ld (de), a
|
||||||
|
inc hl
|
||||||
|
dec de
|
||||||
|
ld c, (hl)
|
||||||
|
ld a, $80
|
||||||
|
revl2 rl c
|
||||||
|
rra
|
||||||
|
jr nc, revl2
|
||||||
|
ld (de), a
|
||||||
|
inc hl
|
||||||
|
dec de
|
||||||
|
ld c, (hl)
|
||||||
|
ld a, $80
|
||||||
|
revl3 rl c
|
||||||
|
rra
|
||||||
|
jr nc, revl3
|
||||||
|
ld (de), a
|
||||||
|
inc hl
|
||||||
|
dec de
|
||||||
|
ld c, (hl)
|
||||||
|
ld a, $80
|
||||||
|
revl4 rl c
|
||||||
|
rra
|
||||||
|
jr nc, revl4
|
||||||
|
ld (de), a
|
||||||
|
ld hl, $23
|
||||||
|
add hl, de
|
||||||
|
ex de, hl
|
||||||
|
ld a, d
|
||||||
|
cp $58
|
||||||
|
jr nz, rever
|
||||||
|
|
||||||
ld hl, $c000
|
ld hl, $c000
|
||||||
ld de, $c400
|
ld de, $c400
|
||||||
start1 ld b, $08
|
start1 ld b, $08
|
||||||
|
@ -48,15 +83,15 @@ start2 ld a, (hl)
|
||||||
cpi
|
cpi
|
||||||
jp pe, start2
|
jp pe, start2
|
||||||
jr nc, start1
|
jr nc, start1
|
||||||
|
ld a, $c9
|
||||||
|
ld ($c006), a
|
||||||
ld hl, $716f
|
ld hl, $716f
|
||||||
call $6d3c
|
call music+7
|
||||||
|
start3 call $6e77
|
||||||
start3 ei
|
ei
|
||||||
call $6e77
|
|
||||||
halt
|
halt
|
||||||
di
|
di
|
||||||
ld bc, 4
|
ld bc, 5
|
||||||
start4 djnz start4
|
start4 djnz start4
|
||||||
dec c
|
dec c
|
||||||
jr nz, start4
|
jr nz, start4
|
||||||
|
@ -78,7 +113,7 @@ start4 djnz start4
|
||||||
vari ld ix, string
|
vari ld ix, string
|
||||||
ld hl, start3
|
ld hl, start3
|
||||||
push hl
|
push hl
|
||||||
ld hl, $6d35
|
ld hl, music
|
||||||
push hl
|
push hl
|
||||||
ex af, af'
|
ex af, af'
|
||||||
rrca
|
rrca
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
include define.asm
|
include define.asm
|
||||||
output scrolldesc.bin
|
output scrolldesc.bin
|
||||||
org $5ccb
|
org $5ccb
|
||||||
ld de, $5d29+filesize-1
|
ld de, $5ee2+filesize-1
|
||||||
di
|
di
|
||||||
defb $de, $c0, $37, $0e, $8f, $39, $96
|
defb $de, $c0, $37, $0e, $8f, $39, $96
|
||||||
jr aqui
|
jr aqui
|
||||||
|
@ -54,5 +54,6 @@ offend rr e
|
||||||
lddr
|
lddr
|
||||||
exitdz pop hl
|
exitdz pop hl
|
||||||
jr nc, mainlo
|
jr nc, mainlo
|
||||||
|
jp $7be4
|
||||||
incbin scroll.bin.zx7b
|
incbin scroll.bin.zx7b
|
||||||
fin
|
fin
|
Loading…
Reference in New Issue