Previous Thread
Next Thread
Print Thread
Page 3 of 16 1 2 3 4 5 15 16
Re: Reviving the PCE driver #1954
12/23/05 02:32 PM
12/23/05 02:32 PM
Joined: Dec 2005
Posts: 443
Heretical_One Offline OP
Senior Member
Heretical_One  Offline OP
Senior Member
Joined: Dec 2005
Posts: 443
I just ran a backtrace.

Violent Soldier segfaults in the rendering code.
Die Hard and Dragon Spirit crah somewhere in the sprite code.

Sounds like maybe we want to modify the battlera video code from MAME to work with half of the VRAM and make sure that it doesn't integrate the VCE (Hu6260, iirc) directly into the code. As long as it uses an abstracted VCE, we're ok: the data is the same, but it's hooked up stange on battlera. If you're going to dig into the driver, the video code is the best place to start, because that's what's killing this driver.

I plan on asking Charles MacDonald a number of questions to help sort out a few of the more basic 6280/PSG questions I have. Hopefully, that will clear up some MAME/pcetech conflicts, which will in turn clean up the PCE driver in progress.

My family has three days running of Christmas stuff to do, but when I see MAME .103 go out, I'm going to throw out a MESS patch, dirty kludge still needed or not. Adding sound to a driver makes people think there's momentum wink

Re: Reviving the PCE driver #1955
12/24/05 11:34 AM
12/24/05 11:34 AM
Joined: Dec 2005
Posts: 443
Heretical_One Offline OP
Senior Member
Heretical_One  Offline OP
Senior Member
Joined: Dec 2005
Posts: 443
I don't have the energy I need to actually make a patch, but here's the clean-but-less-accurate PCE sound changes:

mess.mak:
Find "#SOUNDS+=C6280@". uncomment that line.

systems/pce.c:
add:
#include "includes/pce.h"

change:
AM_RANGE( 0x1FE800, 0x1FE80F) AM_READWRITE( pce_psg_r, pce_psg_w )

to
AM_RANGE( 0x1FE800, 0x1FE80F) AM_READWRITE( pce_psg_r, C6280_0_w )

add to MACHINE_DRIVER_START:

MDRV_SPEAKER_STANDARD_STEREO("left", "right")
MDRV_SOUND_ADD(C6280, 21477270/6)
MDRV_SOUND_ROUTE(0, "left", 1.00)
MDRV_SOUND_ROUTE(1, "right", 1.00)

compile and enjoy until the renderer explodes in flames.

This code is not the most accurate possible, but it's cleaner than the alternative, which is something of an accuate-but-hackish setup pending communication with Charles MacDonald, at which point I hope to be able to begin making the clean code the accurate code.

This is intended for interested devs primarily, but if you are a qualified dev and decide to commit it to CVS, remember to change the GAME_NO_SOUND to GAME_IMPERFECT_SOUND.

Re: Reviving the PCE driver #1956
12/27/05 02:22 PM
12/27/05 02:22 PM
Joined: Dec 2005
Posts: 443
Heretical_One Offline OP
Senior Member
Heretical_One  Offline OP
Senior Member
Joined: Dec 2005
Posts: 443
The exact cause of the sprite crash is a buffer overflow somewhere. It crashes when you try to free a dynamically allocated buffer in the sprite code.

On the Charles front, all I can see is he's already been very helpful.

I've already confirmed some of the biggest concerns about CPU/add-on hardware are unfounded, and that the PSG is mirrored. The above changes are now "almost" what I plan to submit, along with a rewrite of a lot of the SNES sysinfo.

Of course, looking way forward, once the renderer is actually working, I have "plans" for it, per a recommendation from Charles. But that... you'll just have to guess. Now, if CHD-CD support were available, Charles has long had documents on the TG-16 CD... smile

I'll really try hard for a sound patch tomorrow...

Re: Reviving the PCE driver #1957
12/27/05 07:02 PM
12/27/05 07:02 PM
Joined: Mar 2001
Posts: 16,007
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,007
USA
CHD-CD is easy (well, I would say that, I invented it and wrote the current implementation). If the PCE-CD's drive is custom you should be able to support it via the primitives in src/cdrom.h. For ATAPI/SCSI (ATAPI is SCSI over ATA) send SCSI commands to src/machine/scsicd.c :-)

Re: Reviving the PCE driver #1958
12/27/05 07:24 PM
12/27/05 07:24 PM
Joined: Apr 2004
Posts: 1,553
J
judge Offline
Very Senior Member
judge  Offline
Very Senior Member
J
Joined: Apr 2004
Posts: 1,553
Quote:
Originally posted by Heretical_One:
I just ran a backtrace.

Violent Soldier segfaults in the rendering code.
When does it segfault? I ran Violent Soldier for a little while but haven't seen it segfault in my build. I'm using xmess on os x...

Btw, I'll see if I got some time later today to add support for 'encrypted' rom images. It doesn't look too hard.

And the banking is done inside the cpu core. The 8 mpr registers map the cpu-internal 64KB address space to the 2MB cpu-external address space.

Re: Reviving the PCE driver #1959
12/27/05 11:06 PM
12/27/05 11:06 PM
Joined: Dec 2005
Posts: 443
Heretical_One Offline OP
Senior Member
Heretical_One  Offline OP
Senior Member
Joined: Dec 2005
Posts: 443
You know, the second time I tried a backtrace, it wouldn't crash.

I understand how the banking works, but there's nothing blatantly wrong there, so it's not a top priority. There is something obviously wrong with the sprite code, not the least of which is "why the hell is it dynamically allocated, anyway?". Once the driver works, I'll find time to worry about banking smile

ETA: I was under the impression that there wasn't a way to actually load a CD in MESS. It's on the bug tracker as <a href="http://bugzilla.mess.org/show_bug.cgi?id=149">Bug #149</a>. If that's no longer valid, then it should be closed and I'd stand corrected...

Re: Reviving the PCE driver #1960
12/28/05 12:51 AM
12/28/05 12:51 AM
Joined: Apr 2004
Posts: 1,553
J
judge Offline
Very Senior Member
judge  Offline
Very Senior Member
J
Joined: Apr 2004
Posts: 1,553
MESS cvs now also supports 'encrypted' pce cartridge images.

Re: Reviving the PCE driver #1961
12/28/05 12:57 AM
12/28/05 12:57 AM
Joined: Apr 2004
Posts: 1,553
J
judge Offline
Very Senior Member
judge  Offline
Very Senior Member
J
Joined: Apr 2004
Posts: 1,553
Quote:
Originally posted by Heretical_One:

There are two missing opcodes, one of which is used (I don't know how) in copy protection. They basically set the base clock divider. The only code example of this behavior I can find is in one of the mips cores, and it's not very pretty.

Which opcodes are missing?

Re: Reviving the PCE driver #1962
12/28/05 01:19 AM
12/28/05 01:19 AM
Joined: Dec 2005
Posts: 443
Heretical_One Offline OP
Senior Member
Heretical_One  Offline OP
Senior Member
Joined: Dec 2005
Posts: 443
the clock speed adjusting opcodes CSH and CSL. I got a good explanation how they work. I could implement them now, but it would break the timers for MAME. I'd rather do all of that in one pass, when I go to fix timers for the PCE, which is about third on my list now.

The opcodes basically change the CPU clock divider. I've seen examples in the MIPS core of how this is done, but it's ugly code. I'm debating whether to go that route, or just simulate opcodes taking several times longer by building on existing code that will probably be obselete in MAME .157 or so...

My options are "TIMER_NOW and manually change the clock rate" or ex post facto, use a multiplier to eat up the extra cycles needed to simulate the slower clock speed. The timer, in either case, is already using the latter case, except it expects the clock rate to always be fast, which it isn't.

The sound patch is going out as soon as possible, but because of my testing procedures, it takes a while. I checkout a clean source tree, make the patch, apply it, and compile, then run a few games. I'm "still compiling".

Re: Reviving the PCE driver #1963
12/28/05 01:30 AM
12/28/05 01:30 AM
Joined: Mar 2001
Posts: 16,007
USA
R
R. Belmont Offline
Very Senior Member
R. Belmont  Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,007
USA
Bug #149 is invalid. Systems requiring a CD should have bugs filed against those systems. Systems where the CD was an optional add-on (SegaCD, NeoCD, 32X CD) are IMO a separate system and should not be bugged.

ETA: the MIPS core is by Aaron. Ugly or not, it's probably the best way to do things.

Page 3 of 16 1 2 3 4 5 15 16

Who's Online Now
1 registered members (sof-max), 81 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,575
Posts112,038
Members4,812
Most Online225
May 26th, 2014
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.051s Queries: 14 (0.015s) Memory: 5.7325 MB (Peak: 5.9439 MB) Zlib enabled. Server Time: 2018-09-23 12:01:03 UTC