Search found 109 matches

by Near
Tue Apr 30, 2019 1:50 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 9931045

Re: Questions on writing a new Mega CD emulator

Okay, one step closer. GX fires an IRQ right away on writes to ff8037 when HOCK transitions from 0 to 1. With that, I don't have to always fire an IRQ every 75hz for the CDD. auto MCD::CDD::clock() -> void { if(!hostClockEnable || ++counter < 434) return; counter = 0; //75hz if(status.receiving) { s...
by Near
Tue Apr 30, 2019 11:46 am
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 9931045

Re: Questions on writing a new Mega CD emulator

This is really kicking my ass, heh. Currently, the USA Sega CD 2.00w BIOS says "PRESS START BUTTON" at power-on, which will take me into the BIOS where it does say "NO DISC". But I want it to say "NO DISC" at the boot screen, which appears to be the correct behavior as per videos I've seen online. S...
by Near
Sun Apr 28, 2019 6:34 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 9931045

Re: Questions on writing a new Mega CD emulator

Afaik, it is only needed for int1 (graphics operation) and not the case for int2 Oh wild, it's int1, not int2. Okay, well I guess I'll wait until I can run those games and see if it's needed in my case or not. it seems you are confusing Gens and Genesis Plus GX emulators Ah indeed I was, sorry abou...
by Near
Sun Apr 28, 2019 5:51 pm
Forum: Megadrive/Genesis
Topic: Z80 bus + I/O mapping redux
Replies: 7
Views: 14306

Re: Z80 bus + I/O mapping redux

Thanks for all of the insightful responses! Hopefully I've implemented it correctly ... To fill out the bus range completely, I am now chaining all of the I/O handlers, so everything that needs an I/O handler has the chance to act on the read/write bus activities: if(address >= 0xa10000 && address <...
by Near
Fri Apr 26, 2019 1:42 pm
Forum: Megadrive/Genesis
Topic: Z80 bus + I/O mapping redux
Replies: 7
Views: 14306

Z80 bus + I/O mapping redux

Found conflicting information, wanted to clarify what's current and ask some more. References: * http://gendev.spritesmind.net/forum/viewtopic.php?t=347 * http://www.sega-16.com/forum/showthread.php?21234-Z80-Access-When-Using-Sega-CD * http://www.tmeeco.eu/BitShit/CMDHW.TXT bgvanbur states the Z80 ...
by Near
Fri Apr 26, 2019 1:09 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 9931045

Re: Questions on writing a new Mega CD emulator

Rewrote all of my bus handling again. New design works pretty well, and models the data bus reads/writes exactly as the real 68K does. And surprisingly no speed penalty. Good optimizer I guess. Been going through years of notes on various forums to implement stuff. *Super* bizarre the Z80 can write ...
by Near
Fri Apr 26, 2019 12:22 am
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 9931045

Re: Questions on writing a new Mega CD emulator

Oh, they're both. And they're not the same either.

The CDC will label both a register bit /FOO and a pin as /FOO, and then document that they actually behave slightly differently.

This chip was designed by sadists.
by Near
Thu Apr 25, 2019 9:45 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 9931045

Re: Questions on writing a new Mega CD emulator

Just a quick reply but generally about port access i tend to think it's better to use the word handlers as default handlers as 68K CPU uses a 16 bit data bus then only return high/low byte on byte access I have been thinking about changing the read/write handlers like so: uint16 read(bool uds, bool...
by Near
Thu Apr 25, 2019 1:35 pm
Forum: Mega/SegaCD
Topic: Questions on writing a new Mega CD emulator
Replies: 117
Views: 9931045

Questions on writing a new Mega CD emulator

What have I gotten myself into ... so, this'll be long. Lingo: CPU = main-68K, MCD = sub-68k. I'd really appeciate any help if anyone's up for it! ^-^;; For some reason, I have both CPUs running and the MCD is even playing the PCM audio correctly for the Mega CD BIOS screen, and the main CPU is runn...
by Near
Tue Aug 29, 2017 3:33 am
Forum: Megadrive/Genesis
Topic: VDP DMA fill in Ballz 3D; not writing fill byte
Replies: 11
Views: 16300

Re: VDP DMA fill in Ballz 3D; not writing fill byte

That's not it, no. Let's ignore Ballz 3D and presume a test ROM: We set up for a VDP DMA fill operation and set CD5, but then we don't write the fill byte. And there's no FIFO slots available to pull it from, the FIFO is totally empty. Instead, we poll the VDP status bit 1 (DMA) waiting for it to be...
by Near
Sun Aug 27, 2017 3:06 am
Forum: Megadrive/Genesis
Topic: VDP DMA fill in Ballz 3D; not writing fill byte
Replies: 11
Views: 16300

Re: VDP DMA fill in Ballz 3D; not writing fill byte

Well then we are at an impasse ;_; If I had the ability to produce a 68K trace log of instructions like in Mednafen and higan through BlastEm, then I could go line by line to find out where higan diverges and work to fix that. But I don't see an option to produce trace logs in your emulator :( > Are...
by Near
Sun Aug 27, 2017 1:04 am
Forum: Megadrive/Genesis
Topic: VDP DMA fill in Ballz 3D; not writing fill byte
Replies: 11
Views: 16300

Re: VDP DMA fill in Ballz 3D; not writing fill byte

Looking into this a bit more, it looks like the instances in which the subroutine at $2610 is called for a DMA fill, it should be called by the subroutine at $25F4. This is not the case, sorry ... here is a trace log from Mednafen hitting this exact case, performing the VDP DMA fill operation. It's...
by Near
Sat Aug 26, 2017 10:53 pm
Forum: Megadrive/Genesis
Topic: VDP DMA fill in Ballz 3D; not writing fill byte
Replies: 11
Views: 16300

Re: VDP DMA fill in Ballz 3D; not writing fill byte

That block of code is executed multiple times to differing effects. //DMA source case 0x17: { dma.io.source.bits(16,21) = data.bits(0,5); dma.io.mode = data.bits(6,7); dma.io.wait = dma.io.mode.bit(1); print(hex(cpu.r.pc, 8), " ", dma.io.mode, " ", dma.io.wait, "\n"); return; } Prints: 0000023c 2 1 ...
by Near
Sat Aug 26, 2017 6:49 pm
Forum: Megadrive/Genesis
Topic: VDP DMA fill in Ballz 3D; not writing fill byte
Replies: 11
Views: 16300

VDP DMA fill in Ballz 3D; not writing fill byte

So Ballz 3D after the Sega logo sets up a VDP DMA fill operation by writing to the control port, $c00004. In my emulator, when you start a DMA fill operation, it sets a "wait" flag, which prevents the DMA from running until you later write to the VDP data port, $c00000, which signals the byte to be ...
by Near
Tue Aug 22, 2017 7:34 am
Forum: Megadrive/Genesis
Topic: Interlace mode (LSMx=3)
Replies: 20
Views: 22592

Re: Interlace mode (LSMx=3)

Pretty sure there should be a thick line of background color at the split (about four scanlines or so (forgot the exact amount), since that's how long it takes to reload the whole sprite table with forced blanking). Seems to match the area that is broken. Then the video I watched was probably from ...