Weird joystick issue with ugly fix
Posted: Tue Oct 18, 2016 9:20 pm
I coded this game for the 10 line BASIC contest. I got 5th place which I was very happy with.
http://cloud.cbm8bit.com/jim_64/10%20run10-vic%2020.prg
http://sleepingelephant.com/ipw-web/bul ... f=1&t=7911
This was my first program for the VIC-20. To read the VIC joystick port up and down, I simply PEEKed 37137. I read that you are supposed to POKE 37154 before and after the joystick read, but I didn't have room for that, and it worked without it!
During development, I used emulation and a SD2IEC on my real VIC 20. For ECCC 2016, I tried to put the game on tape. The joystick didn't work!!
Then I discovered that if I stopped the tape drive after loading and tried, but failed, to load something off the disk drive, something was reset and my simple 10 line game worked again.
So, as an ugly hack, I made a loader that asks the user to stop the tape after loading and press return which tries to LOAD"*",30, which fails and then runs the game.
http://cloud.cbm8bit.com/jim_64/10%20run%2010.t64
As you can tell, I'm not sure what is going on here. Probably something with the state of the I/O chips.
Is there a better way to reset whatever after the tape load?
http://cloud.cbm8bit.com/jim_64/10%20run10-vic%2020.prg
http://sleepingelephant.com/ipw-web/bul ... f=1&t=7911
This was my first program for the VIC-20. To read the VIC joystick port up and down, I simply PEEKed 37137. I read that you are supposed to POKE 37154 before and after the joystick read, but I didn't have room for that, and it worked without it!
During development, I used emulation and a SD2IEC on my real VIC 20. For ECCC 2016, I tried to put the game on tape. The joystick didn't work!!
Then I discovered that if I stopped the tape drive after loading and tried, but failed, to load something off the disk drive, something was reset and my simple 10 line game worked again.
So, as an ugly hack, I made a loader that asks the user to stop the tape after loading and press return which tries to LOAD"*",30, which fails and then runs the game.
http://cloud.cbm8bit.com/jim_64/10%20run%2010.t64
As you can tell, I'm not sure what is going on here. Probably something with the state of the I/O chips.
Is there a better way to reset whatever after the tape load?