Comments (3)
Hmm ok, I'm currently "mentally tuned out" from emulator coding so I don't quite remember why I coded it that way.
But you're right, this seems to be a bug (it definitely behaves differently than visual6502). Looks like this is a side effect of the code generation which assumes that the abs,X addressing mode works like in regular instructions, which doesn't seem to be the case here.
To my defense, I didn't care much about the undocumented instructions which are marked as "unstable", because I expected that such unstable instructions would never be useful in regular code anyway (different from the "stable" undocumented instructions which might be useful).
from chips.
it definitely behaves differently than visual6502
indeed, it seems in visual6502 Y influences not only the value, but also the location being written to, contrary to all documentation i've encountered.
it appears the page being written to is Y & X & (hibyte(addr)+1)
.
I didn't care much about the undocumented instructions which are marked as "unstable", because I expected that such unstable instructions would never be useful in regular code anyway
thanks, good to know. i'll let you know i f i figure out the exact algorithm matching the behaviour of visual6502.
from chips.
ok, i figured out the behaviour that makes blargg test 6 pass, as well as being seemingly identical to visual6502 remix. so maybe the behaviour isn't that unstable after all.
my code for shy is
u8 data = Y & (op.pb[1]+1);
addr = (op.pb[0] + X)&0xff;
addr |= data << 8;
CPU_WRITE_N(&data, addr, 1);
where op.bp are the bytes immediately following the opcode, so in the above example pb[0] is 0xfe and pb[1] is 2.
from chips.
Related Issues (20)
- Reminder: potential bug in m6502 for NMI detection HOT 3
- Known Issues: CPC
- Are you interested in 8086? HOT 2
- Z80 Chip doesn't handle LD A,(IX+n) correctly HOT 4
- Z80 BUSACK/BUSREQ/RESET pins HOT 2
- z80: fetch opcode timing HOT 1
- surprising behaviour of cycle-stepped z80 after PC reset HOT 2
- Z80 wait state handling incorrect? HOT 1
- m6502 doesn't clear D on BRK HOT 1
- Unable to use the space bar when there's a CPC_JOYSTICK_DIGITAL attached HOT 2
- Cycle-stepped Motorola 68K HOT 2
- m6569: c accesses half a cycle too late? HOT 2
- Caps Shift doesn't work on ZX Spectrum
- Z80: having _wait() before _mwrite(addr, data) looks incorrect. HOT 3
- Z80 XOR Malfunction HOT 12
- Glitch after snapshot save and load HOT 1
- CPC: Implement Version 3 Snapshots
- [c1541] State of 1541 emulation? HOT 1
- Please consider adding the i8259 interrupt controller HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chips.