27 June 2024, 20:11 | #41 |
Registered User
Join Date: Oct 2012
Location: Germany
Posts: 24
|
|
28 June 2024, 14:06 | #42 |
Registered User
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,429
|
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.
|
28 June 2024, 16:48 | #43 |
Registered User
Join Date: Nov 2011
Location: Arnsberg Germany
Age: 45
Posts: 204
|
Now it runs well, if the background transition from black to white is intentional.
Are you planning something special to do with it? |
28 June 2024, 19:42 | #44 |
Registered User
Join Date: Oct 2007
Location: ManCave, Canada
Posts: 1,646
|
@ NovaCoder
this one is much better on PiStorm32-3A+ https://www.dropbox.com/scl/fi/06zag...6plr1jrsm&dl=0 |
28 June 2024, 19:48 | #45 |
Registered User
Join Date: Oct 2007
Location: ManCave, Canada
Posts: 1,646
|
|
28 June 2024, 23:26 | #46 | ||
Registered User
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,429
|
Quote:
Quote:
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; }; 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 */ }; Last edited by NovaCoder; Yesterday at 07:23. |
||
28 June 2024, 23:41 | #47 |
Registered User
Join Date: Oct 2007
Location: ManCave, Canada
Posts: 1,646
|
|
Today, 06:45 | #48 |
Registered User
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,429
|
Added a cute little starfield demo..
I also got a more advanced demo working (featuring lighting and texture mapping) but it was very slow, seems to be too much for just the CPU when you push the more advanced effects. |
Currently Active Users Viewing This Thread: 2 (0 members and 2 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 |
|
|