W65C265SXB 'features' and questions
Posted: Wed Aug 14, 2024 12:42 pm
I'm feeling a little frustrated at the moment, so please take any rants as unintentional...
I've been trying to use one of the 265SXB boards as a floppy controller, and while I am getting some success, there also seems to be some peculiar things happening along the way. I'm hoping that the people here who are much smarter than I can give some suggestions.
When I first started, I disabled the 4 UARTs and used ports 5 and 6 as i/o pins, which gave plenty of pins to interface with the floppy cable. I connected the i/o pins straight to the cable. During testing, I noticed that the commands were not consistent, and I often saw things that I hadn't told the drive to do. A closer look showed noise on the lines, so I connected them through a couple of 74LS245 buffers. This made things better, but there is still noise on port 6 whenever a key is pressed on the host keyboard...ghost signals from the uarts perhaps.
So I changed to using ports 4 and 5 instead. This made things worse, as commands just plain don't work. Even my code doesn't seem to work anymore, which I can't explain...I'm getting caught in loops that shouldn't be able to happen (dex should eventually get to zero...)
As a final effort I turned the address and data bus off so I could use ports 0 and 1. When this is active, uploading srec data fails miserably. Also, entering data on the pc keyboard is spotty at best.
So, I'm a little frustrated, and wondering if I'm just doing things wrong. The only thing I haven't tested is to pull power from the floppy drive and ttl chips from the same one as is powering the PC and USB port that the 265SXB is connected to.
What else might be good to test here?
EDIT: I've created a repository to share the code. It has been built up over a few iterations and isn't very clean, but it should work. You can find it at https://git.cureau.dev/65C265sxb-projec ... controller
EDIT EDIT: I found a glaring bug from when I was using ports 4 and 5, so now the code is doing what it should be doing. I've moved the wires back to ports 4 and 5 and will update the code. However, pressing the reset button doesn't actually do a reset until the drive power is turned off, which is also weird behavior...
I've been trying to use one of the 265SXB boards as a floppy controller, and while I am getting some success, there also seems to be some peculiar things happening along the way. I'm hoping that the people here who are much smarter than I can give some suggestions.
When I first started, I disabled the 4 UARTs and used ports 5 and 6 as i/o pins, which gave plenty of pins to interface with the floppy cable. I connected the i/o pins straight to the cable. During testing, I noticed that the commands were not consistent, and I often saw things that I hadn't told the drive to do. A closer look showed noise on the lines, so I connected them through a couple of 74LS245 buffers. This made things better, but there is still noise on port 6 whenever a key is pressed on the host keyboard...ghost signals from the uarts perhaps.
So I changed to using ports 4 and 5 instead. This made things worse, as commands just plain don't work. Even my code doesn't seem to work anymore, which I can't explain...I'm getting caught in loops that shouldn't be able to happen (dex should eventually get to zero...)
As a final effort I turned the address and data bus off so I could use ports 0 and 1. When this is active, uploading srec data fails miserably. Also, entering data on the pc keyboard is spotty at best.
So, I'm a little frustrated, and wondering if I'm just doing things wrong. The only thing I haven't tested is to pull power from the floppy drive and ttl chips from the same one as is powering the PC and USB port that the 265SXB is connected to.
What else might be good to test here?
EDIT: I've created a repository to share the code. It has been built up over a few iterations and isn't very clean, but it should work. You can find it at https://git.cureau.dev/65C265sxb-projec ... controller
EDIT EDIT: I found a glaring bug from when I was using ports 4 and 5, so now the code is doing what it should be doing. I've moved the wires back to ports 4 and 5 and will update the code. However, pressing the reset button doesn't actually do a reset until the drive power is turned off, which is also weird behavior...