English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 27 June 2024, 20:11   #41
riker77
Registered User
 
Join Date: Oct 2012
Location: Germany
Posts: 24
Quote:
Originally Posted by klx300r View Post
same here (see vid below) ...what type of Pi you using?
I'm running the PiStrom32lite with a CM4 at 2.2GHz in my A1200.
riker77 is offline  
Old 28 June 2024, 14:06   #42
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,428
okay I've updated the double buffering and pixel rendering to use the same routines that I use for ScummVM RTG, should work fine now.
Attached Files
File Type: lha MesaGearsNova.lha (638.1 KB, 9 views)
NovaCoder is offline  
Old 28 June 2024, 16:48   #43
jeff b00toNic
Registered User
 
jeff b00toNic's Avatar
 
Join Date: Nov 2011
Location: Arnsberg Germany
Age: 45
Posts: 201
Now it runs well, if the background transition from black to white is intentional.

Are you planning something special to do with it?
jeff b00toNic is offline  
Old 28 June 2024, 19:42   #44
klx300r
Registered User
 
klx300r's Avatar
 
Join Date: Oct 2007
Location: ManCave, Canada
Posts: 1,646
Thumbs up

@ NovaCoder

this one is much better on PiStorm32-3A+

https://www.dropbox.com/scl/fi/06zag...6plr1jrsm&dl=0
klx300r is offline  
Old 28 June 2024, 19:48   #45
klx300r
Registered User
 
klx300r's Avatar
 
Join Date: Oct 2007
Location: ManCave, Canada
Posts: 1,646
Quote:
Originally Posted by riker77 View Post
I'm running the PiStrom32lite with a CM4 at 2.2GHz in my A1200.
thanks it's good to know for comparison sake btw I'm running PiStorm32 with a 3A+
klx300r is offline  
Old 28 June 2024, 23:26   #46
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,428
Quote:
Originally Posted by klx300r View Post
@ NovaCoder

this one is much better on PiStorm32-3A+

https://www.dropbox.com/scl/fi/06zag...6plr1jrsm&dl=0

Quote:
Originally Posted by jeff b00toNic View Post
Now it runs well, if the background transition from black to white is intentional.

Are you planning something special to do with it?
Cool

Yes it's intentional with the background.

I'm thinking about combining it with SDL 2 which will allow some more advanced ports. Would love to do a Half-life port, always wanted to do that one but you really need OpenGL and SDL 2 support for that. It would be a huge amount of work though, not sure if I have the time & energy these days.


Code comparison time...


Original Mesa:

Code:
struct amigamesa_context
{
	void *gl_ctx;                   /* the core library context */
	struct amigamesa_visual  *visual; /* the visual context */
	struct amigamesa_buffer  *buffer; /* the buffer context */

	struct amigamesa_context *share;

	unsigned long flags;                    /*0x1 = own visuel, 0x2 = own buffer
						  0x4 = forbid 3D HW, 0x8 = fullscreen mode */


	unsigned long pixel;                    /* current color index or RGBA pixel value */
	unsigned long clearpixel;       /* pixel for clearing the color buffers */

	/* etc... */
	struct Window *window;                  /* Not neaded if in dubbelbuff needed */                /* the Intuition window */
	struct RastPort *front_rp;      /* front rastport */
	struct RastPort *back_rp;               /* back rastport */
	int    SwapCounter;                     /* which buffer is active */
	UBYTE* FrontArray;                                      /* for multibuffering */
	UBYTE* BackArray;                                       /*a pen Array big as drawing area for use in dubelbuff mode*/
	struct RastPort *rp;                    /* current rastport */
	struct Screen *Screen;                  /* current screen*/
	struct TmpRas *tmpras;                  /* tmpras rastport */
	struct RastPort *temprp;
	struct DBufInfo *dbufinfo;              /* OS3.0 multibuffering */

	GLuint depth;                                           /* bits per pixel (1, 8, 24, etc) */
	GLuint bppix;                           /* bytes per pixel */
	GLuint bprow;                           /* bytes per row */
	GLuint fmt;                             /* color format */

	GLuint  width, height;                          /* drawable area */
	GLint           left, bottom;                           /* offsets due to window border */
	GLint           right, top;             /* right, top offsets, needed for correct resizing */
	GLint           RealWidth,RealHeight;   /* the drawingareas real size*/
	GLint           FixedWidth,FixedHeight; /* The internal buffer real size speeds up the drawing a bit*/
	long*           ColorTable;             /* LUT8 display: ARGB -> real pen conversion */
						/* ARGB display: ARGB -> GL pen conversion */
	long*           ColorTable2;            /* LUT8 display: table of allocated pens */
						/* ARGB display: GL pen -> ARGB conversion */
	UBYTE penconv[256];                     /* pen conversion from GL color to real color */
	UBYTE penconvinv[256];                  /* pen conversion from real color to GL color */
	UBYTE dtable[256];
	UBYTE bugfix[256];
	UBYTE *imageline;                                       /* One Line for WritePixelRow renders */
	GLuint *rgb_buffer;                                     /*back buffer when in RGBA mode OLD DElete?*/

	void (*InitDD)(void *  );                                                                  /* keep track of witch drawing rutines should be used */
	void (*Dispose) (struct amigamesa_context *c);          /* Use this when AmigaMesaDestroyContext is called */
	void (*SwapBuffer) (struct amigamesa_context *c);       /* Use this when AmigaMesaSwapBuffers is called */
	ULONG ColTable[256];
	ULONG ColTable2[256];
	ULONG oldFPU;                           /* old rounding mode */
	UBYTE pixelargb[4];
	ULONG specialalloc;
	UBYTE dmatrix[128+8];
	struct ScreenBuffer *sbuf1;              /* OS3.0 multibuffering */
	struct ScreenBuffer *sbuf2;              /* OS3.0 multibuffering */
	struct MsgPort* dbport;                  /* OS3.0 multibuffering */
	int drawbufferflag;                     /* GL double buffering support  */
	int readbufferflag;                     /*              "               */
	int backarrayflag;                      /*              "               */
	UBYTE* DrawBuffer;                      /*              "               */
	UBYTE* ReadBuffer;                      /*              "               */
	struct RastPort *back2_rp;              /* second back rastport */
	struct RastPort *draw_rp;
	void *hwdriver;                         /* hwdriver private structure */
	struct ScreenBuffer *sbuf3;             /* third screen buffer */
	struct ScreenBuffer *sbuf_initial;      /* initial screen buffer */

	struct timerequest *timerio;
	struct MsgPort *timerport;
};
My version:

Code:
struct amigamesa_context {
	GLcontext *gl_ctx; /* The core GL/Mesa context */
	GLvisual *gl_visual; /* Describes the buffers */
	GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers */

	GLuint depth; /* Bits per pixel (1, 8, 24, etc) */
	GLuint width, height; /* Drawable area */
	GLuint bppix; /* Bytes per pixel */
	GLuint bprow; /* Bytes per row */
	GLuint fmt; /* Color format */

	GLuint clear_color; /* Color for clearing the pixel buffer */
	GLubyte *back_buffer; /* Pixel buffer */

	// Amiga specific stuff.
	struct Window *hardware_window; /* Intuition window */
	struct Screen *hardware_screen; /* Intuition screen */
};
I'll probably slowly add more functionality to my hacked version (window support etc) so it will get more complicated (and therefore messy LoL).
Attached Files
File Type: c MesaTest.c (9.9 KB, 3 views)

Last edited by NovaCoder; Today at 07:23.
NovaCoder is offline  
Old 28 June 2024, 23:41   #47
klx300r
Registered User
 
klx300r's Avatar
 
Join Date: Oct 2007
Location: ManCave, Canada
Posts: 1,646
Thumbs up

Quote:
Originally Posted by NovaCoder View Post
Cool

I'm thinking about combining it with SDL 2 which will allow some more advanced ports. Depends if I have the time.

Awesome news
klx300r is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
AmiQuake new 68k Quake Port for AGA/RTG NovaCoder News 465 27 May 2024 10:12
Chocolate Doom port to 68K RTG NovaCoder News 34 22 February 2024 08:34
Grafx2 for Amiga OS 3.X (68K RTG) PerspexSphinx support.Apps 4 14 February 2022 07:17
Best open source, mod-able RTG-friendly FPS Engine running on 68k? eXeler0 Amiga scene 48 10 August 2016 23:38
68k + Picasso (RTG) Demos ?? Amiten Amiga scene 14 27 August 2013 17:39

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 13:14.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07884 seconds with 16 queries