EpicAsian's Dreamcast Endeavours:D

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: EpicAsian's Dreamcast Endeavours:D

Post by BlueCrab »

epicasian wrote:I'm currently trying to try to display a punchthrough image and am getting strange runtime errors. I change everything you told me to, BlueCrab but I still don't know what is going wrong. If and when you have time, could you look at my source and tell me what's wrong?

Here is the image:
http://i203.photobucket.com/albums/aa16 ... 1288145963

And here is the code:
http://pastebin.com/zAg7GR5k
By default, KOS doesn't initialize any buffer space for the Punchthru list -- only the opaque and translucent lists are initialized by default.. You have to actually tell KOS to set up the punchthru list before you can use it.

Generally for doing that, you'd see something like this right above the romdisk init (outside of the main function):

Code: Select all

static pvr_init_params_t pvr_params = {
    /* Enable Opaque, Translucent, and Punchthru lists */
    { PVR_BINSIZE_16, PVR_BINSIZE_0, PVR_BINSIZE_16, PVR_BINSIZE_0,
      PVR_BINSIZE_16 },
    512 * 1024, /* 512 KB of vertex buffer space */
    0, /* Vertex DMA disabled */
    0  /* "FSAA" off */
};
Then, replace your pvr_init_defaults() with:

Code: Select all

pvr_init(&pvr_params);
I don't know if that will solve the entire problem (I don't really have time to run the code to find out, unfortunately), but it should at least be a step in the right direction.
User avatar
epicasian
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 23
Joined: Fri Mar 26, 2010 8:34 pm
Location: WoFoCo, KY
Has thanked: 0
Been thanked: 0

Re: EpicAsian's Dreamcast Endeavours:D

Post by epicasian »

I still couldn't get punchthroughs to work; as long as the translucent list doesn't draw as slow as DC SDL, I'm completely fine.
Image
Image
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: EpicAsian's Dreamcast Endeavours:D

Post by BlueCrab »

epicasian wrote:I still couldn't get punchthroughs to work; as long as the translucent list doesn't draw as slow as DC SDL, I'm completely fine.
No, its nowhere near as slow as SDL. You can probably put up several thousand translucent polygons and still be at 60FPS.
User avatar
BB Hood
DC Developer
DC Developer
Posts: 189
Joined: Fri Mar 30, 2007 12:09 am
Has thanked: 41 times
Been thanked: 10 times

Re: EpicAsian's Dreamcast Endeavours:D

Post by BB Hood »

maybe set

Code: Select all

vert.oargb = 0;
instead of

Code: Select all

vert.oargb = 1;
?
User avatar
epicasian
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 23
Joined: Fri Mar 26, 2010 8:34 pm
Location: WoFoCo, KY
Has thanked: 0
Been thanked: 0

Re: EpicAsian's Dreamcast Endeavours:D

Post by epicasian »

I tried changing that but nonetheless, it didn't work.
Image
Image
User avatar
Bouz
DCEmu Junior
DCEmu Junior
Posts: 46
Joined: Mon May 10, 2010 3:42 pm
Location: St. Bauzille de Putois (France)
Has thanked: 0
Been thanked: 0

Re: EpicAsian's Dreamcast Endeavours:D

Post by Bouz »

Hi all,

I see you are speaking about screen splitting (sorry for the late reply). A few month ago, I used screen splitting for the circuit editor of a car racing game I am working on.
The left part of the screen is displaying pieces of the circuit and the right part is displaying the circuit itself.
When dealing with 3D, I thing you are forced to use screen splitting to avoid polygones from one area to overlap the other one.
I am using KGL and the screen partition is made as follows:

Code: Select all

glEnable(GL_SCISSOR_TEST);
glScissor(LEFT_PANEL_WIDTH,0,SCREEN_WIDTH - LEFT_PANEL_WIDTH,SCREEN_HEIGHT);
circuit.Display(FALSE);
glDisable(GL_SCISSOR_TEST);
I don't think KGL does this the soft way, so there might be some API available for the PVR to handle screen splitting. It would be interesting to have a look at the KGL code for the GL_SCISSOR_TEST option.
User avatar
epicasian
DCEmu Fast Newbie
DCEmu Fast Newbie
Posts: 23
Joined: Fri Mar 26, 2010 8:34 pm
Location: WoFoCo, KY
Has thanked: 0
Been thanked: 0

Re: EpicAsian's Dreamcast Endeavours:D

Post by epicasian »

Hey guys,

I know it's been a while, but I've finally found time to get some actually programming done!:D

My question this time is an error when I'm trying to compile the DC Toolchain on Linux (Ubuntu to be exact).

This is what my error looks like:
cd gcc-4.5.2; patch -p1 < /home/tyler/dc/kos/utils/dc-chain/patches/gcc-4.5.2-kos.diff
/bin/sh: patch: not found
make: *** [/home/tyler/dc/kos/utils/dc-chain/patches/gcc-4.5.2-kos.diff] Error 127
I followed this guide, and it has worked thus far: http://dcemulation.org/?title=Configuri ... nder_Linux

I have GCC 4.4.3, and i tried both "make" and "make CC=gcc-3.4" on the guide.

All help is greatly appreciated!

(Sorry that I'm not able to decipher this error on my own, I'm kind of a Linux / Command Line scrub)
Image
Image
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5658
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: EpicAsian's Dreamcast Endeavours:D

Post by BlueCrab »

You're missing the patch program. I dunno what to install on Ubuntu to get it, but that's what you're missing.
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: EpicAsian's Dreamcast Endeavours:D

Post by Ex-Cyber »

The package name is just "patch".
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
Post Reply