Posts: 8
Threads: 1
Joined: Jul 2012
Reputation:
0
Hola a todos, gracias por recibirme en este foro. Sorry por escribir en español, intente' traducir mi texto con el traductor de Google pero confunde mas de lo que explica.
Les cuento que estoy creando un TRACKER para el AY 3-8912 con zx boriel puramente en basic, para poder hacerle Musica y FX a mis juegos, claro que tambien para compartirlo (y aunque alguien me explique como compilar WYZ player, creo que tiene mucho mas mérito para mi, lo tomo como desafio propio).
No es la primera vez que me sucede que alguna rutina no me funciona. Puntualmente en este TOPIC les dejare' las que mas me dieron problema y no entiendo donde esta mi error.
Este "retazo" de rutina funciona con una doble tabla ascii alojada en memoria (50000) brindando 64 columnas a imprimir, para aprovechar mas pantalla. (si, ya se que en LIBRARY del compilador tengo programita que imprime en 64 col, que tampoco se como se usa, pero como dije, a mi me gusta el desafio: "hazlo tu mismo"... tambien se que esta' es bastante precaria a lo basic espectrumero, pero para mejorarla, necesito primero que nada que funcione)
Code: 9550 '------------------------------
'| IMPRIME PATTERN |
'------------------------------
PAUSE 0
BRIGHT 0
FOR f= 0 TO 15
PAPER 7
IF f=0 OR f=4 OR f=8 OR f=12 OR f=16 THEN
PAPER 3
END IF
LET fil = 8 + f
LET col = 1
LET numero = f
LET decimales = 2
GOSUB 9605
NEXT f
STOP
9605 '------------------------------------------------
'\ /
' | INPRESION DE NUMEROS EN 64 COLUMNAS |
'/ \
'------------------------------------------------
'enviar a esta sub rutina:
' fil = fila
' col = columna
' numero
' decimales = 1-unidades
' 2-decenas
' 3-centenas
' 4-mil
' 5-decenas de mil
9606 LET X$=STR$ (numero)
9607 IF decimales > LEN X$ THEN
LET X$="0"+X$
GOTO 9607
END IF
FOR z=0 TO LEN X$ STEP 2
POKE 23607,194
POKE 23606,80
PRINT AT fil,col+(z/2); X$(z)
IF z+1 <= LEN X$ THEN
POKE 23607,197
POKE 23606,80
PRINT AT fil,col+(z/2) ; OVER 1 ; X$(z+1)
END IF
IF z+col > 31 THEN
LET col = 0
LET fil = fil + 1
END IF
NEXT z
POKE 23606,0
POKE 23607,60
RETURN
Aqui les dejo el el .z80 en spectrum basic, el cual funciona a la perfeccion
http://www.mediafire.com/?e1331ilv7wa7k42
el siguiente es el archivo .TAP generado por el compilador del codigo escrito arriba (se resetea)
http://www.mediafire.com/?nubshu8qjaj1kwa
...y el .BIN que debe cargarse en la direccion 50000 con los graficos
http://www.mediafire.com/?fwar9f2ly17hinm
Gracias Boriel por devolverme a la vida, pues programar despierta en mi energias como solo la musica de BACH lo hace; gracias a todos, espero respuestas
Posts: 1,838
Threads: 56
Joined: Aug 2019
Reputation:
25
Google translate (Spanish -> English)
Hello everyone, thank you for this forum. Sorry for writing in Spanish, try to 'translate my text with the Google translator but confuses more than it explains.
I tell them that I am creating a TRACKER for AY 3-8912 with zx boriel purely basic, to make music and FX to my games, of course also to share (and even someone explain how to compile WYZ player, I think it has much more worthwhile for me, I take it as a challenge of its own).
Not the first time I happen to be a routine does not work. Specifically in this TOPIC fails them 'which gave me more problems and do not understand where my mistake.
This "patch" routine works with double memory housed in ascii table (50000) providing 64 columns to print to take advantage of more screen. (Yes, I know that I have LIBRARY compiler software that prints in 64 cabbage, also not as used, but as I said, I like the challenge, "do it yourself" ... I also know that this' is precarious to espectrumero basic, but to improve it, I need first of all to work)
Code: 9550 '------------------------------
'| PRINT PATTERN |
'------------------------------
PAUSE 0
BRIGHT 0
FOR f = 0 TO 15
PAPER 7
IF f = f = 0 OR 4 OR 8 OR f = f = 12 f = 16 THEN OR
PAPER 3
END IF
LET fil = 8 + f
Let al = 1
LET number = f
LET decimal = 2
GOSUB 9605
NEXT f
STOP
9605 '------------------------------------------------
'\ /
'| INPRESION NUMBERS IN COLUMNS 64 |
'/ \
'------------------------------------------------
'Submit to this sub routine:
'Fil = row
'Col = column
'Number
'= 1-decimal units
'2-tens
'3-hundred
'4-mil
'5-tens of thousand
9606 LET X $ = STR $ (number)
IF decimal 9607> X THEN LEN
LET X $ = "0" + X $
GOTO 9607
END IF
FOR z = 0 TO LEN X STEP 2
POKE 23607.194
POKE 23606.80
PRINT AT filter, col + (z / 2) X (z)
IF z +1 <= LEN X THEN
POKE 23607.197
POKE 23606.80
PRINT AT filter, col + (z / 2), OVER 1, X (z +1)
END IF
IF z + col> 31 THEN
Let col = 0
LET fil = fil + 1
END IF
NEXT z
POKE 23606.0
POKE 23607.60
RETURN
Here I leave the the. Z80 in basic spectrum, which works to perfection
http://www.mediafire.com/?e1331ilv7wa7k42
The following is the. TAP generated by the compiler of the code written above (reset)
http://www.mediafire.com/?nubshu8qjaj1kwa
... And the. BIN to be loaded into the address 50000 with graphics
http://www.mediafire.com/?fwar9f2ly17hinm
Thanks for giving Boriel to life, because my energies awake schedule as only Bach's music does, thanks everyone, I hope answers
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
@Boriel: Please copy the sources next time directly without using a translator.
Code: IF f = f = 0 OR 4 OR 8 OR f = f = 12 f = 16 THEN OR
Code: IF z +1 <= LEN X THEN
Are simply awfuly translated automaticaly.
About the solution:
Code: FOR z=0 TO LEN X$ STEP 2
should be changed to:
Code: FOR z=0 TO LEN(X$)-1 STEP 2
And how about changing:
Code: 9607 IF decimales > LEN X$ THEN
LET X$="0"+X$
GOTO 9607
END IF
to cleaner:
Code: while LEN(X$)<decimales
X$="0"+X$
end while
???
Posts: 8
Threads: 1
Joined: Jul 2012
Reputation:
0
Copio el codigo entero nuevamente, porque me equivoque al copiarlo en este if
I copy the entire code again, because I'm wrong to copy this if
Code: IF f=0 OR f=4 OR f=8 OR f=12 OR f=16 THEN
CODE:
Code: 9550 '+-----------------------------+
'| IMPRIME PATTERN |
'+-----------------------------+
PAUSE 0 ' load here .BIN at address 50000
BRIGHT 0
FOR f= 0 TO 15
PAPER 7
IF f=0 OR f=4 OR f=8 OR f=12 OR f=16 THEN
PAPER 3
END IF
LET fil = 8 + f
LET col = 1
LET numero = f
LET decimales = 2
GOSUB 9605
NEXT f
STOP
9605'----------------------------------------------------------------
'\ /
' | INPRESION DE NUMEROS EN 64 COLUMNAS |
'/ \
'----------------------------------------------------------------
'enviar a esta sub rutina:
' fil = fila
' col = columna
' numero
' decimales = 1-unidades
' 2-decenas
' 3-centenas
' 4-mil
' 5-decenas de mil
9606 LET X$=STR$ (numero)
9607 while LEN(X$)<decimales
X$="0"+X$
end while
FOR z=0 TO LEN(X$)-1 STEP 2
POKE 23607,194
POKE 23606,80
PRINT AT fil,col+(z/2); X$(z)
IF z+1 <= LEN X$ THEN
POKE 23607,197
POKE 23606,80
PRINT AT fil,col+(z/2) ; OVER 1 ; X$(z+1)
END IF
IF z+col > 31 THEN
LET col = 0
LET fil = fil + 1
END IF
NEXT z
POKE 23606,0
POKE 23607,60
OVER 0
RETURN
Posts: 8
Threads: 1
Joined: Jul 2012
Reputation:
0
Excelente LCD, hice los cambios que me indicaste y AHORA FUNCIONA.
Pero me gustaria saber la razon por la cual mi codigo no funciona (ese simple IF THEN con su etiqueta). ???
Yo utilizo mucho este tipo de recursos. Tendria que ver o al menos saber los tipos de rutina que el compilador no admite. por lo pronto les mostrare los que no me funcionaron...
Excellent LCD, I made the changes you indicated and NOW WORKS.
But I would like to know the reason why my code does not work (that simple IF THEN with its label). ???
I use a lot of these resources. I would have to see or at least know the routine types that the compiler does not support. for now I'll show those that did not work ...
GRACIAS !!
THANKS !!!
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
the IF ... THEN was only a cosmetical change. The other change was to reduce the readed out string by one.
The reason is that the index of variables (arrays and strings) in ZXBC starts with 0, not with 1. This is not a bug but a great feature. If you set the String base to 1 with compiler option --string-base=1, it would work as expected anyway with your posted code too.
Posts: 1,838
Threads: 56
Joined: Aug 2019
Reputation:
25
@tachuelita, te traduzco lo que dice @LCD:
ZX BASIC usa la numeración 0..n-1 para las cadenas. O sea, la primera letra de un String A$ sería A$(0), mientras que en el BASIC original del Spectrum es A$(1). Esto se hace por rendimiento. Pero puedes hacer que empiecen en 1, usando el parámetro --string-base=1. Para arrays sucede lo mismo, y puedes usar --array-base=1 para que empiecen en 1, como en el Sinclair BASIC.
También ten en cuenta que cuando ZX BASIC evalúa una condición booleana en un IF, el resultado puede ser 0 (False) o <>0 (True). En el BASIC original de Sinclair siempre era 0 ó 1, aquí no, porque esto da más velocidad. No obstante, puedes forzar que siempre sean 0 ó 1, usando el flag de compilación --strict-bool a costa de un pequeño (mínimo) impacto en el rendimiento.
Por último, si quieres despreocuparte de todo esto, puedes usar el flag --spectrum que activa todo lo de arriba a la vez para mayor compatibilidad.
Posts: 8
Threads: 1
Joined: Jul 2012
Reputation:
0
Right, I don't know the compiler option --string-base=1 ... How do you apply?
Now understand that my mistake was not having subtracted 1 to index of (x$). that's right?
Anyway, I have to get used to start with zero index of the strings. I guess it has its advantages.
Then, still posing routines that are not properly compiled.
The next routine, try to copy a movie of frames at ATTR address on the screen.
But The variable 'ymalo' ( " y " coordinate) does not work because it always stays at 0. i dont know why  :
Code: '-----------------------------------------
' EXPLOSION (prueba)
'
' cargar explosionATTR.bin en 62000
'-----------------------------------------
600 LET ymalo=10 ' IT"S =10 NOT =0 !!!!@#$^& GRRRR
LET xmalo=15
3000 BORDER 0
CLS
LET expd=62000
LET pijota=22528
3010 '----- movie -------
3059 FOR d=(0+ymalo) to (9+ymalo)
3060 FOR q=(0+xmalo) to (6+xmalo)
LET cod=pijota+(32*d)+q
LET codi= PEEK expd
IF cod > 22528 AND cod < 23296 THEN
POKE cod,codi
END IF
3085 LET expd=expd+1
3086 NEXT q
3088 NEXT d
3090 IF expd > 63050 THEN
GOTO 3000
END IF
3100 GOTO 3010
the corresponding compiled file:
http://www.mediafire.com/?nl20ws5g09xhgh9
in this case I don't need upload the file attributes, because you can see the attr-movie-frames like a black window
GRACIAS NUEVAMENTE!!! (me esta gustando esto de escribir en ingles, solo que no se si es la sintaxis correcta)
Posts: 8
Threads: 1
Joined: Jul 2012
Reputation:
0
boriel Wrote:@tachuelita, te traduzco lo que dice @LCD:
ZX BASIC usa la numeración 0..n-1 para las cadenas. O sea, la primera letra de un String A$ sería A$(0), mientras que en el BASIC original del Spectrum es A$(1). Esto se hace por rendimiento. Pero puedes hacer que empiecen en 1, usando el parámetro --string-base=1. Para arrays sucede lo mismo, y puedes usar --array-base=1 para que empiecen en 1, como en el Sinclair BASIC.
Gracias por traducir, me queda aun mas claro. --array-base=1 se coloca en el principio como (por ej) #include ?
Quote:También ten en cuenta que cuando ZX BASIC evalúa una condición booleana en un IF, el resultado puede ser 0 (False) o <>0 (True). En el BASIC original de Sinclair siempre era 0 ó 1, aquí no, porque esto da más velocidad. No obstante, puedes forzar que siempre sean 0 ó 1, usando el flag de compilación --strict-bool a costa de un pequeño (mínimo) impacto en el rendimiento.
No se lo que es una condición booleana, pero mas o menos me hago una idea. Me gustaria saber exactamente como funciona.
Principalmente me gustaria saber como se programan en ZX BASIC las rutinas del Sinclair Basic, las cuales me llueven del mas alla'.
Mas que me interesa optimizar el rendimiento, quiero meterme de lleno en ello.
Estoy seguro que estoy desperdiciando un 60% o mas de los recursos de tu compilador.
Quote:Por último, si quieres despreocuparte de todo esto, puedes usar el flag --spectrum que activa todo lo de arriba a la vez para mayor compatibilidad.
bueno, tambien me interesa saber como activo este flag.
Posts: 615
Threads: 49
Joined: Feb 2009
Reputation:
2
tachuelita Wrote:Right, I don't know the compiler option --string-base=1 ... How do you apply?
Now understand that my mistake was not having subtracted 1 to index of (x$). that's right?
Anyway, I have to get used to start with zero index of the strings. I guess it has its advantages.
Then, still posing routines that are not properly compiled.
The next routine, try to copy a movie of frames at ATTR address on the screen.
But The variable 'ymalo' ( " y " coordinate) does not work because it always stays at 0. i dont know why :
Code: '-----------------------------------------
' EXPLOSION (prueba)
'
' cargar explosionATTR.bin en 62000
'-----------------------------------------
600 LET ymalo=10 ' IT"S =10 NOT =0 !!!!@#$^& GRRRR
LET xmalo=15
3000 BORDER 0
CLS
LET expd=62000
LET pijota=22528
3010 '----- movie -------
3059 FOR d=(0+ymalo) to (9+ymalo)
3060 FOR q=(0+xmalo) to (6+xmalo)
LET cod=pijota+(32*d)+q
LET codi= PEEK expd
IF cod > 22528 AND cod < 23296 THEN
POKE cod,codi
END IF
3085 LET expd=expd+1
3086 NEXT q
3088 NEXT d
3090 IF expd > 63050 THEN
GOTO 3000
END IF
3100 GOTO 3010
the corresponding compiled file:
http://www.mediafire.com/?nl20ws5g09xhgh9
in this case I don't need upload the file attributes, because you can see the attr-movie-frames like a black window
GRACIAS NUEVAMENTE!!! (me esta gustando esto de escribir en ingles, solo que no se si es la sintaxis correcta)
To apply the compiler options, just call the compiler with this option...
Code: zxb.exe "D:\temp.bas" -S 24200 -t "D:\output.tap" --string-base=1
Your new problem lies in missing variable declaration. Add this at beginn:
Code: dim ymalo,xmalo,d,q,expd,pijota,codi,cod as Uinteger
This declares all your variables as Uinteger. You should allways declare your variables, but the line numbers are not needed.
Posts: 8
Threads: 1
Joined: Jul 2012
Reputation:
0
Bien, gracias @LCD. Ahora no solo funciona este codigo, sino que gracias a: Code: dim x , y , x , blablabla as uinteger
(declarar las variables como enteros) logre hacer funcionar cerca de 6 rutinas que no estaban trabajando
Aqui dejo mi codigo Code: '-----------------------------------------
' EXPLOSION (prueba)
'
' cargar explosionATTR.bin en 62000
'-----------------------------------------
dim ymalo,xmalo,d,q,expd,pijota,codi,cod as Uinteger
600 LET ymalo=130
LET xmalo=140
3000 BORDER 0
CLS
LET expd=62000
LET pijota=22528
3010 '
FOR d=(0+ymalo) to (9+ymalo)
3060 FOR q=(0+xmalo) to (6+xmalo)
LET cod=pijota+(32*(d-128))+(q-128)
LET codi= PEEK expd
IF d > 127 AND d < 152 AND q > 127 AND q < 160 THEN
POKE cod,codi
END IF
3085 LET expd=expd+1
3086 NEXT q
3088 NEXT d
LET X$=INKEY$
IF X$="q" AND ymalo > 118 THEN
IF ymalo >118 THEN
PRINT AT ymalo-119,xmalo-128;" "
END IF
LET ymalo=ymalo-1
END IF
IF X$="a" AND ymalo < 152 THEN
IF ymalo < 152 THEN
PRINT AT ymalo-128,xmalo-128;" "
END IF
LET ymalo=ymalo+1
END IF
IF X$="o" AND xmalo > 120 THEN
IF xmalo < 154 THEN
FOR d = 0 to 9
IF ymalo +d >127 AND ymalo +d < 152 THEN
PRINT AT ymalo+d-128,xmalo+6-128;" "
END IF
NEXT d
END IF
LET xmalo=xmalo-1
END IF
IF X$="p" AND xmalo < 160 THEN
IF xmalo > 127 THEN
FOR d = 0 to 9
IF ymalo +d >127 AND ymalo +d < 152 THEN
PRINT AT ymalo+d-128,xmalo-128;" "
END IF
NEXT d
END IF
LET xmalo=xmalo+1
END IF
3099 IF expd > 63050 THEN
GOTO 3000
END IF
3100 GOTO 3010
...y u respectivo archivo: http://www.mediafire.com/?zzjclem28762neq
la pelicula se puede mover con las teclas "o","p","q"."a"
MUY AGRADECIDO SI ALGUIEN ME PUEDE CORREGIR EN EL ANTERIOR PARA OPTIMIZAR RECURSOS.
Valga la redundancia, ya no tengo numeros negativos definiendo las variables como enteros, por lo que me vi obligado a trabajar con numeros altos y luego restar en el momento de imprimir: IF ymalo +d >127... PRINT AT ymalo+d-128,xmalo-128...
- Esto hace que me surja la siguiente pregunta: como hago para utilizar numeros negativos (y que me funcione el codigo)??
Tambien necesito saber como hago para utilizar los numeros que estan despues de la coma en una variable, por ej: LET a= a + 0.02
- Como hago para que una variable soporte este tipo de valores?
- Como hago para hacer etiquetas con nombres para las SUB-rutinas asi no depender del engorroso numero de linea del spectrum basic?
-Hay alguna forma de PGINAR EN 128K desde el ZX BORIEL sin tener que recurrir al assembler? las paginaciones tienen que ser siempre de a 16kb? o puedo paginar en la direccion de memoria que se me antoje y con una longitud de 192bytes por ej?
Posts: 8
Threads: 1
Joined: Jul 2012
Reputation:
0
PD: una pequenia "DEMO" funcionando (en paniales) de mi TT (TachTracker):
http://www.mediafire.com/?238ea36a8pfg7uf
keys:
H = UP
N = DOWN
B = LEFT
M = RIGHT
A = OCTAVA UP
Z = OCTAVA DOWN
OCTAVA 8 only in CH1= DRUMS (like a general midi keyboard: Q=Kick, W=Snare, 7=HiHat Close, 6=HiHat Foot. estos 4 por ahora)
S = TEMPO UP
X = TEMPO DOWN
D = SELECT HIGHER PATTERN
C = SELECT LOWER PATTERN
F = SLIDE OFF, SLIDE UP 1,2,3,4 SEMITONES
V = SLIDE OFF, SLIDE DOWN 1,2,3,4 SEMITONES
KEYBOARD:
2 3 5 6 7 9 0
q w e r t y u i o p
4 = CLEAN
8 = MUTE
L = REFRESH PRINT PATTERN
SPACE = PLAY
J = STOP
K = EDIT PATTERN SECUENCE (UP,DOWN=INC,DEC / LT,RT=MOVE / J = RETURN)
1 = RETURN TO BASIC
Esta tiene cargada unos 4 de patterns de prueba, luego subo una version vacia.
Si a alguien le parece que puede ser interesante hago un nuevo topic, subo el codigo de este TachTracker y el codigo TachPlayer a puro ZXBORIEL-BASIC, para poder utilizarlo. Yo ya pude incorporar musica en mi juego lo cual me tiene muy contento
Hay cosas que tengo que corregir, por ejemplo necesito mejorar la rutina que hace los slides la cual me roba mas procesador de lo deseado, incluir mas sonidos de percusion y arreglar los ya existentes. Tambien incluir efectos de vibrato, acordes, (editor de instrumentos? seria muy hambicioso pero vale la pena para un futuro) etc...
PERO POR SOBRETODO NECESITA UNA RUTINA DE IMPRESION DE PATTERN QUE SEA SUPER RAPIDA. PORQUE LA QUE TIENE ES MUUUUUUUUUUUY LENTA.
Enjoy it!
Posts: 1,838
Threads: 56
Joined: Aug 2019
Reputation:
25
tachuelita Wrote:- Esto hace que me surja la siguiente pregunta: como hago para utilizar numeros negativos (y que me funcione el codigo)??
Spanish:
Utiliza el tipo "Integer". Todos los tipos que empiezan con el prefijo "U" son Unsigned (positivos).
Tienes la lista completa de tipos aquí:
<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Types#Integers">http://www.boriel.com/wiki/en/index.php ... s#Integers</a><!-- m -->
English:
Use the "Integer" type. Types prefixed with "U" are Unsigned (positive).
A detailed Type list is here:
<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Types#Integers">http://www.boriel.com/wiki/en/index.php ... s#Integers</a><!-- m -->
tachuelita Wrote:Tambien necesito saber como hago para utilizar los numeros que estan despues de la coma en una variable, por ej: LET a= a + 0.02
- Como hago para que una variable soporte este tipo de valores? Spanish:
Usa Fixed o Float. Float es el tipo nativo del Spectrum, y es más lento. Fixed es más rápido, pero su rango y precisión es menor:
De -32768 a +32767, aproximadamente. Además, la "resolución" de decimales es bastante buena (aproximadamente 0.0001).
Nuevamente mira la página de tipos.
English:
Use Fixed or Float. Float is the native Spectrum Float format, and it's slower. Fixed is faster, but its range and precision are not so good (it's less accurate).
It ranges from -32768 to +32767 with a precision of 0.0001 aprox.
Again, have a look at types page.
teclita Wrote:- Como hago para hacer etiquetas con nombres para las SUB-rutinas asi no depender del engorroso numero de linea del spectrum basic? Spanish:
Simplemente no uses números de linea. Puedes usar etiquetas poniendo la etiqueta seguida de dos puntos.
English:
Simply don't use line numbers. Use labels: just an identifier followed by a colon.
Posts: 806
Threads: 135
Joined: Apr 2009
Reputation:
5
You might also want to look at tutorials:
<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Tutorials">http://www.boriel.com/wiki/en/index.php ... :Tutorials</a><!-- m -->
(Google Tr
Si potrebbe anche voler guardare tutorial. (Alcuni sono in spagnolo, ma google dovrebbe tradurre gli altri).
<!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Tutorials">http://www.boriel.com/wiki/en/index.php ... :Tutorials</a><!-- m -->
Posts: 8
Threads: 1
Joined: Jul 2012
Reputation:
0
Thanks @boriel, Thanks @britlion.
Spaish:
Me han sido de absoluta utilidad sus respuestas.
Aun sigo con la duda, de como hacer para paginar trozos de ram en 128k.
Me gustaria saber si hay alguna forma de paginar desde el ZXBoriel. Y si no la hay cual es el modus operandi en assembler.
Planteo un burdo ejemplo de lo que quiero hacer, del modo en el cual programaba en mi vieja Spectrum +2 GRIS (rip):
English:
I have been absolutely useful answers.
I'm still in doubt, how do to paginate in 128k ram chips.
I would like to know if there are ways of paging from ZXBoriel. And if there is none which is the modus operandi in assembler.
I raise a crude example of what I do, the way in which programming on my old Spectrum +2 GRAY (rip):
Code: 1 REM ---- LOADER AND PAGINATE -----
10 LOAD "" CODE 27000
15 SAVE ! "SONG1" CODE 27000, 348
20 SAVE ! "SONG2" CODE 27348, 256
30 SAVE ! "SONG3" CODE 27604, 3000
40 SAVE ! "SONG4" CODE 30604, 192
99 REM ---- PAGINATE TO MAIN RAM AND PLAY ----
100 LOAD ! "SONG1" CODE 27000 : LET A=384 : GOSUB 200
102 LOAD ! "SONG2" CODE 27000 : LET A=256 : GOSUB 200
104 LOAD ! "SONG3" CODE 27000 : LET A=3000 : GOSUB 200
106 LOAD ! "SONG4" CODE 27000 : LET A=192 : GOSUB 200
108 STOP
199 REM ---- ROCK! ----
200 FOR F=27000 TO A
202 BEEP .002, PEEK F
204 NEXT F
205 PAUSE 0
206 RETURN
COMO SIEMPRE GRACIAS !!!
THANK YOU, AS ALWAYS !!!
|