| |
Oswald
Registered: Apr 2002 Posts: 5017 |
SHX/SHY
I cant seem to get them working. I'm not sure wether the value for the AND comes from the PC counter or from the destination address, anyway neither running code at $ff00 or storing to $ff00 does work. maybe vice does not support this illegal?
edit: vice 2.2 unstable, x64 on win7. |
|
... 16 posts hidden. Click here to view all posts.... |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
As far as I know SHX/SHY have been emulated correctly in Vice for a long time, including the instabilities. And yes, it's hi-byte of the destination address + 1.
The instability is only that the and'ing sometimes is skipped, so e.g. if you have shy $7e00,x and expected it be anded by $7f, it sometimes isn't anded at all. But for $fe00 there's no problem, since anding with $ff is the same as not anding. And if your values don't mind whether they are anded, e.g. if they are all $00-$7f for shy $7e00,x, there is also no difference whether the and works or not. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11108 |
"The instability is only that the and'ing sometimes is skipped"
there is another problem when indexing crosses a page boundary, then the page the value is stored might be the same as the value itself. |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Groepaz: Interesting, guess I haven't tried crossing page boundaries. |
| |
Oswald
Registered: Apr 2002 Posts: 5017 |
"it could (and should and will) once the behaviour is exactly known :)"
why isnt it known? every single transistor has been reverse engineered. visual6502 anyone ? |
| |
Ninja
Registered: Jan 2002 Posts: 404 |
It is known. I somewhere have a test-program which reliably does SHX/Y with no AND happening because it waits for the VIC to take over the bus. I intended to make that a bit more robust and write an VN article about it, but well, -EBUSY. I seem to recall that idea was later mentioned in this forum, too. |
| |
Ninja
Registered: Jan 2002 Posts: 404 |
Oh, and visual6502 won't help you since you need interaction with VIC. Note, that XL and AppleII users never noticed dropping off the AND (as far as I found out). |
| |
Frantic
Registered: Mar 2003 Posts: 1627 |
Whoever feels like it, please go ahead and write a few lines about SHX/SHY and put it in the following section of Codebase64:
http://codebase64.org/doku.php?id=base:6502_6510_coding#illegal..
:) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11108 |
"It is known. I somewhere have a test-program which reliably does SHX/Y with no AND happening because it waits for the VIC to take over the bus."
thing is that fiddling with BA does _not_ explain that behaviour in any way. so while it is known that the behaviour is somehow connected to DMA, it is not known what exactly happens =) |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Ahh, the inexplicable mysteries of the C64, isn't that what makes it magic. |
| |
Zyron
Registered: Jan 2002 Posts: 2381 |
That's where its soul is. |
Previous - 1 | 2 | 3 | 4 - Next |