Search found 25 matches

by DParrott
Tue Jan 22, 2019 7:00 am
Forum: GBDev
Topic: Game Boy CPU isn't a Z80. What is it?
Replies: 17
Views: 22952

Re: Game Boy CPU isn't a Z80. What is it?

I think this is one of the two docs being referred to, see page 140.

http://bitsavers.informatik.uni-stuttga ... a_Book.pdf
by DParrott
Tue Nov 07, 2017 3:47 am
Forum: Other Retro Dev
Topic: SMS/Z80 Zexall
Replies: 1
Views: 6143

Re: SMS/Z80 Zexall

Ok, self posting, but it does appear that I might have resolved this. If what I've got is correct it wasn't in fact the MEMPTR but the flags on the non indirect BIT instruction. My implementation followed the comments inside of the Undocumentd Z80 PDF which states: SF flag Set if n = 7 and tested bi...
by DParrott
Fri Nov 03, 2017 7:03 am
Forum: Other Retro Dev
Topic: SMS/Z80 Zexall
Replies: 1
Views: 6143

SMS/Z80 Zexall

Hi all, I wondered if anyone else had worked on a Z80/SMS emulator that passes zexall sms? I've managed to implement all the instructions and have a full pass on zexdoc (using the sdsc version as I do not currently implement the vdp). Running zexall shows passes on all except this one: bit n,<b,c,d,...
by DParrott
Tue Oct 31, 2017 2:33 am
Forum: GBDev
Topic: Gameboy CPU instruction set timings and lengths
Replies: 12
Views: 6329

Re: Gameboy CPU instruction set timings and lengths

Concerning Blargg's timing tests, is it sufficient for the emulated CPU to wait the instruction length in T-cycles and then carry out the instruction atomically, or does it need to process instructions incrementally, one microcode at a time. There are some instructions that perform multiple reads a...
by DParrott
Fri May 26, 2017 5:49 am
Forum: GBDev
Topic: GameBoy - Help With DAA instruction
Replies: 5
Views: 7047

Re: GameBoy - Help With DAA instruction

zerowalker wrote:And also, isn't it "high nibble is above 0x09" that's what i did as the table said so, which i think is equal to A > 0x90.
That would adjust the accumulator for values 91..99 as well, you would need to mask A (A & 0xF0) to use that as a comparison.
by DParrott
Thu Sep 08, 2016 8:42 am
Forum: GBDev
Topic: Zelda - Links Awakening intro sprite corruption
Replies: 6
Views: 4508

Re: Zelda - Links Awakening intro sprite corruption

adam_smasher wrote:This might be a known bug in the game.
That's exactly what I'm seeing. Thanks for the link. :)

I'll stop looking for that bug in my Emu now. :)

Edit: Yup, if I go to a screen without Octoroks and do the same the intro is fine.
by DParrott
Thu Sep 08, 2016 5:16 am
Forum: GBDev
Topic: Zelda - Links Awakening intro sprite corruption
Replies: 6
Views: 4508

Re: Zelda - Links Awakening intro sprite corruption

Apologies, filename is "Legend of Zelda, The - Link's Awakening (U) (V1.2) [!].gb", testing on my DMG emulator.

MD5: 69 d6 43 bf 4e 37 b3 c1 33 51 85 17 33 8b 6a 1c
SHA1: 5a b6 3d ef 95 87 28 93 35 71 c3 b4 f6 af 54 db 14 f3 f8 b2
by DParrott
Thu Sep 08, 2016 3:03 am
Forum: GBDev
Topic: Zelda - Links Awakening intro sprite corruption
Replies: 6
Views: 4508

Zelda - Links Awakening intro sprite corruption

I've been trying to resolve what I believed was a bug in my emulator but now I'm not so sure. I can reproduce it when selecting Save & Quit after dying, it returns to the intro animation but the sprites are corrupted using enemy sprites in place of the lightning etc. I've been able to consistent...
by DParrott
Fri Aug 05, 2016 12:47 am
Forum: GBDev
Topic: HALT Bug
Replies: 3
Views: 4269

Re: HALT Bug

Oooh, new documentation.

Thanks for pointing that out, a quick look shows I have come across it before but forgot about it. Excellent resource.
by DParrott
Mon Aug 01, 2016 7:37 am
Forum: GBDev
Topic: HALT Bug
Replies: 3
Views: 4269

Re: HALT Bug

Forgive the self post but I thought I'd follow up. I wonder is this another of those GameBoy issues where a few people have worked it out but it's not documented anywhere? I have consulted some other emulators and the behaviour seems to be that if interrupts are disabled and there is a pending inter...
by DParrott
Thu Jul 28, 2016 6:12 am
Forum: GBDev
Topic: HALT Bug
Replies: 3
Views: 4269

HALT Bug

Hi all, I'm hoping someone can give me a steer on implementing the HALT bug? I have had a few attempts in my emulator at implementing this but based on the results of a halt_bug.gb test rom I found at https://github.com/retrio/gb-test-roms I cannot get it passing. The closest I have got has the resu...
by DParrott
Tue May 24, 2016 7:27 am
Forum: GBDev
Topic: MBCn + Battery
Replies: 3
Views: 3472

Re: MBCn + Battery

Apologies, should have been clearer.

I meant that cart ram when it has it and the MBC is a battery type.

I'll save it all out. Thanks. :-)
by DParrott
Tue May 24, 2016 2:04 am
Forum: GBDev
Topic: MBCn + Battery
Replies: 3
Views: 3472

MBCn + Battery

Hi all,

Hopefully a simple question, when a mapper specifies that it has a battery backup should I save the state of the entire RAM out when my emulator exits or is there a range of memory that is specifically battery backed?

Cheers
by DParrott
Tue Apr 12, 2016 4:58 am
Forum: GBDev
Topic: Gamboy Emulator giving strange output on test rom
Replies: 8
Views: 5515

Re: Gamboy Emulator giving strange output on test rom

The LD r,r' instructions do not set any flags.

I can only assume that these are being reported as failures due to a problem with some of the other instructions that the test code is using to verify the result.
by DParrott
Thu Jul 12, 2012 12:46 pm
Forum: GBDev
Topic: The unimplementable DAA instruction
Replies: 3
Views: 6706

This is from my (C#) GB emu, originally based on code posted by Blarrg and passes his GB cpu tests. private void Daa() { int a = _regs.A; if (!_regs.F.HasFlag(Flags.N)) { if (_regs.F.HasFlag(Flags.H) || (a & 0xF) > 9) a += 0x06; if (_regs.F.HasFlag(Flags.C) || a > 0x9F) a += 0x60; } else { if (_...