Comments (3)
-- Quote: Drenn, 2013-02-23, http://gbatemp.net/threads/gameyob-a-gameboy-emulator-for-ds.343407/page-3#post-4563539
I was able to fix a few problems with flags, but I don't know about instructions E8 and F8. I'd better take a look at Gambatte.
-- Quote: End
from gameyob.
I've looked into Gambatte. It appears the half-carry flag is bit 4 (overflowing from 0xF into 0x10), not 12 (overflowing from 0xFFF into 0x1000).
See this code:
#define sp_plus_n(sumout) do { \
unsigned sp_plus_n_var_n; \
PC_READ(sp_plus_n_var_n); \
sp_plus_n_var_n = (sp_plus_n_var_n ^ 0x80) - 0x80; \
\
const unsigned sp_plus_n_var_sum = SP + sp_plus_n_var_n; \
CF = SP ^ sp_plus_n_var_n ^ sp_plus_n_var_sum; \
HF2 = CF << 5 & 0x200; /* this sets the half-carry flag to bit 4's value */ \
ZF = 1; \
cycleCounter += 4; \
(sumout) = sp_plus_n_var_sum & 0xFFFF; \
} while (0)
from gameyob.
I tried adapting this code, and it didn't really work. When I googled it I came up with this, blargg explaining to dwedit how E8 and F8 work. It has several differences, including that the negative and zero flags should be cleared. Also the carry flag is apparently based on the lower byte of SP added with the immediate value, considered unsigned. Maybe gambatte does this, I didn't really study all that XORing in detail. Gameyob passes the test now, but it's strange that those other differences exist since gambatte apparently passes the test too.
from gameyob.
Related Issues (20)
- About DSi scaling. HOT 1
- FPS (and time) not shown when in scaled/fullscreen mode
- Bilinear filter option request, should not hinder performance! HOT 9
- GameBoy Color infrared emulation? HOT 1
- Graphical issue with Link's Awakening DX HOT 1
- Zerd no Densetsu Fails to Boot
- Always corrupt saves HOT 4
- Quartet has graphical issues making the game unplayable
- Strange behavior between GBC and SGB modes on Pokémon RB HOT 1
- At least one recent native 2DS/3DS build? Not regular releases or any actual development, but just a single version available HOT 3
- [Enhancement] Remember last viewed folder path HOT 1
- Corrupted saves are still an issue and this project needs attention. HOT 10
- no 3DSX in latest release anymore? Why? HOT 1
- Open source license? HOT 1
- Window internal line counter not tracked independently of LY HOT 3
- Can you covert these into GameYob borders, please?
- Game custom Borders Full Screen don't work HOT 2
- Bart Simpson's Escape from Camp Deadly - game collision problem HOT 6
- DSi: Closing the lid will shutdown occasionally
- Custom color palette support
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 gameyob.