VECX Vectrex emulator port
- Greenwire-Elektronik
- Posts: 101
- Joined: Thu Dec 04, 2014 6:31 am
Re: VECX Vectrex emulator port
Yeah, i am sorry, my bad giving you the wrong offset. I will recheck it on my vocore tomorrow.
- Pyrofer
- Posts: 61
- Joined: Tue Oct 21, 2014 11:35 am
Re: VECX Vectrex emulator port
No! I appreciate the help!
It's not the offset at all that is the issue. For some reason my code just gives 0...
I took an example that I found on the forum here for dumping out the contents of registers, it uses pretty much the exact same methods to read the data. I compiled it and it works!!!
The pin state is shown correctly. I have checked the code and it's almost letter for letter exactly the same. I have no idea why one works and one doesn't.
0x620 is the offset to contain the pin state. in the register dump code shared somewhere here viewtopic.php?f=10&t=272 and is at the bottom of page one.
That code works.
My code, with the same commands for reading the pin doesn't work. I am kerbafled.
I will report back here if I crack it.
It's not the offset at all that is the issue. For some reason my code just gives 0...
I took an example that I found on the forum here for dumping out the contents of registers, it uses pretty much the exact same methods to read the data. I compiled it and it works!!!
The pin state is shown correctly. I have checked the code and it's almost letter for letter exactly the same. I have no idea why one works and one doesn't.
0x620 is the offset to contain the pin state. in the register dump code shared somewhere here viewtopic.php?f=10&t=272 and is at the bottom of page one.
That code works.
My code, with the same commands for reading the pin doesn't work. I am kerbafled.
I will report back here if I crack it.
- Greenwire-Elektronik
- Posts: 101
- Joined: Thu Dec 04, 2014 6:31 am
Re: VECX Vectrex emulator port
Do you wanna post your code or at least the important potion? Did you accidently changed the memory pointer? Closed the memory connection? just made a wrong type conversion?
- Pyrofer
- Posts: 61
- Joined: Tue Oct 21, 2014 11:35 am
Re: VECX Vectrex emulator port
So, here's a crazy thing.
I found a bit of code right here for dumping the registers that somebody posted, it all worked.
I compiled it, ran it, got the right inputs. I could see my GPIO pin going high or low.
I copied the code, it wouldn't work in my program.
Instead, I took MY program, routine by routine and moved them into this other bit of code... It worked.
I now have a working touchscreen "paint" app. I am going to work on a calibration routine to line the touch up properly but you can do basic touch input now using the GPIO instead of the hardware SPI port which is driving the LCD.
I tidied up some code and plan to make usable libraries for different LCDs, touch etc. All going well now
NO IDEA what was causing the problem or even how I fixed it. Still, it works so that's enough.
I found a bit of code right here for dumping the registers that somebody posted, it all worked.
I compiled it, ran it, got the right inputs. I could see my GPIO pin going high or low.
I copied the code, it wouldn't work in my program.
Instead, I took MY program, routine by routine and moved them into this other bit of code... It worked.
I now have a working touchscreen "paint" app. I am going to work on a calibration routine to line the touch up properly but you can do basic touch input now using the GPIO instead of the hardware SPI port which is driving the LCD.
I tidied up some code and plan to make usable libraries for different LCDs, touch etc. All going well now
NO IDEA what was causing the problem or even how I fixed it. Still, it works so that's enough.
- Greenwire-Elektronik
- Posts: 101
- Joined: Thu Dec 04, 2014 6:31 am
Re: VECX Vectrex emulator port
Perhaps there was an hidden char somewhere in your code - you won't see it, but it might corrupt the code ...
- Pyrofer
- Posts: 61
- Joined: Tue Oct 21, 2014 11:35 am
Re: VECX Vectrex emulator port
Seems I forgot to post the results of all the work.
Here is the pretty much playable VECX at almost full speed.
https://www.youtube.com/watch?v=DilnsT59e_o
Here is the pretty much playable VECX at almost full speed.
https://www.youtube.com/watch?v=DilnsT59e_o
Who is online
Users browsing this forum: No registered users and 5 guests