Page 2 of 2

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: October 27th, 2017, 12:16 am
by nocash
I've spend some hours on searching for GTE source code. That's really hard to find, almost looks as if nobody has ever programmed or disassembled GTE code yet, so there doesn't seem to be any common syntax for GTE stuff. The only public code that I've found is this: https://github.com/iamgreaser/psx-chain ... /GL/draw.c
"\tcop2 0xXXX" are opcodes, %nn are variables (as defined in following "r"() lines), and $nn must be cop2 register numbers (in decimal). in other words, it looks like crap.

Oh, and, here's some japanese source code: http://archives.dcemulation.org/berodc/ ... gte_vp.htm this is actually using symbolic register names like C2_MAC0, but it doesn't use macro/symbols for opcodes... do those macros really exist? And did anybody ever use them? If not, then I am rather clueless about if/how/why to support those nonexisting macros in no$psx.

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: October 27th, 2017, 5:02 pm
by LameGuy64
Here's the contents of GTEREG.H from the SDK:

Code: Select all

;
; $PSLibId: Run-time Library Release 4.7$
;

;
;	gtereg.h
;	Copyright(C) 1995,1996,1997 Sony Computer Entertainment Inc.
;	All rights reserved.
;

;
; GTE data registers
;
C2_VXY0		equs	"r0"
C2_VZ0		equs	"r1"
C2_VXY1		equs	"r2"
C2_VZ1		equs	"r3"
C2_VXY2		equs	"r4"
C2_VZ2		equs	"r5"
C2_RGB		equs	"r6"
C2_OTZ		equs	"r7"

C2_IR0		equs	"r8"
C2_IR1		equs	"r9"
C2_IR2		equs	"r10"
C2_IR3		equs	"r11"
C2_SXY0		equs	"r12"
C2_SXY1		equs	"r13"
C2_SXY2		equs	"r14"
C2_SXYP		equs	"r15"

C2_SZ0		equs	"r16"
C2_SZ1		equs	"r17"
C2_SZ2		equs	"r18"
C2_SZ3		equs	"r19"
C2_RGB0		equs	"r20"
C2_RGB1		equs	"r21"
C2_RGB2		equs	"r22"


C2_MAC0		equs	"r24"
C2_MAC1		equs	"r25"
C2_MAC2		equs	"r26"
C2_MAC3		equs	"r27"
C2_IRGB		equs	"r28"
C2_ORGB		equs	"r29"
C2_LZCS		equs	"r30"
C2_LZCR		equs	"r31"

;
; GTE control registers
;
C2_R11R12	equs	"r0"
C2_R13R21	equs	"r1"
C2_R22R23	equs	"r2"
C2_R31R32	equs	"r3"
C2_R33		equs	"r4"
C2_TRX		equs	"r5"
C2_TRY		equs	"r6"
C2_TRZ		equs	"r7"

C2_L11L12	equs	"r8"
C2_L13L21	equs	"r9"
C2_L22L23	equs	"r10"
C2_L31L32	equs	"r11"
C2_L33		equs	"r12"
C2_RBK		equs	"r13"
C2_GBK		equs	"r14"
C2_BBK		equs	"r15"

C2_LR1LR2	equs	"r16"
C2_LR3LG1	equs	"r17"
C2_LG2LG3	equs	"r18"
C2_LB1LB2	equs	"r19"
C2_LB3		equs	"r20"
C2_RFC		equs	"r21"
C2_GFC		equs	"r22"
C2_BFC		equs	"r23"

C2_OFX		equs	"r24"
C2_OFY		equs	"r25"
C2_H		equs	"r26"
C2_DQA		equs	"r27"
C2_DQB		equs	"r28"
C2_ZSF3		equs	"r29"
C2_ZSF4		equs	"r30"
C2_FLAG		equs	"r31"
And here's the contents of INLINE_A.H containing GTE macros:

Code: Select all

; $PSLibId: Run-time Library Release 4.7$
;
;	Macro definitions of DMPSX version 3 for Assembler programs
;	inline_a.h
;	Copyright(C) 1996,  Sony Computer Entertainment Inc.
;	All rights reserved.
;

;
; GTE commands with 2 nops
;
nRTPS		macro
		nop
		nop
		dw	$0000007f
		endm

nRTPT		macro
		nop
		nop
		dw	$000000bf
		endm

nDCPL		macro
		nop
		nop
		dw	$00000dff
		endm

nDPCS		macro
		nop
		nop
		dw	$00000e3f
		endm

nDPCT		macro
		nop
		nop
		dw	$00000e7f
		endm

nINTPL		macro
		nop
		nop
		dw	$00000ebf
		endm

nNCS		macro
		nop
		nop
		dw	$00000f7f
		endm

nNCT		macro
		nop
		nop
		dw	$00000fbf
		endm

nNCDS		macro
		nop
		nop
		dw	$00000fff
		endm

nNCDT		macro
		nop
		nop
		dw	$0000103f
		endm

nNCCS		macro
		nop
		nop
		dw	$0000107f
		endm

nNCCT		macro
		nop
		nop
		dw	$000010bf
		endm

nCDP		macro
		nop
		nop
		dw	$000010ff
		endm

nCC		macro
		nop
		nop
		dw	$0000113f
		endm

nNCLIP		macro
		nop
		nop
		dw	$0000117f
		endm

nAVSZ3		macro
		nop
		nop
		dw	$000011bf
		endm

nAVSZ4		macro
		nop
		nop
		dw	$000011ff
		endm

nMVMVA		macro	sf,mx,v,cv,lm
		nop
		nop
		dw	$000013bf|sf<<25|mx<<23|v<<21|cv<<19|lm<<18
		endm

nSQR		macro	sf
		nop
		nop
		dw	$000013ff|sf<<25
		endm

nOP		macro	sf
		nop
		nop
		dw	$0000143f|sf<<25
		endm

nGPF		macro	sf
		nop
		nop
		dw	$0000147f|sf<<25
		endm

nGPL		macro	sf
		nop
		nop
		dw	$000014bf|sf<<25
		endm

;
; GTE commands without nops
;
RTPS		macro
		dw	$0000007f
		endm

RTPT		macro
		dw	$000000bf
		endm

DCPL		macro
		dw	$00000dff
		endm

DPCS		macro
		dw	$00000e3f
		endm

DPCT		macro
		dw	$00000e7f
		endm

INTPL		macro
		dw	$00000ebf
		endm

NCS		macro
		dw	$00000f7f
		endm

NCT		macro
		dw	$00000fbf
		endm

NCDS		macro
		dw	$00000fff
		endm

NCDT		macro
		dw	$0000103f
		endm

NCCS		macro
		dw	$0000107f
		endm

NCCT		macro
		dw	$000010bf
		endm

CDP		macro
		dw	$000010ff
		endm

CC		macro
		dw	$0000113f
		endm

NCLIP		macro
		dw	$0000117f
		endm

AVSZ3		macro
		dw	$000011bf
		endm

AVSZ4		macro
		dw	$000011ff
		endm

MVMVA		macro	sf,mx,v,cv,lm
		dw	$000013bf|sf<<25|mx<<23|v<<21|cv<<19|lm<<18
		endm

SQR		macro	sf
		dw	$000013ff|sf<<25
		endm

OP		macro	sf
		dw	$0000143f|sf<<25
		endm

GPF		macro	sf
		dw	$0000147f|sf<<25
		endm

GPL		macro	sf
		dw	$000014bf|sf<<25
		endm
Be warned that the DWORD codes are actually not GTE cop2 instructions. The way you deal with them in the official SDK is that you'd run the compiled object file of your assembly source that uses said macros through DMPSX which translates those DWORD codes into the correct GTE cop2 instructions. I don't know why Sony made it this way.

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: October 28th, 2017, 1:48 am
by nocash
Many thanks! Good to know that the data/control registers are internally just called r0-r31 (I was thinking that they might use different names like c0-c31 and d0-d31 to distinguish between cpu, data, and control registers - but apparently, they don't do so).

The macros are also very interesting. How would they look like in actual source code? Is it required/allowed/prohibited to specify the parameters in brackets?

Code: Select all

  MVMVA(sf,mx,v,cv,lm)
  or
  MVMVA sf,mx,v,cv,lm
And that parameters, are they just entered as numeric values, or are there symbolic names for them?

Code: Select all

  MVMVA 1,0,2,1,0
  or
  MVMVA 1,RT,V2,BK,0
  or yet different...?
Hardware-wise, the "sf" and "lm" bits can be used with a couple more GTE opcodes, ie. even in cases where the macros don't allow to specify them as parameters. So the bits must have some fixed/default setting when using the macros...

sf (bit19)) can be also used in these opcodes:

Code: Select all

  RTPS/RTPT                    with fixed sf=1
  CC/CDP                       with fixed sf=1
  NCS/NCT/NCCS/NCCT/NCDS/NCDT  with fixed sf=1
  DCPL/DPCS/DPCT/INTPL         with fixed sf=1
From what I know, they are always using sf=1, right? Would be great if somebody could assemble the macros, and check that the resulting EXE really has bit19 set for all of those opcodes.

lm (bit10) can be also used in these opcodes:

Code: Select all

  GPF/GPL                      with fixed lm=???
  OP                           with fixed lm=zero
  CC/CDP                       with fixed lm=1
  NCS/NCT/NCCS/NCCT/NCDS/NCDT  with fixed lm=1
  DCPL/DPCS/DPCT/INTPL         with fixed lm=???
Some seem to have lm=0, some lm=1, and some I don't know what. Can somebody assemble the macros, and check how they do set bit10 in the reyulting EXE?

When knowing the default sf/lm values, I'll program the disassembler to show some "???" warning when the sf/lm bits are set to non-default values (of course unless the original macros allow to specify variable settings for sf and lm).

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: November 4th, 2017, 7:57 pm
by Someone
I've found some new bugs. Some games from Eidos have boot menu where you can try demos and watch trailers, so far I tested two such discs: Akuji The Heartless and Fighting Force. Both of them fail to boot demos from that menu, screen goes black, music continues to play and nothing happens but when you choose trailer it plays without problems.

Another bug was in Quake 2. Changing music volume has no effect but sound volume works as intended.

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: February 19th, 2018, 1:27 am
by Shadow
Found two annoying bugs. First, NO$PSX doesn't remember the directory you were last in, so if you go to for example 'Upload a PS-EXE', you have to keep going back and navigating to the directory you are working in. Secondly, in the options menu, under the 'Emulator' tab, "Number of Emulated Consoles" has the arrows to increase or decrease the number backwards (down increases, and up decreases).

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: April 28th, 2018, 12:06 am
by nanyman
Hello nocash I noticed a problem when starting the game, namely Harry Potter and the Sorcerer's Stone the main problem is this input lag if it can be fixed, then I would like to know how. I also noticed that when starting the game there is a certain ripple of pixels Screenshot: https://imgur.com/HURbE5S I would like to remove, smooth the picture for example, as it is done in ePSXe. (This is not advertising) Waiting for an answer, thank you.

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: May 9th, 2018, 3:24 pm
by ViLXDRYAD
Hii! first of all let me thank you for making this amazing emulator!, after i found it it quickly became my to-go choice for ps1 emulation, mad props! \o/

though i found a graphic glitch using the Loser's Boot Menu, NO$PSX doesn't display the stars BUT PCSXR and real hardware does:

NO$PSX
Image

PCSXR
Image

my bad for the frame drops lol

i can hand you the iso i tested there by PM (i have uploaded this NES and SMS emulators compilation to other sites and a lot of mirrors, just look for Sega Vs. Family PS1 ISO on google and check the last comment on any of the first results tho :D)

thanks a lot developing NO$PSX!, it has helped me a huge lot in developing! =' D

EDIT: also perhaps this is bug related? viewtopic.php?f=24&p=14436#p14434 =' 3

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: September 23rd, 2018, 3:57 pm
by Squaresoft74
Could the "Utility>Upload to PSX" menu be tweaked a little bit ?
I mainly test PSF rips (.exe form).
Currently, starting from this menu, once you've uploaded an executable you must close the emulator and run it again if you want to send another one.
Else it will upload the same executable again leaving you no choice to select a new one.

(Unless you load another one first in the emulator itself using "File>Load DiskImage" but it would more convenient if that could be bypassed when you want to send many different ones).

Also could PSF support be added ?
That would avoid to convert to exe first if done on the fly when loaded. :praise

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: November 10th, 2018, 7:31 am
by Squaresoft74
Is it just me or Parasite Eve II won't get any further than the intro cinematic and then get stuck on a black screen ?
I tried Japanese and Usa versions. :?

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: November 10th, 2018, 10:33 am
by NITROYUASH
Look's like this emulator has a problems with right analog (R3) or what? It work's only in two directions - left and right (and only if you put the stick on up or down). Up/Down directions just isn't working. This problem is existing only on NO$PSX.
On EPSXE,PCSXR and PS3 everything is fine.

Dualshock 3.
Tested with PadTest 1.0, ANLGCTRL (from Psy-Q examples) and on my program.

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: November 10th, 2018, 8:11 pm
by Shadow
There's a lot of games that don't work with NO$PSX, but NO$CASH has fled the PSX Development scene and doesn't seem interested in it anymore.

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: November 10th, 2018, 9:28 pm
by NITROYUASH
oh
It's sad

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: November 11th, 2018, 4:42 am
by rama3
Interest comes and goes. Don't write him off yet ;p

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: November 11th, 2018, 12:20 pm
by Squaresoft74
Hope to see him back someday, his work is truly amazing. :clap

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: July 2nd, 2019, 12:53 pm
by Squaresoft74
If any work is ever made again on this project, SPU ram monitoring would be very welcome.

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: July 17th, 2019, 1:08 am
by Z3R0X
I love this emulator is just pure gold, I hope some day he come back and fix compatibility for games like Parasite Eve 1 and 2.
If he decided to quit forever would be great if he release the source code to this masterpiece.

Re: NO$PSX V2.0 Released (12th Aug 2017)

Posted: November 20th, 2019, 9:42 am
by ejack
The last version of NO$GBA is from 10 Jul 2019 so he isn't too far but there is no published work on NO$PSX for more than 2 years :cry:
And as already said I hope he will come back