Autor
| How do I edit a .GEN file with GEN80
| liquid msx friend Mensajes: 11 | Publicado: Marzo 18 2004, 09:15   | Hi,
I want to modify some parameters in a .GEN file, and then make a .COM file.
I have the program GEN80.COM, but I don't know how to open the source listing.
Could anybody help me out?
| | turbor msx freak Mensajes: 175 | Publicado: Marzo 18 2004, 10:41   | You use any text editor to alter the source code.
The gen80.com is only the compiler, and contains no text editor.
| | liquid msx friend Mensajes: 11 | Publicado: Marzo 18 2004, 10:59   | It looks like there are some errors in the source code...
When I type: gen80 scroll.gen
A003 22 TEXTE DEFB "THIS IS THE SCROLL TEXT"
Bad expression in A:SCROLL.GEN
A003 23 DEFB " "
Bad expression in A:SCROLL.GEN
Pass 01 errors: 02
What does this mean?
| | ro msx guru Mensajes: 2329 | Publicado: Marzo 18 2004, 11:03   | some parsers only expect DB instead of DEFB
try that.. I dunno here just guessing
| | Arjan msx addict Mensajes: 466 | Publicado: Marzo 18 2004, 12:16   | GEN80 supports both the DB and DEFB notation, so that's not the problem. It's more likely your sourcefiles use UNIX-line endings (LF), instead of DOS-style line endings (CR/LF). GEN80 only supports the latter.
| | liquid msx friend Mensajes: 11 | Publicado: Marzo 18 2004, 12:21   | The problem is solved.
First I used GEN80 v1.06 and now I used v2.04.
Now it seems to work.
Thanks
| | ro msx guru Mensajes: 2329 | Publicado: Marzo 18 2004, 12:38   | mabay GEN also needs a ":" char behind a label defeniion??
| | liquid msx friend Mensajes: 11 | Publicado: Marzo 18 2004, 12:56   | Another question:
I have the screen 5 scroll routine working, but I have also loaded the FST replay routine.
Now the scroll routine is dubble speeding my music routine.
Anyone knows how to solve this?
Thanks.
| | ro msx guru Mensajes: 2329 | Publicado: Marzo 18 2004, 13:01   | Liquid.. you don't expect us to solve your problem without posting the source here eh?
Well, obvious your FST replayer gets called twice (probably 2 ints??) per cycle
good luck.
oh, why use FST... you could sum up some faster replayers (read better programs)
| | liquid msx friend Mensajes: 11 | Publicado: Marzo 18 2004, 13:13   | Sorry about that.
Here is the source code:
DEFB #FE
DEFW START
DEFW FINISH
DEFW START
ORG #A000
START: JP DEBUT
TEXTE: DEFB " SCROLL TEXT "
DEFB " "
DEFB "*"
SPEED: DEFB 2
Y_POSITION: DEFB 180
DEBUT:
LD A,(SPEED)
CP 2
CALL Z,SPEED2
CALL MODPOS
HSCROLL:
DI
LD IY,TEXTE
SCROLL_STEP:
LD IX,SCROLLCOP
LD A,(IY+0)
CP "*"
JP Z,HSCROLL
LIGNE4:
CP "Q"
JR C,LIGNE3
LD (IX+2),48
LD C,81
JP CALCUL
LIGNE3:
CP "A"
JR C,LIGNE2
LD (IX+2),32
LD C,65
JP CALCUL
LIGNE2:
CP "0"
JR C,LIGNE1
LD (IX+2),16
LD C,48
JP CALCUL
LIGNE1:
LD C,32
LD (IX+2),0
CALCUL:
SUB C
CALL MULT
LD A,L
ADDA:
LD IX,SCROLLCOP
LD (IX),A
ADD A,16
LD E,A
LD A,(IX)
SCROLLB:
CP E
JP Z,SUITE
LD HL,SCROLLCOP
CALL XMMM
LD HL,DECALCOP
CALL XMMM
CALL TESTSPACE
CP 0
RET Z
PUSH DE
PUSH IY
CALL #FD9F
POP IY
POP DE
LD A,(Y_POSITION)
CP 6
JP C,SUIT
SUB 5
SUIT:
CALL INTERUPT
LD IX,SCROLLCOP
LD A,(SPEED)
LD B,A
LD A,(IX)
ADD A,B
LD (IX),A
JP SCROLLB
SUITE:
INC IY
JP SCROLL_STEP
MULT:
LD H,A
LD L,0
LD E,16
LD D,0
LD B,8
MULTBO:
ADD HL,HL
JR NC,SUITEM
ADD HL,DE
SUITEM:
DJNZ MULTBO
RET
INTERUPT:
OUT (#99),A
LD A,#93
OUT (#99),A
LD A,1
OUT (#99),A
LD A,#8F
OUT (#99),A
WAITINT:
IN A,(#99)
AND 1
JR Z,WAITINT
SUB A
OUT (#99),A
LD A,#8F
OUT (#99),A
PUSH BC
LD B,4
WAIT4C:
DJNZ WAIT4C
POP BC
RET
XMMM:
TST:
LD D,2
CALL BITCE
RRCA
JR C,TST
RLCA
LD B,15
LD A,32
OUT (#99),A
LD A,#91
OUT (#99),A
LD C,#9B
OTIR
RET
BITCE:
LD A,D
OUT (#99),A
LD A,#8F
OUT (#99),A
IN A,(#99)
PUSH AF
XOR A
OUT (#99),A
LD A,#8F
OUT (#99),A
POP AF
RET
TESTSPACE:
IN A,(#AA)
AND %11110000
ADD A,8
OUT (#AA),A
IN A,(#A9)
AND 1
RET
SPEED2:
LD IX,DECALCOP
LD A,2
LD (IX+4),A
LD IX,SCROLLCOP
LD (IX+8),A
RET
MODPOS:
LD A,(Y_POSITION)
LD IX,DECALCOP
LD (IX+2),A
LD (IX+6),A
LD IX,SCROLLCOP
LD (IX+6),A
RET
DECALCOP: DEFB 4,0,100,0,0,0,100,0,252,0,16,0,0,0,#D0
SCROLLCOP: DEFB 8,0,0,1,252,0,100,0,4,0,16,0,0,0,#D0
COMPT0: DEFB 0
COMPT1: DEFB 0
COMPT2: DEFB 0
ADR0 : DEFW 0
ADR1 : DEFW 0
ADR2 : DEFW 0
FINISH:
| | ro msx guru Mensajes: 2329 | Publicado: Marzo 18 2004, 13:22   | Ok. This is just the scroll source. I should see the main source where you init all stuff (incl FST replayer)
I quess you're putting the scroll on int.
You also put FST on int.
In the scroll routine you do a call to #fd9f, which is probably the old int.
I dunno where you put FST and Scroll on int. I mean do you add your code on ISR (#38) or on #fd9f / #fd9a ??
| | liquid msx friend Mensajes: 11 | Publicado: Marzo 18 2004, 13:28   | I've loaded it from Basic.
Like:
bload"musicroutine"
bload"music":bload"drumkit"
bload"scroll",r
I'm not very familiar with ASM, so my intention was to run all from a basic program
| | ro msx guru Mensajes: 2329 | Publicado: Marzo 18 2004, 13:50   | Ok. but SOMEWHERE you have to add the scroll and FST routine on the ISR
unless..... you have the Scroll in a main routine (non timed) which loops all the time (I've to check the posted source a bit better...) If you have I would defenitally remove the CALL 0xFD9F in the scroll routine 'cuz FST mounts it's replayer on the same address. So the routine would be called twice.
--edit--
Yup, looks like you are polling the int instead of mounting the scroll on ISR.
So the solution i mentioned above would solve your problem (remove the call #fd9f in your scrolling source)
| | liquid msx friend Mensajes: 11 | Publicado: Marzo 18 2004, 14:11   | I removed the CALL 0xFD9F from the scroll source.
Now my music won't start playing.
This is my basic file:
SCREEN5,0
SETPAGE0,1:BLOAD"FONT.GE5",S:COLOR=RESTORE
BLOAD"MUSIC_REPLAY_ROUTINE"
DEFUSR0=&HD000  EFUSR1=&HD003
OUT&HFE,1:BLOAD"MUSIC.MUS":A=USR(0)
BLOAD"DRUMKIT.SM1":A=USR1(0)
BLOAD"DRUMKIT.SM2":A=USR1(0)
BLOAD"SCROLL.COM"
DEFUSR2=&HD006:A=USR2(0)
DEFUSR3=&HA000:A=USR3(0)
Hopes this is clear enough
| | ro msx guru Mensajes: 2329 | Publicado: Marzo 18 2004, 15:48   | hmm, strange.
When booting and running FST (a=usr command) FST replayer will be nested on FD9F.
Next you'll start the scroll routine which only POLLS the interrupt (as far as I can see) and doesn't change FD9F. The ISR should still be enable. (right?)
So if you remove the call#fd9f no music, but if you don't remove you'll end up having dubble speed? ah, might as well be that the ISR polling results in 2 ints in 1 cycle (LNI, MIDI whatever) I'm a bit guessing here since I don't really checked your source in detail.. just a quick glance.
Is this all cut'n paste stuff Liquid?
| |
| |
| |