Search found 9 matches

by Rena
Fri Apr 01, 2016 4:47 pm
Forum: GBDev
Topic: What exactly are T-states doing?
Replies: 25
Views: 12907

Re: What exactly are T-states doing?

Nice, that answers a lot of questions! One thing I've never been sure of is what actually is at FEA0-FEFF. It's only marked as "unusable" in documents, but what happens if you try to use it? Some have suggested it partially mirrors OAM. Also, is FFFF actually within HRAM or is it separate?...
by Rena
Fri Apr 01, 2016 12:46 pm
Forum: GBDev
Topic: What exactly are T-states doing?
Replies: 25
Views: 12907

Re: What exactly are T-states doing?

The Game Boy doesn't automatically push/pop when servicing an interrupt, except pushing PC (it basically forces a CALL nn). So if CB were one of the four "always 0" flags, we'd expect to see some effects in that situation: The CB prefix applies to the first instruction of the ISR (usually ...
by Rena
Fri Apr 01, 2016 11:37 am
Forum: GBDev
Topic: What exactly are T-states doing?
Replies: 25
Views: 12907

Re: What exactly are T-states doing?

Yeah, there's a lot of guesswork involved here. It's mainly just trying to come up with the most logical design that fits what we know and is nice and simple (=cheap). Unfortunately I wouldn't know where to begin actually looking at the decapped circuits. I did see those directories but I didn't kno...
by Rena
Fri Apr 01, 2016 10:19 am
Forum: GBDev
Topic: What exactly are T-states doing?
Replies: 25
Views: 12907

Re: What exactly are T-states doing?

So I've done more analysis in "decode" sheet based on a better understanding of how processors actually work ( this was very helpful) and the information from Mooneye. The decoding logic I've come up with probably isn't entirely the same as the real thing but it matches the known timings f...
by Rena
Thu Mar 31, 2016 11:16 am
Forum: GBDev
Topic: What exactly are T-states doing?
Replies: 25
Views: 12907

Re: What exactly are T-states doing?

Nice, that is very helpful. (Now how do I read Rust... :p) The main thing I'm after right now is understanding just what, exactly, is going on at each clock cycle. So for example https://github.com/Gekkio/mooneye-gb/blob/master/docs/accuracy.markdown#what-is-the-exact-timing-of-push-rr we can see ma...
by Rena
Wed Mar 30, 2016 11:07 am
Forum: GBDev
Topic: What exactly are T-states doing?
Replies: 25
Views: 12907

Re: What exactly are T-states doing?

Those test ROMs are super helpful. I just wish they gave more information about what, exactly, is wrong. (Trying to read their code isn't much help either...) I added a new sheet to the document ("breakdown2") that tries to break down the instruction stages based on the "read, decode,...
by Rena
Wed Mar 30, 2016 9:48 am
Forum: GBDev
Topic: What exactly are T-states doing?
Replies: 25
Views: 12907

Re: What exactly are T-states doing?

Thanks, I wasn't sure how similar the two are internally.

Your model seems to make sense, though I haven't examined in detail. If you don't mind my asking, where is this information from?
by Rena
Tue Mar 29, 2016 7:54 pm
Forum: GBDev
Topic: What exactly are T-states doing?
Replies: 25
Views: 12907

Re: What exactly are T-states doing?

I'd be surprised if it used DRAM, since the need for constant refreshing would hurt battery life. Especially, Nintendo advises to use HALT to save battery power, but the Z80 manual says HALT just runs endless NOPs until interrupted, that would imply it's not really saving any power. So I would expec...
by Rena
Tue Mar 29, 2016 11:12 am
Forum: GBDev
Topic: What exactly are T-states doing?
Replies: 25
Views: 12907

What exactly are T-states doing?

So I've been writing a GB emulator like so many others, mostly to learn about the innards. I'm trying to make it as accurate as possible. One thing I've been confused about is the "4 clock cycles/1 machine cycle" thing. All the sources I find list the instructions as taking a multiple of 4...