Any chance of some help with this please? To say that documentation on vlink is sparse is putting it somewhat mildly!
I've got two source files: asteroids.s and game.s
Between them I have four sections each defined with the .section assembler directive:
'CODE'
'VDATA'
'CRT0'
'SYS_VECTOR'
What I want to achieve is to have 'SYS_VECTOR' fixed at 0x7FFC since it is the jump vector table so HAS to be there or nothing will work. I would like 'CRT0' to take up the space immediately before that so all of my implemented BIOS functions (if you will) are at the top of ROM space, VDATA can be wherever, it doesn't matter, but let's say 0x7F00 and 'CODE' wants to be at 0x7800 because I only want to have to burn one ROM for now (the full code space is 0x6800-0x7FFF).
For now, let's forget about wanting CRT0 to be below SYS_VECTOR dynamically and just hard code addresses, so:
CODE = 0x7800
VDATA = 0x7A00
CRT0 = 0x7F00
SYS_VECTOR = 0x7FFC
My assembler commands are:
vasm6502_std -Fvobj $SRC/crt0_asteroids.s -o $OBJ/crt0.o
vasm6502_std -Fvobj $SRC/game.s -o $OBJ/game.o
My link command is:
vlink -o035143-02.j2 -brawbin1 -Tlinker.txt $OBJ/crt0.o $OBJ/game.o
My 'linker.txt' is pure guesswork and contains:
SECTIONS
{
. = 0x7800;
CODE : { *(CODE) }
CRT0 : { *(CRT0) }
VDATA : { *(VDATA) }
. = 0x7ffc
SYS_VECTOR : { *(SYS_VECTOR) }
}
(Which OK, is even more 'put it where you like' than what I really want, but it's a start!)
After a bit of messing about with undefined symbols everything builds with no errors. BUT my ROM file '035143-02.j2' is 0 bytes!
Any ideas please?
If I just do it all as a single file with include statements then things work but that's pain in the arse enough in itself as I then have to manually keep everything in check which I'm trying to avoid. I'm trying to make things re-usable if I can.
I've got two source files: asteroids.s and game.s
Between them I have four sections each defined with the .section assembler directive:
'CODE'
'VDATA'
'CRT0'
'SYS_VECTOR'
What I want to achieve is to have 'SYS_VECTOR' fixed at 0x7FFC since it is the jump vector table so HAS to be there or nothing will work. I would like 'CRT0' to take up the space immediately before that so all of my implemented BIOS functions (if you will) are at the top of ROM space, VDATA can be wherever, it doesn't matter, but let's say 0x7F00 and 'CODE' wants to be at 0x7800 because I only want to have to burn one ROM for now (the full code space is 0x6800-0x7FFF).
For now, let's forget about wanting CRT0 to be below SYS_VECTOR dynamically and just hard code addresses, so:
CODE = 0x7800
VDATA = 0x7A00
CRT0 = 0x7F00
SYS_VECTOR = 0x7FFC
My assembler commands are:
vasm6502_std -Fvobj $SRC/crt0_asteroids.s -o $OBJ/crt0.o
vasm6502_std -Fvobj $SRC/game.s -o $OBJ/game.o
My link command is:
vlink -o035143-02.j2 -brawbin1 -Tlinker.txt $OBJ/crt0.o $OBJ/game.o
My 'linker.txt' is pure guesswork and contains:
SECTIONS
{
. = 0x7800;
CODE : { *(CODE) }
CRT0 : { *(CRT0) }
VDATA : { *(VDATA) }
. = 0x7ffc
SYS_VECTOR : { *(SYS_VECTOR) }
}
(Which OK, is even more 'put it where you like' than what I really want, but it's a start!)
After a bit of messing about with undefined symbols everything builds with no errors. BUT my ROM file '035143-02.j2' is 0 bytes!
Any ideas please?
If I just do it all as a single file with include statements then things work but that's pain in the arse enough in itself as I then have to manually keep everything in check which I'm trying to avoid. I'm trying to make things re-usable if I can.