Loading INVADERZ fails to load graphics?

Chat about anything CX16 related that doesn't fit elsewhere
Post Reply
Kostas
Posts: 3
Joined: Sat Dec 05, 2020 7:10 pm

Loading INVADERZ fails to load graphics?

Post by Kostas »


Hi all, I am trying the emulator and I've downloaded a demo and also the game INVADERZ. I've mounted the empty img file via

sudo losetup -P /dev/loop210 images/sdcard.img

sudo mount /dev/loop210p1 /mnt/sdcard

and copied the demo & INVADERZ files to /mnt/sdcard. Then unmounted the sdcard:

sudo umount /mnt/sdcard

sudo losetup -d /dev/loop210

Started the emulator:

x16emu -scale 3 -keymap en-gb -sdcard images/sdcard.img 

Then loaded the INVADERZ.PRG and run it. It starts, does some random initialisation graphics but then I get a blank screen. My guess is that it can't load the files?

 

ls /mnt/sdcard/

BG-L1.BIN  BG-L3.BIN  BG-L5.BIN  BG-L7.BIN   BG-TITLE.BIN  ENEMY2.BIN  ENEMY4.BIN  ENEMY6.BIN  EXPLODE.BIN   LASER.BIN   PAL-L2.BIN  PAL-L4.BIN  PAL-L6.BIN  PAL-SKY.BIN    PHASER.BIN  SHIELD050.BIN  STDPAL.BIN

BG-L2.BIN  BG-L4.BIN  BG-L6.BIN  BG-SKY.BIN  ENEMY1.BIN    ENEMY3.BIN  ENEMY5.BIN  ENEMY7.BIN  INVADERZ.PRG  PAL-L1.BIN  PAL-L3.BIN  PAL-L5.BIN  PAL-L7.BIN  PAL-TITLE.BIN  PLAYER.BIN  SHIELD100.BIN  X16PAL.BIN

 

Any ideas what may be wrong?

User avatar
AndyMt
Posts: 326
Joined: Sun Jun 21, 2020 3:02 pm
Location: Switzerland

Loading INVADERZ fails to load graphics?

Post by AndyMt »


I must admit - I've never tried it with a sdcard during development. I always start the prg file directly via command line.

And - I develop my games with cc65 on Windows.

What you could try is to rename all files to lower case. Windows does't care, but Linux does.

Kostas
Posts: 3
Joined: Sat Dec 05, 2020 7:10 pm

Loading INVADERZ fails to load graphics?

Post by Kostas »



17 minutes ago, AndyMt said:




I must admit - I've never tried it with a sdcard during development. I always start the prg file directly via command line.



And - I develop my games with cc65 on Windows.



What you could try is to rename all files to lower case. Windows does't care, but Linux does.



Hi Andy, having lower case letters show like petscii chars (lines etc) when I do DOS"$"

User avatar
AndyMt
Posts: 326
Joined: Sun Jun 21, 2020 3:02 pm
Location: Switzerland

Loading INVADERZ fails to load graphics?

Post by AndyMt »


Ok, then I'm out of ideas atm. I have to try that myself first. Until now I had no need to run it from sdcard. But of course this will be the way the real hardware is going to do it, so I will look into it at some point.

Until then simply run the prg directly via the -prg option.

I added instructions to the download section.

User avatar
desertfish
Posts: 1098
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Loading INVADERZ fails to load graphics?

Post by desertfish »


I think you're experiencing the problem I ran into recently as well:


 

Basically, file loading from sd card images is broken at the moment

Kostas
Posts: 3
Joined: Sat Dec 05, 2020 7:10 pm

Loading INVADERZ fails to load graphics?

Post by Kostas »



11 hours ago, AndyMt said:




Ok, then I'm out of ideas atm. I have to try that myself first. Until now I had no need to run it from sdcard. But of course this will be the way the real hardware is going to do it, so I will look into it at some point.



Until then simply run the prg directly via the -prg option.



I added instructions to the download section.



Ah ok thanks, I managed to run it via -prg. I didn't know -prg works with the local filesystem!

Ender
Posts: 220
Joined: Sat May 09, 2020 9:32 pm

Loading INVADERZ fails to load graphics?

Post by Ender »



6 hours ago, desertfish said:




I think you're experiencing the problem I ran into recently as well:



Right. Currently the kernal will always just use the first two bytes of a file as the address to load to, ignoring whatever is being passed in in X and Y, i.e. it's inadvertently throwing away the secondary address being passed in.  So if Invaderz is calling the kernal load function to try to load the bin files into specific addresses, which it almost certainly is, then it wouldn't work.  One way around this would be to set the first two bytes of the bin files to contain the address to load into, and load that way.

Post Reply