Search found 311 matches

by LameGuy64
February 16th, 2019, 4:33 pm
Forum: Programming/CPU
Topic: How to properly send commands to the CD controller (low-level)
Replies: 0
Views: 33

How to properly send commands to the CD controller (low-level)

I've been trying to figure this one out in awhile but was unable to figure it out. I'm working on some low level CD routines that allow me to send any command to the CD controller but it would often miss commands when I send a string of them to the controller judging by observing the CD-ROM command ...
by LameGuy64
February 6th, 2019, 3:07 pm
Forum: Work Logs / Projects
Topic: SIOCONS compatible USB Cable
Replies: 48
Views: 6415

Re: SIOCONS compatible USB Cable

Huh, when I did tests with my own loader at more than 115200 baud I got receiving issues on the PSX side and would frequently miss bytes. I'll have to take a look into it again I suppose.
by LameGuy64
February 4th, 2019, 12:19 am
Forum: Examples (Psy-Q)
Topic: 3D FPS Example
Replies: 34
Views: 13762

Re: 3D FPS Example

The seams happen when there are two connecting polygons (tris and quads) that are subdivided at different levels and the point of the quad that is subdivided does not always line up with the edge of a lesser subdivided or undivided quad. Usual workarounds according to the PlayStation documents is to...
by LameGuy64
January 27th, 2019, 11:55 pm
Forum: Members Downloads
Topic: PSn00b Debugger - Homebrew debugger for retail consoles
Replies: 8
Views: 944

Re: PSn00b Debugger - Homebrew debugger for retail consoles

My debugger does not require any handshaking so Tx, Rx and Ground is typically enough.
by LameGuy64
January 23rd, 2019, 11:59 am
Forum: Members Downloads
Topic: PSn00b Debugger - Homebrew debugger for retail consoles
Replies: 8
Views: 944

Re: PSn00b Debugger - Homebrew debugger for retail consoles

Just released a small 0.26b update that fixes some bugs on the disassembler and a bug on the memory browser when you save a project with the bookmarks window open.

I'm thinking of getting proper Linux support working on the debugger so I can start implementing support for ELF symbols.
by LameGuy64
January 21st, 2019, 11:32 am
Forum: Programming/CPU
Topic: Optimization question floating point
Replies: 5
Views: 302

Re: Optimization question floating point

I don't recommend making extensive use of floating point math on the PS1 as FPU emulation is just very slow on the already slow R3000 so fixed point integer math is recommended. Try using ratan2(), SquareRoot0(), csin() and ccos() and convert your arithmetic to fixed point integer math. Using 12-bit...
by LameGuy64
January 17th, 2019, 11:44 am
Forum: Work Logs / Projects
Topic: [CANCELLED] Marilyn Fan-game Project Thread
Replies: 54
Views: 51007

Re: [CANCELLED] Marilyn Fan-game Project Thread

Its been a very long time since I've last compiled this game. I think its because the batch file is looking for Dosbox to execute BUILDCD as I used to work on this game in Windows 7 64-bit. Try commenting out the dos_emulator variable at line 19 in run_emu.bat. That should make the batch file run bu...
by LameGuy64
January 12th, 2019, 11:16 am
Forum: Graphics/GPU
Topic: What's the better for PS1-3D?
Replies: 3
Views: 222

Re: What's the better for PS1-3D?

Quads still have some uses even though they still appear as a pair of affine textured triangles when drawn. Namely in optimization as you only have to compute 4 vertices for quads whereas an equivalent comprised of triangles will have 6 vertices to compute. Quads also take up less packet space than ...
by LameGuy64
January 11th, 2019, 11:49 am
Forum: Graphics/GPU
Topic: [Question] Can i create TIM with multiple CLUT's?
Replies: 8
Views: 231

Re: [Question] Can i create TIM with multiple CLUT's?

Should be doable with this kind of struct: typedef struct { unsigned short r:5; unsigned short g:5; unsigned short b:5; unsigned short i:1; // Mask bit used for transparencies } PIX16; Make an array out of it with 16 elements for a 16 color CLUT or 256 for a 256 color CLUT and then upload them to VR...
by LameGuy64
January 10th, 2019, 7:49 pm
Forum: Graphics/GPU
Topic: [Question] Can i create TIM with multiple CLUT's?
Replies: 8
Views: 231

Re: [Question] Can i create TIM with multiple CLUT's?

I was meaning to say having a TIM containing a bunch of CLUTs as a 16-bit texture image. A CLUT is really just a 1 pixel high 16-bit texture that is no different to a 16-bit texture image. Technically a 16-bit TIM can contain a CLUT but its not really necessary to have a CLUT in one. Multiple CLUTs ...
by LameGuy64
January 8th, 2019, 3:25 pm
Forum: Graphics/GPU
Topic: [Question] Can i create TIM with multiple CLUT's?
Replies: 8
Views: 231

Re: [Question] Can i create TIM with multiple CLUT's?

You store the CLUTs as a regular 16-bit TIM file (ie. a TIM containing 8 CLUTs would be 256x8 for 8-bit CLUTs or 16x8 for 4-bit CLUTs) and then use its image coordinates on setClut. To select the other CLUTs simply increment the y coordinate from the coordinates where your TIM of CLUTs is positioned...
by LameGuy64
January 8th, 2019, 10:55 am
Forum: Graphics/GPU
Topic: [Question] Can i create TIM with multiple CLUT's?
Replies: 8
Views: 231

Re: [Question] Can i create TIM with multiple CLUT's?

So far there aren't any tools that support placing multiple CLUTs inside a single TIM. You could however create a 16-bit TIM containing multiple CLUT rows as a workaround.
by LameGuy64
December 22nd, 2018, 7:11 pm
Forum: General Chat / Messaging
Topic: .SYM files inside PS1 exe?
Replies: 4
Views: 695

Re: .SYM files inside PS1 exe?

Well, CodeWarrior also does not appear to store any symbol data inside of a PS-EXE either. Its possible those symbol strings you've found are just strings in some libraries used for debug messages. CodeWarrior would actually produce an ELF file (named as a .pse file) but it does not appear to contai...
by LameGuy64
December 20th, 2018, 11:58 am
Forum: Members Downloads
Topic: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)
Replies: 29
Views: 2888

Re: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)

The undefined values in the lower 2 bytes of tpri->code[0] are texture page coordinates which varies depending on the arguments specified on setTpagePri and the 4th byte being 0xe1 is the primitive code for setting a texture page which is also set by setTpagePri. I suppose you're unfamiliar with GPU...
by LameGuy64
December 18th, 2018, 12:59 am
Forum: Members Downloads
Topic: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)
Replies: 29
Views: 2888

Re: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)

nextpri points to a primitive buffer (in this case a fixed sized global array), usually to a spot where the next primitive should be written to. setTPagePri sets tpri->tag to 0x01000000 and tpri->code[0] to 0xe100xxxx. Reason I wanted to OR 0x200 in it is to set a bit that enables dithering but at o...
by LameGuy64
December 17th, 2018, 12:06 pm
Forum: Members Downloads
Topic: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)
Replies: 29
Views: 2888

Re: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)

Oh, so they're actually part of the optimizations? I didn't know it is that clever omitting variables that are never used elsewhere and turning very small functions into in-line code :oops:. somefunc() simply sets a global variable: void somefunc(int value) { global_var = value; } I decided to do an...
by LameGuy64
December 17th, 2018, 11:34 am
Forum: Members Downloads
Topic: LITELOAD - Yet another PS1 serial loader
Replies: 10
Views: 1878

Re: LITELOAD - Yet another PS1 serial loader

Why not use a simple bidirectional communications protocol where data is requested by the guest application on demand? It can be done through SioFS but the problem with that is the debugger always takes the received bytes first and therefore cannot be used with my debugger. I have thought of implem...
by LameGuy64
December 16th, 2018, 11:46 pm
Forum: Members Downloads
Topic: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)
Replies: 29
Views: 2888

Re: MinGW32 compiled GCC 7.2.0 Toolchain (mipsel-unknown-elf)

I've been experiencing some really annoying bugs with GCC 7.2.0 as of late, most notably when optimizations are specified. The most significant bug I've encountered is if you compile the following: void myfunc() { ival = 0; somefunc( ival ); do { ival++; ival = ival * 2; somefunc( ival ); somefunc( ...
by LameGuy64
December 14th, 2018, 1:46 pm
Forum: General Chat / Messaging
Topic: .SYM files inside PS1 exe?
Replies: 4
Views: 695

Re: .SYM files inside PS1 exe?

That's interesting, with the standard Programmer's Tool SDK the symbol data is usually generated to a separate file with a .sym file extension and symbols are typically not stored inside of a PS-EXE. It might be a PS-EXE created using CodeWarrior which uses its own compiler (MIPSPRO) and from what I...
by LameGuy64
December 14th, 2018, 12:42 pm
Forum: Members Downloads
Topic: LITELOAD - Yet another PS1 serial loader
Replies: 10
Views: 1878

Re: LITELOAD - Yet another PS1 serial loader

mcomms is pretty much LITELOAD's equivalent to catflap, even borrows some command line parameters from that. mcomms up texture1.tim 0x80100000 mcomms up texture2.tim 0x80110000 mcomms run program.exe You may want to set MC_DEVICE=<serial port> environment variable so you don't have to specify serial...