Next Generation Emulation banner
461 - 480 of 676 Posts
Oops. Fixed in SVN - compiled (static function). Verified okay. :)


EDIT:
I remind everyone that cdda subchannel faking is 'basic' - relative times are not correct. (ex. bios player - works with bin/cue but times are so-so :)

Just a step up from what we had. ;)
 
Disney's Aladdin - Nasira's Revenge [E] ccd/img/sub
works in your latest nightly build but in r59791 when you start a new game and it goes to load level one ,nothing but a black screen

ok it works in 59830
but i just found another bug in both builds
start a new game then talk to the genie and there is speech
start a game then load an old game from the memory card and when you talk to the genie the speech is gone
 
Duke Nukem - Time to Kill [E] ccd/img/sub

is there a problem with the speech and music ???
go into options and turn right down sound fx and speech then start a game and you can still hear him speak and is the music playing properly ??
 
Disney's Aladdin - Nasira's Revenge
- new game = genie speech
- load game (stage 1) = genie speech

Try not using sub file. And run emu again.


Duke Nukem - Time to Kill
- new game = music okay
- speech / music off = probably not okay :)
(same happens with epsxe 1.7.0 too. eh.)

Try not using sub file either.

---------------------------------------------------------

Duke Nukem - Time to Kill

Don't change SPU CD-XA volume in mute/demute
- allow music / speech to turn off seperately


cdrom.c
Code:
cdrInterrupt
		case CdlMute:
   		cdr.Muted = TRUE;
			cdr.Ctrl |= 0x80;
    	cdr.Stat = NoIntr; 
    	AddIrqQueue(cdr.Cmd, 0x1000);

			// Duke Nukem - Time to Kill
			// - do not directly set cd-xa volume
			//SPU_writeRegister( H_CDLeft, 0x0000 );
			//SPU_writeRegister( H_CDRight, 0x0000 );
		 	break;

		case CdlDemute:
			cdr.Muted = FALSE;
			cdr.Ctrl |= 0x80;
			cdr.Stat = NoIntr; 
			AddIrqQueue(cdr.Cmd, 0x1000);

			// Duke Nukem - Time to Kill
			// - do not directly set cd-xa volume
			//SPU_writeRegister( H_CDLeft, 0x7f00 );
			//SPU_writeRegister( H_CDRight, 0x7f00 );
	   	break;
shalma's old Vib Ribbon demute hack no longer needed - CD-XA volume does it now. :)


Tester
Download pcsxr-test.7z from Sendspace.com - send big files the easy way

----------------------------------------------------

UPDATE2:
Xenogears

lbu v1 - beq v1 = no load delay
- fixes battle load (interpreter)

Code:
psxinterpreter.c

psxTestLoadDelay
		case 0x01: // REGIMM
		case 0x04: case 0x05: // BEQ/BNE
		case 0x06: case 0x07: // BLEZ/BGTZ

			// Xenogears - lbu v0 / beq v0
			// - no load delay (fixes battle loading)
			break;
Code:
80018ce0 : 3C028002  LUI     00000000 (v0), 8002 (32770),

; load delay = stops battles from starting..!
80018ce4 : 90438CD0  LBU     80059ef4 (v1), 8cd0 (80020000 (v0)) [80018cd0]
80018ce8 : 10600005  BEQ     80059ef4 (v1), 00000000 (r0), 80018d00,
80018cec : 00000000  NOP    

; don't start battle
80018cf0 : 2484FFE9  ADDIU   0001a9f1 (a0), 0001a9f1 (a0), ffe9 (65513),
80018cf4 : 3C030004  LUI     00000000 (v1), 0004 (4),
80018cf8 : 3463A9B2  ORI     00040000 (v1), 00040000 (v1), a9b2 (43442),
80018cfc : 00832021  ADDU    0001a9da (a0), 0001a9da (a0), 0004a9b2 (v1),

80018d00 : 3C031B4E  LUI     0004a9b2 (v1), 1b4e (6990),
80018d04 : 346381B5  ORI     1b4e0000 (v1), 1b4e0000 (v1), 81b5 (33205),
80018d08 : 0801050E  J       80041438,
80018d0c : 00000000  NOP
Tester (updated #2)
Download pcsxr-test.7z from Sendspace.com - send big files the easy way
 
Animorphs - Shattered Reality ccd/img/sub
goes really slow when it is first loading

Crusaders of Might & Magic [PAL] ccd/img/sub
in both builds there is no speech during the gameplay
and in r59851 the first screen when the 3DO flys in is just does the 3 then skips the screen
 
Dukes of Hazzard II - Daisy Dukes It Out (U) ccd/img/sub
no music and speech on the screen where the guy is playing his guitar(the theme music)
during game no car sound and in the background like the sky it is a bit messed up

Eggs of Steel (U) ccd/img/sub
graphic glitches during the intro and gameplay

Dexter's Laboratory - Mandark's Lab (U) ccd/img/sub
after you choose new adventure screen goes black but you can still hear the music and speech
 
Stuff. Stuff. Stuff.

--------------------------------------

Breath of Fire 3
PCSX-Reloaded - pcsxr - View Issue #7636: Breath of Fire III hangs when you sleep (regression).

CD-XA writes still update cdrom register.

---------------------------------------

Crusaders of Might and Magic

Send FORM2 for 2340 read + ADPCM on
- fix 3DO logo


cdrom.c

Code:
cdrReadInterrupt
	/*
	Croc 2: $40 - only FORM1 (*) - !!!
	Crusaders of Might and Magic: $E0 - FORM1 and FORM2-XA (*) - !!!
	Judge Dredd: $C8 - only FORM1 (*)
	*/

	if( (cdr.Mode & 0x40) == 0 || (cdr.Transfer[4+2] & 0x4) != 0x4 ||
			(cdr.Mode & 0x20) )
	{
#ifdef CDR_LOG
		CDR_LOG( "DATA READY\n" );
#endif
---------------------------------------

Crusaders of Might and Magic

Give top priority to cdr commands
- fix intro movie


cdrom.c

Code:
void cdrRepplayInterrupt()
	if( !cdr.Play ) return;

	if ( cdr.Irq || cdr.Stat ) {


void cdrReadInterrupt() {
	if (!cdr.Reading)
		return;

	if (cdr.Irq || cdr.Stat) {
		CDREAD_INT(0x1000);
		return;
	}
---------------------------------------

So that's 2/3 crusaders done. No tester tonight - go to svn. :)

---------------------------------------

UPDATE:
Animorphs - use Pete OGL2. Internal X/Y = 1/1. No slow. Otherwise, get powerful CPU to run edgbla soft / pete soft.

Dukes of Hazzard 2 - music okay. Intro movie okay. Car engine not okay. Please show screenshot of sky problem (which track)?

Eggs of Steel = huh? very strange. :|
 
using r 59905

Iron & Blood - Warriors of Ravenloft (U) ccd/img/sub
music on menu's and during game is not correct (plays garbled)

London Racer 2 (E) ccd/img/sub
no input of controls (cannot get past memory card screen as it wants you to press X)

Space Hulk - Vengeance of the Blood Angels (U) ccd/img/sub
speech during the game is garbled
 
Code:
80018ce0 : 3C028002  LUI     00000000 (v0), 8002 (32770),

; load delay = stops battles from starting..!
80018ce4 : 90438CD0  LBU     80059ef4 (v1), 8cd0 (80020000 (v0)) [80018cd0]
80018ce8 : 10600005  BEQ     80059ef4 (v1), 00000000 (r0), 80018d00,
80018cec : 00000000  NOP
So, the R3000A has the load delay slot after all and some games do use it.

Based on your example, a branch instruction should work normally -- because it too is a "slow" instruction?


Just a comment on your implementation. Because you share the load and branch delay functions, you have "broken" the branch/branch sequence, but I would think that is even more rare.
 
Space Hulk - Vengeance of the Blood Angels

channel off = use first file #, channel #
- fix speech, music


cdrom.c

Code:
cdrReadInterrupt
		if( cdr.FirstSector == 1 && (cdr.Mode & 0x8)==0 ) {
			cdr.File = cdr.Transfer[4 + 0];
			cdr.Channel = cdr.Transfer[4 + 1];
		}

		if((cdr.Transfer[4 + 2] & 0x4) &&
			 (cdr.Transfer[4 + 1] == cdr.Channel) &&
			 (cdr.Transfer[4 + 0] == cdr.File)) {
			int ret = xa_decode_sector(&cdr.Xa, cdr.Transfer+4, cdr.FirstSector);
Maybe fix Ravenloft too.


Tester
Download pcsxr-test.7z from Sendspace.com - send big files the easy way

--------------------------------------------------------

EDIT:

Agemo Xenogears translation uses load delay (no branch) to detect emu. Ask Whistler.

Tekken 2 uses branch load delay (beq - mfc --> mtc)

Threads of Fate uses beq / bne / nop. oO No idea what happens.

(real) shalma said to use that load delay hack until someone else fixes it (and confirms). He didn't want to fix it for real.

Personally, my RISC is so-so. Just basic understanding but I work around what we see.



Xenogears
- if we use load delay (lbu - beq), game breaks.
- so I hacked it back normal way :)

We need more people to fix this stuff up.

---------------------------------------------

UPDATE2:

Dexter's Laboratory - Mandark's Lab

Detect last cdda track
- fix new game


cdrom.c

Code:
Find_CurTrack
	if (CDR_getTN(cdr.ResultTN) != -1) {
		int lcv;

		for( lcv = 1; lcv <= cdr.ResultTN[1]; lcv++ ) {
			if (CDR_getTD((u8)(lcv), cdr.ResultTD) != -1) {
Tester2
Download pcsxr-test.7z from Sendspace.com - send big files the easy way
 
Just a comment on your implementation. Because you share the load and branch delay functions, you have "broken" the branch/branch sequence, but I would think that is even more rare.
My mistake. I read through psxinterpreter.c more carefully and found that it only handles the delay slot specially if it is a load instruction. It does not handle branch/branch at all. (I knew about this, but had forgotten since it was a few months since I looked at it.)

Your fix will change this normal sequence:

Code:
  branch some-reg, tgt
  load reg-x, value

tgt:
  branch reg-x, tgt2
Previously it will be handled specially. Now it doesn't. I don't know whether the original behavior is correct, though.

As to what happens on a branch/branch, I found this very old blog: Delay Slot. Very strange behavior! (But it can be emulated.)
 
I just realized something.

In psxTestLoadDelay(), this case exists:

Code:
case 0x01: // REGIMM
	switch (_tRt_) {
		case 0x00: case 0x02:
		case 0x10: case 0x12: // BLTZ/BGEZ...
			if (_tRs_ == reg) return 2;
			break;
	}
	break;
However, looking at psxREG[], BGEZ is 0x01, not 0x02. Similarly, BGEZAL is 0x11, not 0x12.

Of course, this is now moot because the case is commented out.
 
However, looking at psxREG[], BGEZ is 0x01, not 0x02. Similarly, BGEZAL is 0x11, not 0x12.
Fixed in SVN. :)


Code:
  branch some-reg, tgt
  load reg-x, value

tgt:
  branch reg-x, tgt2
Alarm! Devs should now pay attention for possible bug. :)

More likely, someone will complain about regression anyway. ;)


As to what happens on a branch/branch, I found this very old blog: Delay Slot. Very strange behavior! (But it can be emulated.)
Anyone smart enough to do this with pcsx?

-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------
-----------------------------------------------

UPDATE1:

I get to this someday:
http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=pcsxr&DownloadId=169635

----------------------------------------------

Rockman X5 again.

No "data ack"
- fix music restart

cdrom.c

Code:
cdrReadInterrupt

#ifdef CDR_LOG
		CDR_LOG( "DATA ACK\n" );
#endif

		// Rockman X5 - no acknowledge
		// - fix music restart problem
		cdr.Stat = NoIntr;
		psxHu32ref(0x1070) |= SWAP32((u32)0x4);
-----------------------------------------------

Crusaders of Might and Magic

Adjust seek, read_ack, pause times
- fix cutscene speech


cdrom.c

Code:
cdrInterrupt
		case CdlSeekL:
			cdr.StatP |= 0x40;
			cdr.Stat = Acknowledge;

			/*
			Crusaders of Might and Magic = 0.5x-4x
			- fix cutscene speech start

			Medievil = ?-4x
			- fix cutscene speech

			Rockman X5 = 0.5-4x
			- fix capcom logo
			*/

			AddIrqQueue(CdlSeekL + 0x20, cdReadTime * 1);


		case CdlSeekP:
			cdr.StatP |= 0x40;
			cdr.Stat = Acknowledge;
			AddIrqQueue(CdlSeekP + 0x20, cdReadTime * 1);
			break;


cdrWrite1
		case CdlPause:
			AddIrqQueue(cdr.Cmd, cdReadTime * 3 );

		case CdlGetlocL:
			cdr.Ctrl |= 0x80;
			cdr.Stat = NoIntr; 


			/*
			Crusaders of Might and Magic = $500-c00
			- cutscene speech

			G-Police = $500+
			- music
			*/

			AddIrqQueue(cdr.Cmd, 0x800);
	 		break;


cdrReadInterrupt
		case READ_ACK:
			if (!cdr.Reading) return;


			// Fighting Force 2 - update subq time immediately
			// - fixes new game
			ReadTrack( cdr.SetSector );


			// Crusaders of Might and Magic - update getlocl now
			// - fixes cutscene speech
			{
				u8 *buf = CDR_getBuffer();
				memcpy(cdr.Transfer, buf, 8);
			}



			/*
			Duke Nukem: Land of the Babes - seek then read at cdrom interval
			- fixes cutscenes
			*/

			if (!cdr.Seeked) {
				cdr.Seeked = TRUE;

				cdr.StatP |= 0x40;
				cdr.StatP &= ~0x20;

				// Crusaders of Might and Magic - use short time
				// - fix cutscene speech (startup)

				// ??? - use more accurate seek time later. Needed to satisfy game.
				CDREAD_INT((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime * 1);
			} else {
				cdr.StatP |= 0x20;
				cdr.StatP &= ~0x40;

				CDREAD_INT((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime * 1);
			}


			SetResultSize(1);
			cdr.StatP |= 0x02;
Timing jarring - picky, picky. Hard stuff to guess right. At this rate, we might need to compute seek distance (short vs long).

Game works okay fully. Speech plays + no startup pause.


Because of nash67, pcsx-r accuracy keeps going up. :)

Tester
Download pcsxr-test.7z from Sendspace.com - send big files the easy way
 
Eggs of Steel

Use longer seekl time
- fix new game

cdrom.c
Code:
cdrInterrupt
		case CdlSeekL:
			/*
			Crusaders of Might and Magic = 0.5x-4x
			- fix cutscene speech start

			Eggs of Steel = 2x-?
			- fix new game

			Medievil = ?-4x
			- fix cutscene speech

			Rockman X5 = 0.5-4x
			- fix capcom logo
			*/

			AddIrqQueue(CdlSeekL + 0x20, cdReadTime * 4);
--------------------------------------------------------

Eggs of Steel

Draw in lines of 16x8 tiles
- fix movie corruption


mdec.c
Code:
static u8 half_block = 0;
static u8 decode_block_24[ 16*16*3 ];

void mdecInit(void) {



void mdecWrite1(u32 data) {

	if (data & MDEC1_RESET) { // mdec reset
		mdec.reg0 = 0;
		mdec.reg1 = 0;
		mdec.pending_dma1.adr = 0;

		half_block = 0;
	}



void psxDma1(u32 adr, u32 bcr, u32 chcr) {

		if (mdec.reg0 & MDEC0_RGB24) { // 15-b decoding
			// Eggs of Steel - draw using lines of 16x8
			// - fix movie corruption
			size = (size * 4) / (16 * 8 * 2);
			dmacnt = size * (16 * 8 * 2);

			for (; size > 0; size--, image += (16 * 8 * 2 / 2)) {
				if( half_block == 0 ) {
					mdec.rl = rl2blk(blk, mdec.rl);
					yuv2rgb15(blk, (u8 *)decode_block_24);

					memcpy( (u8 *) image, (u8 *)decode_block_24, 16*8*2 );


					half_block = 1;
				} else {
					memcpy( (u8 *) image, (u8 *)decode_block_24 + 16*8*2, 16*8*2 );

					half_block = 0;
				}
			}
		} else { // 24-b decoding
			// Eggs of Steel - draw using lines of 16x8
			// - fix movie corruption
			size = (size * 4) / (16 * 8 * 3);
			dmacnt = size * (16 * 8 * 3);

			for (; size > 0; size--, image += (16 * 8 * 3 / 2)) {
				if( half_block == 0 ) {
					mdec.rl = rl2blk(blk, mdec.rl);
					yuv2rgb24(blk, (u8 *)decode_block_24);

					memcpy( (u8 *) image, (u8 *)decode_block_24, 16*8*3 );


					half_block = 1;
				} else {
					memcpy( (u8 *) image, (u8 *)decode_block_24 + 16*8*3, 16*8*3 );

					half_block = 0;
				}
			}
		}
Might fix Novastorm too.

--------------------------------------------------------

@gschwnd:
How do you want to handle this new mdec one? :)
Won't commit until you post new mdec.c here (drag-drop for me).


And others: go tell Xebra to fix emu. :p


Tester
Download pcsxr-test.7z from Sendspace.com - send big files the easy way
 
461 - 480 of 676 Posts