Raycasting on msx2 screen 5

Página 1/27
| 2 | 3 | 4 | 5 | 6

Por ARTRAG

Enlighted (6280)

imagem de ARTRAG

10-08-2009, 00:17

http://www.student.kuleuven.be/~m0216922/CG/raycasting.html
Look at the CPP files in this tutorial,
anyone willing to compile them in some C for msx?

would it be doable?
IMHO it could work, maybe moving to fixpoint math.... but it can work

Anyone willing to start a poject for a FPS for msx?
;)

Entrar ou registrar-se para comentar

Por Vampier

Prophet (2297)

imagem de Vampier

10-08-2009, 03:13

Sounds cool enough

Por flyguille

Prophet (3029)

imagem de flyguille

10-08-2009, 04:54

cool Big smile!!!!!!!

Por ARTRAG

Enlighted (6280)

imagem de ARTRAG

10-08-2009, 13:28

ok, my msx2 skills are a bit rusty so i need some help
I need a function able to draw a vertical line of a given color
I know there is a box command that can be used for this purpose
the "byte" version is the fastest, so I'd like to use that, even if in
screen 5 this leads to 128 columns (but who cases if it works :-)

I did this:

struct commands  
        {
            uint    sx; 
            uint    sy;
            uint    dx; 
            uint    dy;
            uint    nx; 
            uint    ny;
            uchar   clr;
            uchar   arg;
            uchar   cmd;
        };
            
static struct commands  cmd;            

near void send_vdpcmd(struct commands  *cmd);

#asm
_send_vdpcmd:
        di                 ; set vdp regs pointer to 32
        ld  a, 32
        out (0x99),a
        ld  a, 17+128
        out (0x99),a
        ei

        ld  bc, 256*15+0x9B

        call _waitvdp
        
        ld    h,d
        ld    l,e        
        otir

        ret

_waitvdp:
        di
        ld 	a,2
        out (0x99),a
        ld 	a, 0x8f
        out (0x99),a

1:      in 	a,(0x99)
        rrca
        jp 	c, 1b

        xor a
        out (0x99),a
        ld 	a, 0x8f
        out (0x99),a
        ei
        ret
#endasm

////////////////////////////////////////////////////////////////////////////////
//GLOBAL VARIABLES//////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

int w = 256;
int h = 192;

void  screen(int a, int b, int c, char *p) {scr(a);};
void  verLine(int x, int y1, int y2, char color) 
{
	cmd.dx = x;
	cmd.dy = y1;
	cmd.nx = 1;
	cmd.ny = y2-y1;
	cmd.clr = color;
	cmd.arg = 0;
	cmd.cmd = 0xC0;
	send_vdpcmd(&cmd);
};

Is it correct?

Por ARTRAG

Enlighted (6280)

imagem de ARTRAG

10-08-2009, 13:29

Ps this is for the msx2doom ;-)

Por Bastiaan

Champion (332)

imagem de Bastiaan

10-08-2009, 14:17

it reminds me of something:

http://www.msx.org/forumtopic8968.html

Por ARTRAG

Enlighted (6280)

imagem de ARTRAG

10-08-2009, 16:53

OK
i did it, try your own doom on msx2/TR (better TR) here :

http://sites.google.com/site/testmsx/msx2-doom

In fixed point match it could maybe ...
who knows...
;)

Por ARTRAG

Enlighted (6280)

imagem de ARTRAG

10-08-2009, 19:13

Ah, just a note: the D{SCC}.ROM is based on the MOAM project so the music in background is from that game.
It is an unwanted sort of spoil actually.

If you want to do a walk in the maze use, the arrow keys and a TR (it goes in R800 mode by itself), or be very
very patient (unless your msx2 goes at 20MHz)

Smile

Por jltursan

Prophet (2193)

imagem de jltursan

10-08-2009, 19:30

Is the right ROM file?, seems that you've linked the wrong one...Wink

Por ARTRAG

Enlighted (6280)

imagem de ARTRAG

10-08-2009, 19:36

Por jltursan

Prophet (2193)

imagem de jltursan

10-08-2009, 20:07

Uh?, weird, I'm still seeing a text vertical-scroller...

Página 1/27
| 2 | 3 | 4 | 5 | 6