English Amiga Board


Go Back   English Amiga Board > Other Projects > project.Amiga Game Factory

 
 
Thread Tools
Old 20 October 2018, 03:19   #101
gulliver
BoingBagged

 
Join Date: Aug 2007
Location: The South of nowhere
Age: 40
Posts: 1,745
Quote:
Originally Posted by NovaCoder View Post
Yep I'll be adding RTG support when it runs properly, it's pretty easy to add rtg
gulliver is offline  
Old 21 October 2018, 17:13   #102
Reido
Registered User

 
Join Date: Feb 2013
Location: Dublin/Ireland
Posts: 264
Quote:
Originally Posted by NovaCoder View Post
I've recently had some time to kill so I thought I'd revisit my old AGA port.
Great news, looking forward to testing!
Reido is offline  
Old 21 October 2018, 23:16   #103
AMike
Registered User
AMike's Avatar
 
Join Date: Jan 2007
Location: near Vienna/Austria
Posts: 135
Quote:
Originally Posted by NovaCoder View Post
I'll upload something to the zone for testing on real hardware when I get it working properly. Unfortunately I don't have a real Amiga anymore so I can only test with WinUAE these days.
Great that you are back. Looking forward for the RTG version.
AMike is offline  
Old 22 October 2018, 04:07   #104
turrican3
Moon 1969 = amiga 1985

turrican3's Avatar
 
Join Date: Apr 2007
Location: belgium
Age: 42
Posts: 3,334
Quote:
Originally Posted by NovaCoder View Post
I've recently had some time to kill so I thought I'd revisit my old AGA port. After spending time analysing the 0.74 source code I can see that the render pipeline is expensive. I'm currently working on a new build using a native Amiga render pipeline to see if I can get it usable for some (slow-paced) DOS games.

This will be based on v6.02 with various fixes from newer versions mixed in where performance isn't impacted too much.

I'll upload something to the zone for testing on real hardware when I get it working properly. Unfortunately I don't have a real Amiga anymore so I can only test with WinUAE these days.
hi Nova,
could you add the support of a second mouse,please ???
I'm happy to see you back !!
turrican3 is offline  
Old 24 October 2018, 05:35   #105
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,534
Thanks guys

Thought the coders might like to see the before and after shots

Original SDL based renderer:

PHP Code:

enum SCREEN_TYPES    

    
SCREEN_SURFACE,
    
SCREEN_SURFACE_DDRAW,
    
SCREEN_OVERLAY,
    
SCREEN_OPENGL
};

enum PRIORITY_LEVELS {
    
PRIORITY_LEVEL_LOWER,
    
PRIORITY_LEVEL_NORMAL,
    
PRIORITY_LEVEL_HIGHER,
    
PRIORITY_LEVEL_HIGHEST
};


struct SDL_Block {
    
bool active;                            //If this isn't set don't draw
    
bool updating;
    
struct {
        
Bit32u width;
        
Bit32u height;
        
Bitu flags;
        
GFX_Modes mode;
        
double scalex,scaley;
        
GFX_ResetCallBack reset;
    } 
draw;
    
bool wait_on_error;
    
struct {
        
Bit32u width,height,bpp;
        
bool fixed;
        
bool fullscreen;
        
bool doublebuf;
        
SCREEN_TYPES type;
        
SCREEN_TYPES want_type;
        
double hwscale;
    } 
desktop;
    
struct {
        
PRIORITY_LEVELS focus;
        
PRIORITY_LEVELS nofocus;
    } 
priority;
    
SDL_Rect clip;
    
SDL_Surface surface;
    
SDL_Overlay overlay;
    
SDL_cond *cond;
    
struct {
        
bool autolock;
        
bool autoenable;
        
bool requestlock;
        
bool locked;
        
Bitu sensitivity;
    } 
mouse;
};

static 
SDL_Block sdl;


<
SNIP>

bool GFX_StartUpdate(Bit8u * & pixels,Bitu pitch) {
    if (!
sdl.active || sdl.updating) return false;
    
sdl.updating=true;
    switch (
sdl.desktop.type) {
    case 
SCREEN_SURFACE:
        if (
SDL_MUSTLOCK(sdl.surface)) {
            if (
SDL_LockSurface(sdl.surface)) {
//                LOG_MSG("SDL Lock failed");
                
sdl.updating=false;
                return 
false;
            }
        }
        
pixels=(Bit8u *)sdl.surface->pixels;
        
pixels+=sdl.clip.y*sdl.surface->pitch;
        
pixels+=sdl.clip.x*sdl.surface->format->BytesPerPixel;
        
pitch=sdl.surface->pitch;
        return 
true;
#if defined(HAVE_DDRAW_H) && defined(WIN32)
    
case SCREEN_SURFACE_DDRAW:
        if (
SDL_LockSurface(sdl.blit.surface)) {
//            LOG_MSG("SDL Lock failed");
            
sdl.updating=false;
            return 
false;
        }
        
pixels=(Bit8u *)sdl.blit.surface->pixels;
        
pitch=sdl.blit.surface->pitch;
        return 
true;
#endif
    
case SCREEN_OVERLAY:
        
SDL_LockYUVOverlay(sdl.overlay);
        
pixels=(Bit8u *)*(sdl.overlay->pixels);
        
pitch=*(sdl.overlay->pitches);
        return 
true;
#if C_OPENGL
    
case SCREEN_OPENGL:
        
pixels=(Bit8u *)sdl.opengl.framebuf;
        
pitch=sdl.opengl.pitch;
        return 
true;
#endif
    
}
    return 
false;
}

void GFX_EndUpdate(void) {
    
int ret;
    if (!
sdl.updating) return;
    
sdl.updating=false;
    switch (
sdl.desktop.type) {
    case 
SCREEN_SURFACE:
        if (
SDL_MUSTLOCK(sdl.surface)) {
            
SDL_UnlockSurface(sdl.surface);
        }
        
SDL_Flip(sdl.surface);
        break;
#if defined(HAVE_DDRAW_H) && defined(WIN32)
    
case SCREEN_SURFACE_DDRAW:
        if (
SDL_MUSTLOCK(sdl.blit.surface)) {
            
SDL_UnlockSurface(sdl.blit.surface);
        }
        
ret=IDirectDrawSurface3_Blt(
            
sdl.surface->hwdata->dd_writebuf,&sdl.blit.rect,
            
sdl.blit.surface->hwdata->dd_surface,0,
            
DDBLT_WAITNULL);
        switch (
ret) {
        case 
DD_OK:
            break;
        case 
DDERR_SURFACELOST:
            
IDirectDrawSurface3_Restore(sdl.blit.surface->hwdata->dd_surface);
            break;
        default:
            
LOG_MSG("DDRAW:Failed to blit, error %X",ret);
        }
        
SDL_Flip(sdl.surface);
        break;
#endif
    
case SCREEN_OVERLAY:
        
SDL_UnlockYUVOverlay(sdl.overlay);
        
SDL_DisplayYUVOverlay(sdl.overlay,&sdl.clip);
        break;
#if C_OPENGL
    
case SCREEN_OPENGL:
        
glBindTexture(GL_TEXTURE_2Dsdl.opengl.texture);
        
glTexSubImage2D(GL_TEXTURE_2D000
                
sdl.draw.widthsdl.draw.heightGL_BGRA_EXT,
                
GL_UNSIGNED_INT_8_8_8_8_REVsdl.opengl.framebuf);
        
glCallList(sdl.opengl.displaylist);
        
SDL_GL_SwapBuffers();
        break;
#endif

    
}
}


void GFX_SetPalette(Bitu start,Bitu count,GFX_PalEntry entries) {
    
/* I should probably not change the GFX_PalEntry :) */
    
if (sdl.surface->flags SDL_HWPALETTE) {
        if (!
SDL_SetPalette(sdl.surface,SDL_PHYSPAL,(SDL_Color *)entries,start,count)) {
            
E_Exit("SDL:Can't set palette");
        }
    } else {
        if (!
SDL_SetPalette(sdl.surface,SDL_LOGPAL,(SDL_Color *)entries,start,count)) {
            
E_Exit("SDL:Can't set palette");
        }
    }
}


static 
Bit8u laltstate SDL_KEYUP;
static 
Bit8u raltstate SDL_KEYUP;


void GFX_Events() {
    
SDL_Event event;
    while (
SDL_PollEvent(&event)) {
        switch (
event.type) {
        case 
SDL_ACTIVEEVENT:
            if (
event.active.state SDL_APPINPUTFOCUS) {
                if (
event.active.gain) {
                    if (
sdl.desktop.fullscreen && !sdl.mouse.locked)
                        
CaptureMouse();    
                    
SetPriority(sdl.priority.focus);
                } else {
                    if (
sdl.mouse.locked
                        
CaptureMouse();    
                    
SetPriority(sdl.priority.nofocus);
                }
            }
            break;
        case 
SDL_MOUSEMOTION:
            
HandleMouseMotion(&event.motion);
            break;
        case 
SDL_MOUSEBUTTONDOWN:
        case 
SDL_MOUSEBUTTONUP:
            
HandleMouseButton(&event.button);
            break;
        case 
SDL_VIDEORESIZE:
//            HandleVideoResize(&event.resize);
            
break;
        case 
SDL_QUIT:
            throw(
0);
            break;
#ifdef WIN32
        
case SDL_KEYDOWN:
        case 
SDL_KEYUP:
            
// ignore event alt+tab
            
if (event.key.keysym.sym==SDLK_LALTlaltstate event.key.type;
            if (
event.key.keysym.sym==SDLK_RALTraltstate event.key.type;
            if (((
event.key.keysym.sym==SDLK_TAB)) &&
                ((
laltstate==SDL_KEYDOWN) || (raltstate==SDL_KEYDOWN))) break;
#endif

        
default:
            
void MAPPER_CheckEvent(SDL_Event event);
            
MAPPER_CheckEvent(&event);
        }
    }


New native AGA version:

PHP Code:

/** Global Hardware window */
static struct Window *_hardwareWindow NULL;


/** Hardware screen */
static struct Screen *_hardwareScreen NULL;


// Hardware double buffering.
static struct ScreenBuffer *_hardwareScreenBuffer[2];
static 
BYTE _currentScreenBuffer 0;



// AGA C2P.
static void *c2p[2] = {NULLNULL};

static 
UWORD emptypointer[] = {
  
0x00000x0000,    /* reserved, must be NULL */
  
0x00000x0000,     /* 1 row of image data */
  
0x00000x0000    /* reserved, must be NULL */
};

 

// These settings are for PAL HIGH RES!
#define AGA_VIDEO_DEPTH         8
#define AGA_MAX_VIDEO_WIDTH     640
#define AGA_MAX_VIDEO_HEIGHT    512



struct AGA_Block {
    
bool active;                            //If this isn't set don't draw
    
struct {
        
Bit32u width;
        
Bit32u height;
    } 
draw;
    
    
Bit8u surface;
};

static 
AGA_Block aga;




void GFX_SetTitle(Bits cycles,Bits frameskip,bool paused){
    
// TODO - will be used by RTG version.
}



static 
struct ScreenCreateHardwareScreen(ULONG modeIdint widthint height) {
    return 
OpenScreenTags(NULL,
                     
SA_DepthAGA_VIDEO_DEPTH,
                     
SA_DisplayIDmodeId,
                     
SA_Top0,
                     
SA_Left0,
                     
SA_Widthwidth,
                     
SA_Heightheight,
                     
SA_TypeCUSTOMSCREEN,
                     
SA_QuietTRUE,
                     
SA_ShowTitleFALSE,
                     
SA_DraggableFALSE,
                     
SA_ExclusiveTRUE,
                     
SA_AutoScrollFALSE,
                     
TAG_END);
}

static 
struct WindowCreateHardwareWindow(int widthint height) {
    return 
OpenWindowTags(NULL,
                          
WA_Left0,
                        
WA_Top0,
                        
WA_Widthwidth,
                        
WA_Heightheight,
                        
SA_AutoScrollFALSE,
                        
WA_CustomScreen, (ULONG)_hardwareScreen,
                        
WA_BackdropTRUE,
                        
WA_BorderlessTRUE,
                        
WA_DragBarFALSE,
                        
WA_ActivateTRUE,
                        
WA_SimpleRefreshTRUE,
                        
WA_NoCareRefreshTRUE,
                        
WA_ReportMouseTRUE,
                        
WA_RMBTrapTRUE,
                          
WA_IDCMPIDCMP_RAWKEY|IDCMP_MOUSEMOVE|IDCMP_MOUSEBUTTONS,
                          
TAG_END);  
}

static 
void GFX_ResetMode() {
    
aga.draw.width=0;
    
aga.draw.height=0;

    if (
aga.surface) {
        
free(aga.surface);
        
aga.surface NULL;
    }

    if (
_hardwareWindow) {
        
ClearPointer(_hardwareWindow);
        
CloseWindow(_hardwareWindow);
        
_hardwareWindow NULL;
    }

    if (
_hardwareScreenBuffer[0]) {
        
ChangeScreenBuffer (_hardwareScreen_hardwareScreenBuffer[0]);
        
WaitTOF();
        
WaitTOF();
        
FreeScreenBuffer (_hardwareScreen_hardwareScreenBuffer[0]);
        
_hardwareScreenBuffer[0] = NULL;
    }

    if (
_hardwareScreenBuffer[1]) {
        
FreeScreenBuffer (_hardwareScreen_hardwareScreenBuffer[1]);
        
_hardwareScreenBuffer[1] = NULL;
    }


    if (
_hardwareScreen) {
        
CloseScreen(_hardwareScreen);
        
_hardwareScreen NULL;
    }

    if (
c2p[0]) {
        
c2p8_deinit_stub(c2p[0]);
        
c2p[0] = NULL;
    }

    if (
c2p[1]) {
        
c2p8_deinit_stub(c2p[1]);
        
c2p[1] = NULL;
    }
    
    
aga.active false;
}
 

void GFX_SetSize(Bitu widthBitu height) {
    
ULONG modeId INVALID_ID;
    
DisplayInfoHandle handle;
    
struct DisplayInfo dispinfo;
    
struct DimensionInfo dimsinfo;
    
#ifdef C_DEBUG        
    
LOG_DEBUG("GFX_SetSize(width=%d, height=%d)\n"widthheight);
#endif

    // Check args.
    
if (width == 0) {
        
LOG_ERROR("Width cannot be zero");
        
E_Exit("Failed to create a rendering output");
    }
    
    if (
height == 0) {
        
LOG_ERROR("Height cannot be zero");
        
E_Exit("Failed to create a rendering output");
    }
    
       if (
width AGA_MAX_VIDEO_WIDTH) {
        
LOG_ERROR("Width cannot be greater than %d"AGA_MAX_VIDEO_WIDTH);
        
E_Exit("Failed to create a rendering output");
    }

    if (
height AGA_MAX_VIDEO_HEIGHT) {
        
LOG_ERROR("Height cannot be greater than %d"AGA_MAX_VIDEO_HEIGHT);
        
E_Exit("Failed to create a rendering output");
    }
    
    if ((
aga.draw.width == width) && (aga.draw.height == height)) {
        
// Nothing to do...
#ifdef C_DEBUG
        
LOG_DEBUG("GFX_SetSize: Skipping pointless resolution switch");
#endif
        
return;
    }

    
// Free any existing mode.
    
GFX_ResetMode();
    
    
    
// Reset.
    
aga.draw.width=width;
    
aga.draw.height=height;

    
// Automatically choose the best mode.
    
modeId BestModeID(BIDTAG_NominalWidthwidth,
                    
BIDTAG_NominalHeightheight,
                    
BIDTAG_DesiredWidthwidth,
                    
BIDTAG_DesiredHeightheight,
                    
BIDTAG_DepthAGA_VIDEO_DEPTH,
                    
BIDTAG_MonitorIDPAL_MONITOR_ID,
                    
TAG_END);


    
// Verify the mode choosen.
    
if (modeId != INVALID_ID) {
        if ((
handle FindDisplayInfo(modeId)) == NULL) {
            
LOG_ERROR("Couldn't find Display Info for requested mode");
             
E_Exit("Failed to create a rendering output");
        }

        if (
GetDisplayInfoData(handle, (UBYTE *)&dispinfosizeof(dispinfo), DTAG_DISP,0) == 0) {
            
LOG_ERROR("Couldn't get Display Info Data for requested mode");
             
E_Exit("Failed to create a rendering output");
        }

        if (
GetDisplayInfoData(handle, (UBYTE *)&dimsinfosizeof(dimsinfo), DTAG_DIMS0) == 0) {
            
LOG_ERROR("Couldn't get Display Info Data for requested mode");
             
E_Exit("Failed to create a rendering output");
        }

        if (
dimsinfo.MaxDepth != AGA_VIDEO_DEPTH) {
           
modeId INVALID_ID;
        }

        if ((
dimsinfo.Nominal.MaxX 1) != width) {
           
modeId INVALID_ID;
        }

        if ((
dimsinfo.Nominal.MaxY 1) < height) {
           
modeId INVALID_ID;
        }
    }

    if (
modeId == INVALID_ID) {
        
LOG_ERROR("Couldn't find a Screen Mode for the requested resolution (%d * %d)\n"widthheight);
        
E_Exit("Failed to create a rendering output");
    }
    
    
    
_hardwareScreen CreateHardwareScreen(modeIdwidthheight);
    if (!
_hardwareScreen ) {
        
LOG_ERROR("Couldn't create a Hardware Screen for the requested mode");
        
E_Exit("Failed to create a rendering output");
    }     
    
    
// Setup double buffering.
    
_hardwareScreenBuffer[0] = AllocScreenBuffer (_hardwareScreenNULLSB_SCREEN_BITMAP);
    if (!
_hardwareScreenBuffer[0]) {
        
LOG_ERROR("Couldn't set up double buffering for the requested mode");
        
E_Exit("Failed to create a rendering output");
    }
    
    
_hardwareScreenBuffer[1] = AllocScreenBuffer (_hardwareScreenNULL0);    
    if (!
_hardwareScreenBuffer[1]) {
        
LOG_ERROR("Couldn't set up double buffering for the requested mode");
        
E_Exit("Failed to create a rendering output");
    }


    
_currentScreenBuffer 1;

    
// Setup C2P.    
    
c2p[0] = c2p8_reloc_stub(_hardwareScreenBuffer[0]->sb_BitMap);
    
c2p[1] = c2p8_reloc_stub(_hardwareScreenBuffer[1]->sb_BitMap);
    
    
    
// Create the hardware window.
    
_hardwareWindow CreateHardwareWindow(widthheight);
    if (!
_hardwareWindow) {
        
LOG_ERROR("Couldn't create a Hardware Window for the requested mode");
        
E_Exit("Failed to create a rendering output");
    }
    
    
SetPointer(_hardwareWindowemptypointer1100);
    
    
// Create a new chunky back buffer.
    
aga.surface = (Bit8u *)malloc(width height);
    if (!
aga.surface) {
        
LOG_ERROR("Couldn't allocate buffer for requested mode");
        
E_Exit("Failed to create a rendering output");
    }

    
memset(aga.surface0width height);
    
    
    
// Good to go!
    
aga.active true;
}

void GFX_UpdatePalette(Bitu numberOfEntriesBitu paletteDirtyStart,  GFX_PalEntry currentPalette) {

    
int i;
    
ULONG  agaPalette[numberOfEntries*2];
    
    if (
aga.active) {
        for ( 
i=0numberOfEntriesi++ ) {
            
agaPalette[i*3+1] = currentPalette[paletteDirtyStart i].r<<24;
            
agaPalette[i*3+2] = currentPalette[paletteDirtyStart i].g<<24;
            
agaPalette[i*3+3] = currentPalette[paletteDirtyStart i].b<<24;
        }
    
        
agaPalette[0] = (numberOfEntries << 16) + paletteDirtyStart;
    
        
// Terminator: NEEDED
        
agaPalette[((numberOfEntries 3) + 1)] = 0x00000000;
    
        
LoadRGB32(&_hardwareScreen->ViewPortagaPalette);
    }
}

bool GFX_StartUpdate(Bit8u * & pixels) {
    if (!
aga.active) {
        
// Just in case GFX_SetSize() hasn't been called yet.
       
return false;
    }

     
pixels aga.surface;

     return 
true;
}

void GFX_EndUpdate(void) {
    
c2p8_stub(c2p[_currentScreenBuffer], _hardwareScreenBuffer[_currentScreenBuffer]->sb_BitMap, (UBYTE*)aga.surface, (aga.draw.width aga.draw.height));

    if (
ChangeScreenBuffer(_hardwareScreen_hardwareScreenBuffer[_currentScreenBuffer])) {
        
// Flip.
       
_currentScreenBuffer _currentScreenBuffer 1;
    }
}


void GFX_Events() {
    if (
aga.active) {       
        
struct IntuiMessage *imsg;
        
        while (
imsg = (struct IntuiMessage *)GetMsg(_hardwareWindow->UserPort)) {
    
            
ReplyMsg((struct Message *)imsg);
     
            switch (
imsg->Class) {  
                case 
IDCMP_MOUSEMOVE:
                    
// TODO
                    
break;
     
    
                case 
IDCMP_MOUSEBUTTONS:
                    
// TODO
                    
break;
 
 
                case 
IDCMP_RAWKEY:
                    
int code imsg->Code;
    
    
                    
bool pressed = (code IECODE_UP_PREFIX) ? false true;
    
                    
code &= ~IECODE_UP_PREFIX;
                    
                    
    
                    
KEYBOARD_AddKey(keycode_lookup[code], pressed);
            }
        }
    }    
}

static 
void GUI_ShutDown(Section sec) {
    
LOG_DEBUG("GUI shutdown called");

    
// Free any existing mode.
    
GFX_ResetMode();

NovaCoder is offline  
Old 24 October 2018, 16:02   #106
turrican3
Moon 1969 = amiga 1985

turrican3's Avatar
 
Join Date: Apr 2007
Location: belgium
Age: 42
Posts: 3,334
Sorry for not to be a coder (really),
could you explain what you did ???
turrican3 is offline  
Old 25 October 2018, 02:17   #107
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,534
Quote:
Originally Posted by turrican3 View Post
Sorry for not to be a coder (really),
could you explain what you did ???
I hacked it

Basically I removed all unnecessary code and cleaned it up to make it look pretty (which should improve performance hopefully).

In the zone is a rough Alpha build of version 0.69, can someone with real hardware compare it to the version 0.74 in the same ZIP file. I've included the DOTT DOS VGA demo in the same ZIP file.

Both config files 0.69 an 0.74 are the same and both are built to target 040's.

Note that sound and mouse input is disabled on 0.69 at the moment (very early build)

Last edited by NovaCoder; 25 October 2018 at 08:51.
NovaCoder is offline  
Old 25 October 2018, 09:26   #108
Reido
Registered User

 
Join Date: Feb 2013
Location: Dublin/Ireland
Posts: 264
Thanks Nova! I'll test this this evening A1260/80mhz 64mb

Video of 0.69 build:
[ Show youtube player ]

Video of 0.74 build:
[ Show youtube player ]

Video of original DosBox__AGA
[ Show youtube player ]

Last edited by Reido; 25 October 2018 at 18:15.
Reido is offline  
Old 25 October 2018, 10:16   #109
trixster
Guru Meditating

 
Join Date: Jun 2014
Location: England
Posts: 1,207
I'll do some more testing this weekend too
trixster is offline  
Old 25 October 2018, 14:11   #110
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,534
Cool

I've managed to get the executable size down from 24 MB to about 8 MB and I should be able to get it to about 6 MB.

It's still very rough and buggy BTW
NovaCoder is offline  
Old 25 October 2018, 14:33   #111
1time
Amiga Lover

1time's Avatar
 
Join Date: Jan 2010
Location: Stockholm / Sweden
Age: 41
Posts: 611
NovaCoder: really nice work. This will be really appreciated!
1time is offline  
Old 25 October 2018, 17:40   #112
turrican3
Moon 1969 = amiga 1985

turrican3's Avatar
 
Join Date: Apr 2007
Location: belgium
Age: 42
Posts: 3,334
hi nova i tested it with winuae,I just replaced your old dosboxaga with the new one.
error 80000008.
A privilege error ??? I tried without fpu but no luck.
turrican3 is offline  
Old 25 October 2018, 18:16   #113
Reido
Registered User

 
Join Date: Feb 2013
Location: Dublin/Ireland
Posts: 264
Tested, see post #108
Reido is offline  
Old 25 October 2018, 23:08   #114
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,534
Quote:
Originally Posted by Reido View Post
Tested, see post #108
Thanks for the videos, that really helps me to see how they run. Screen update routine looks very different and seems to be skipping less frames on v0.69 but the core looks slightly slower than 0.74 for some reason.

I'll see if I can do anything to make it faster, I'm sure there's some more speed in the code that can be unlocked.


Update: OK, tried again with v0.74.010. In the Zone (compiled for 060 this time).

On a real Amiga you will need to play around with the number of cycles, if you set it too high it will cause stalling (note - max and auto aren't working properly).

Original exe was 26MB, now down to 2MB

Last edited by NovaCoder; 06 November 2018 at 05:15.
NovaCoder is offline  
Old 06 November 2018, 05:16   #115
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,534
v0.74.011 now in the zone with optimized cpu loop with gives me better results in WinUAE.

I've managed to break the EGA code somehow, only VGA is working.

I think to be able to run something like DOTT properly you'll need to set it at least 3000 cycles but if your CPU stalls it will actually run better at less than 3000.
NovaCoder is offline  
Old 07 November 2018, 02:36   #116
Reido
Registered User

 
Join Date: Feb 2013
Location: Dublin/Ireland
Posts: 264
Top work Nova! I'm away for a day or two so should be able to test soon.
Reido is offline  
Old 07 November 2018, 02:52   #117
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,534
Quote:
Originally Posted by Reido View Post
Top work Nova! I'm away for a day or two so should be able to test soon.
No worries, mate

I'll keep uploading newer versions to the Zone as I go..

I've got an idea about optimizing the core using GCC 6, not much else I can do after that to improve performance.

Check out the improvement to video performance.
Attached Thumbnails
Click image for larger version

Name:	v74_old.jpg
Views:	98
Size:	228.1 KB
ID:	60669   Click image for larger version

Name:	v74_012.jpg
Views:	80
Size:	186.7 KB
ID:	60670   Click image for larger version

Name:	v74_016.jpg
Views:	70
Size:	231.0 KB
ID:	60708  

Last edited by NovaCoder; 08 November 2018 at 02:13.
NovaCoder is offline  
Old 07 November 2018, 23:56   #118
AMike
Registered User
AMike's Avatar
 
Join Date: Jan 2007
Location: near Vienna/Austria
Posts: 135
I've made a quick'n dirty test with the latest version - looks good But we need more horsepower.
Attached Thumbnails
Click image for larger version

Name:	IMG_20181107_104441-600x1067.jpg
Views:	91
Size:	97.0 KB
ID:	60702   Click image for larger version

Name:	IMG_20181107_104636-600x1067.jpg
Views:	76
Size:	85.4 KB
ID:	60703  
AMike is offline  
Old 08 November 2018, 00:45   #119
NovaCoder
Registered User
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 3,534
Cool, is it any faster than than the build on AmiNet?

You are correct about needing more horsepower! It dawned on my last night (I'm a bit slow) that even if I've improved the rendering performance by 100% it will only mean a real world improvement of 33% because of the frame skipping (3 frame skips seems perfect to me, the original AmiNet release was set to 10 which is too high). And that 33% render performance will be less overall because rendering the image might only be 10% of the entire frame time as most of the time will be taken to actually emulate the X86 CPU.

I've heard rumors that the Vampire A1200 exists now? Maybe that will finally provide enough CPU power to make this port usable.

I've done pretty much everything I can to make this thing more efficient for real hardware but I'm out of ideas now. I'm just impressed with myself that I reduced the executable size down from over 20 MB of the the original SDL build to 2 MB using native code which is much more 'Amiga' like

I've tried using GGC 6 to improve performance but can't get it to build anything that runs

Last edited by NovaCoder; 08 November 2018 at 02:07.
NovaCoder is offline  
Old 08 November 2018, 05:17   #120
Pyromania
Moderator

Pyromania's Avatar
 
Join Date: Jan 2002
Location: Chicago, IL
Posts: 1,913
Go NovaCoder, go!
Pyromania 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
DosBox v0.74 AGA 68k Port NovaCoder Amiga scene 20 07 June 2018 03:17
[ongoing] Descent DXX-Rebirth AGA (v0.57.3) NovaCoder project.Amiga Game Factory 49 09 January 2018 04:39
68k SoftCore development for DosBox AGA NovaCoder Coders. Asm / Hardware 0 18 February 2013 07:04
KG's HOL problems (Ongoing) killergorilla HOL data problems 102 24 April 2011 13:34
Is this still an ongoing project? garyg AMR suggestions and feedback 17 04 October 2010 23:25

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 03:03.


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