English Amiga Board


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

 
 
Thread Tools
Old 21 September 2018, 17:24   #221
Raybeez
Registered User
 
Raybeez's Avatar
 
Join Date: Nov 2014
Location: Gdansk / Poland
Age: 43
Posts: 4
Understood, if I will find any help I will write You.
Raybeez is offline  
Old 23 September 2018, 17:53   #222
zzbylu
Saberman
 
zzbylu's Avatar
 
Join Date: Dec 2016
Location: Kielce/Poland
Posts: 326
HoMM II on the real Amiga 1200/030 - gameplay:
[ Show youtube player ]
zzbylu is offline  
Old 23 September 2018, 23:54   #223
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,516
Beside the 128 megabytes and the 50 mhz FPU that is mostly my A1200 config in italy (viper EC030/42mhz+FPU+32 MB ram) - now Meynaf would go mad at me more - since i still need to finish all audio tracks - but i wonder if that code could be a bit optimized, in-field graphics could be reduced of colors, audio rediced to lower rate or the C2P could use an approach similar to shapeshifter EVD - but that is just me since am no coder
saimon69 is offline  
Old 24 September 2018, 09:56   #224
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,322
Quote:
Originally Posted by saimon69 View Post
Beside the 128 megabytes and the 50 mhz FPU that is mostly my A1200 config in italy (viper EC030/42mhz+FPU+32 MB ram) - now Meynaf would go mad at me more - since i still need to finish all audio tracks - but i wonder if that code could be a bit optimized, in-field graphics could be reduced of colors, audio rediced to lower rate or the C2P could use an approach similar to shapeshifter EVD - but that is just me since am no coder
Of course the code can still be optimised, but not in the ways you suggest.

Reducing colors isn't realistic because many effects expect 256 colors, and these particular 256 colors. There is notably palette cycling that would fail miserably, shadowing done by reading on-screen pixels and darkening them, etc.

Decreasing the rate of audio would only bring quality loss - audio does not currently take significant cpu time.

And the C2P already updates partial screen regions (else it would be real damned slow, believe me - even the mouse pointer would be so sluggish you'd want to just throw the game !).

But it's C++, and the code is largely sub-optimal.
Some parts have been rewritten in asm already.
However it's basically huge...
meynaf is online now  
Old 25 September 2018, 14:51   #225
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Quote:
Originally Posted by meynaf View Post
This is in theory possible, but I have no knowledge about these. The game has mainly been made for A1200/030 with just AGA.

Last version has had some code cleanup in this area (c2p in include file rather than being buried deep in the game itself) so now it's just a matter of how to use these graphics cards.
If someone can give me simple code for handling some (often partial) copy of 640x480x8 chunky frame buffer to the video mem, then i might do this.
Also i need to setup this under Winuae so i can test if the code works.
You would need this kind of thing..

PHP Code:
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/graphics.h>

#include <cybergraphics.h>
#include <proto/cybergraphics.h>
 
struct Library *CyberGfxBase NULL;


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


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



CyberGfxBase OpenLibrary ("cybergraphics.library"0);
if (
CyberGfxBase == NULL) {
    
SDL_SetError("Can't open cybergraphics.library\n");
    return -
1;
}  

<
SNIP Open screen and windowchoose display mode>    
    
static 
void RTG_UpdateRects(int numrectsSDL_Rect *rects)
{
    
int i;
    
Sint16 dirtyStartdirtyEnd;
    
UBYTEsrc;
    
UBYTE *base_address;
    
APTR video_bitmap_handle NULL;
        

    
// Seed.
    
dirtyStart SDL_VideoSurface->h;
    
dirtyEnd 0;
    
    
    
// Find dirty strip extents.
    
for (0numrectsi++) {
        
SDL_Rect *rects i;
        if (!
r) {
          continue;
        }

        if (
r->dirtyStart) {
            
dirtyStart r->y;
        }
        
        if ((
r->r->h) > dirtyEnd) {
            
dirtyEnd = (r->r->h);
        }
    }

              
    
src = (UBYTE*)SDL_VideoSurface->pixels + (dirtyStart SDL_VideoSurface->w);
    
     
    
// Check whether the palette was changed.
    
if (_paletteDirtyEnd != 0) {
        
RTG_updatePalette();
    }
        
    
    
video_bitmap_handle LockBitMapTags(_hardwareScreen->ViewPort.RasInfo->BitMap,
                                         
LBMI_BASEADDRESS, (ULONG)&base_address,
                                         
TAG_DONE);
    if (
video_bitmap_handle) {
        
base_address = (base_address + (dirtyStart SDL_VideoSurface->w));
        
CopyMemQuick(srcbase_address, (SDL_VideoSurface->* (dirtyEnd dirtyStart)));
    }

    if (
video_bitmap_handle) {
        
UnLockBitMap (video_bitmap_handle);
    }

NovaCoder is offline  
Old 25 September 2018, 15:06   #226
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,322
Quote:
Originally Posted by NovaCoder View Post
<SNIP - Open screen and window, choose display mode>
That part may well be the biggest problem, in fact.


Quote:
Originally Posted by NovaCoder View Post
Code:
    // Check whether the palette was changed.
    if (_paletteDirtyEnd != 0) {
        RTG_updatePalette();
    }
How to transmit actual palette data ?
meynaf is online now  
Old 25 September 2018, 15:46   #227
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Quote:
Originally Posted by meynaf View Post
That part may well be the biggest problem, in fact.



How to transmit actual palette data ?
PHP Code:
int RTG_SetVideoMode(int widthint heightint bppUint32 flags)
{
    
ULONG modeId INVALID_ID;

    
 
    
// Automatically choose the best mode.
    
modeId BestCModeIDTags(
                
CYBRBIDTG_Depthbpp,
                
CYBRBIDTG_NominalWidthwidth,
                
CYBRBIDTG_NominalHeightheight,
                
TAG_DONE);


    
// Verify the mode choosen.
    
if (modeId != INVALID_ID) {
        if (
GetCyberIDAttr(CYBRIDATTR_DEPTHmodeId) != bpp) {
            
modeId INVALID_ID;
        }
    
        if (
GetCyberIDAttr(CYBRIDATTR_WIDTHmodeId) != width) {
           
modeId INVALID_ID;
        }
    
        if (
GetCyberIDAttr(CYBRIDATTR_HEIGHTmodeId) != height) {
           
modeId INVALID_ID;
        }
    }

    if (
modeId == INVALID_ID) {
        
SDL_SetError("Couldn't find a CyberGFX Screen for requested mode");
        return(-
1);
    }
    
    
// Create the hardware screen.
    
_hardwareScreen CreateHardwareScreen(modeIdwidthheightbpp);
    if (!
_hardwareScreen ) {
        
SDL_SetError("Couldn't create a Hardware Screen for requested mode");
        return(-
1);
    }
    

     
    
_hardwareWindow CreateHardwareWindow(widthheight);
    if (!
_hardwareWindow) {
        
SDL_SetError("Couldn't create a Hardware Window for requested mode");
        return(-
1);
    }                
   
    



    
/* We're done */
    
return(1);

PHP Code:
static struct ScreenCreateHardwareScreen(ULONG modeIdint widthint heightint depth) {

    return 
OpenScreenTags(NULL,
                     
SA_Depthdepth,
                     
SA_DisplayIDmodeId,
                     
SA_Top0,
                     
SA_Left0,
                     
SA_Widthwidth,
                     
SA_Heightheight,
                     
SA_TypeCUSTOMSCREEN,
                     
SA_QuietTRUE,
                     
SA_ShowTitleFALSE,
                     
SA_DraggableFALSE,
                     
SA_ExclusiveTRUE,
                     
SA_AutoScrollFALSE,
                     
TAG_DONE);        
}

static 
struct WindowCreateHardwareWindow(int widthint height) {

    return 
OpenWindowTags(NULL,
                      
WA_Left0,
                    
WA_Top0,
                    
WA_Widthwidth,
                    
WA_Heightheight,
                    
WA_PubScreen, (ULONG)_hardwareScreen,
                    
WA_BackdropFALSE,
                    
WA_BorderlessFALSE,
                    
WA_ActivateTRUE,
                    
WA_SimpleRefreshTRUE,
                    
WA_NoCareRefreshTRUE,
                    
WA_ReportMouseTRUE,
                    
WA_RMBTrapTRUE,
                      
WA_IDCMPIDCMP_RAWKEY|IDCMP_MOUSEMOVE|IDCMP_DELTAMOVE|IDCMP_MOUSEBUTTONS,
                      
TAG_END);

PHP Code:
// Palette data
static SDL_Color *_currentPalette;
static 
int _paletteDirtyStart_paletteDirtyEnd;

static 
void RTG_updatePalette() {
    
    
int inumberOfEntries;
    
ULONG  _rtgPalette[256*2];
     
#ifdef DEBUG_PALETTE    
    
SDL_LogDebugMsgchar ("RTG_updatePalette()\n");

    
SDL_LogDebugMsgchar("RTG_updatePalette() - _paletteDirtyStart = %d\n"_paletteDirtyStart);
    
SDL_LogDebugMsgchar("RTG_updatePalette() - _paletteDirtyEnd = %d\n"_paletteDirtyEnd);
#endif

    
numberOfEntries = (_paletteDirtyEnd _paletteDirtyStart);

    for ( 
i=0numberOfEntriesi++ ) {
        
_rtgPalette[i*3+1] = _currentPalette[_paletteDirtyStart i].r<<24;
        
_rtgPalette[i*3+2] = _currentPalette[_paletteDirtyStart i].g<<24;
        
_rtgPalette[i*3+3] = _currentPalette[_paletteDirtyStart i].b<<24;
    }

    
_rtgPalette[0] = (numberOfEntries << 16) + _paletteDirtyStart;

    
// Terminator: NEEDED
    
_rtgPalette[((numberOfEntries 3) + 1)] = 0x00000000;

    
LoadRGB32(&_hardwareScreen->ViewPort_rtgPalette);


    
// Reset.
    
_paletteDirtyStart 256;
    
_paletteDirtyEnd 0;

NovaCoder is offline  
Old 25 September 2018, 16:48   #228
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,322
Ok.
Now i need to setup RTG under winuae. Just adding rtg board is easy, but how to setup it so that the above can work ? I don't even have cybergraphics.library (btw, do all rtg setups use this ?).
meynaf is online now  
Old 28 July 2019, 20:45   #229
Seiya
Registered User
 
Seiya's Avatar
 
Join Date: Nov 2014
Location: Italy
Posts: 2,340
hello, i reopen this thread to ask if there is a way to play music? i see from option in the game that is possible to play with MIDI. This porting can play music?
By the way, excellent porting for Amiga.
Seiya is offline  
Old 29 July 2019, 08:36   #230
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,322
Quote:
Originally Posted by Seiya View Post
hello, i reopen this thread to ask if there is a way to play music? i see from option in the game that is possible to play with MIDI. This porting can play music?
By the way, excellent porting for Amiga.
No, unfortunately there is no music. It's on the todo list, maybe one day (when i find a good solution).
Options exist to play either MIDI or CD but changing them will have no effect. Note that Mac version could not play MIDI either (actually, XMI).
meynaf is online now  
Old 29 July 2019, 10:50   #231
Seiya
Registered User
 
Seiya's Avatar
 
Join Date: Nov 2014
Location: Italy
Posts: 2,340
ok, thanks
Seiya is offline  
Old 11 August 2019, 06:36   #232
saimon69
J.M.D - Bedroom Musician
 
Join Date: Apr 2014
Location: los angeles,ca
Posts: 3,516
well, i was tasked to do the music, and seems still got a lot to do; i did listen cold lately at what i did and i admit more than half of it is not as good as it should be

Am busy with two jobs right now and several gigs for other projects but would love to have this on my pedigree too, and done better than is now, hoping that all those projects give me better skills than in 2016

Last edited by saimon69; 11 August 2019 at 07:07.
saimon69 is offline  
Old 07 March 2021, 17:43   #233
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Hi meynaf,

Not sure if you're aware of this or not... someone over at https://www.ppa.pl/ updated the game file and editor:

Quote:
Originally Posted by Aladin View Post
Hi DamienD

Heroes 2 meynaf have an update: v0.5

https://www.ppa.pl/forum/strefa-gier...gry/15#m714550

For your english version, i think you have juste to replace the file heroes2 and editor2
This is what the Polish post translated says:

Quote:
In response to the #444

Heroes of Might and Magic 2 ported to the Amiga: link

As roman Kra?niewski
writes
on facebook: Configuration to launch the game: Minimum
requirements
AGA - 68030 - 2
MB Chip - 8 Fast Recommended Requirements AGA 68040 2 MB Chip - 16 Fast Link to download my version of the game to the Amiga;
https://files.fm/u/9jwd7x2xy#/view/tzhy6dwut
NOTE: The game fires from the file - heroes2 and not from
the file Heroes2w.exe Configuration file to launch the game was designed by Meynaf's encoder who is famous for moving games from AtariST to Amiga. But the project was abandoned years ago, I undertook the task to complete this project. The basic version allowed you to fire up the game, but the problems were with animations between campaign missions.
I tried to make an additional Polish language version and I succeeded but not entirely. that is, menus and options and any button are in Polish but all descriptions are still in English, I used a dozen versions of PL and the result is always the same, and strange because the version from CDProjekt firing on Windows is normally pl version.
I tested the game in every way to suspend it and wait for an error but i did not suffer any problems.
So I say I tweak it a little to make sure there are no problems adding animations and other features in the game. But the game works very well. I completed 3 campaign missions each time after completing the mission fires up an animation of the description of the next mission with a Polish teacher and fires the mission. In a word SUCCESS!!
Animations for weaker configurations can be set to Interlace when video function and animation will be smoother.
Indeed the small issue that sometimes occured with animations between Campaign missions is fixed
DamienD is offline  
Old 07 March 2021, 18:16   #234
Aladin
Registered User
 
Join Date: Nov 2016
Location: France
Posts: 853
the readme:

0.5
. both: c2p slightly optimised (but this is probably not noticeable at all)
. game: some heroes were nearly never available in the player's castle and the
first hero wasn't always of the player's type (but of another player)
. game: spell "elemental storm" triggered an abort in 0.4
. game: due to misuse of sprintf in original code, signposts consisting of a
text having the "%" symbol in them weren't shown properly
. game: no longer stops the color cycling when moving a hero - why they did
this (it was intentional) is beyond me
. game: while the game explicitly forbids giving your spellbook to someone
else, it no longer prevents you moving it inside your own inventory
. game: titans located at the top of the screen and firing with a narrow angle
could destroy some off screen mem (negative start y coord), ultimately
leading to random crashes
. game: could not build something after building a boat, where a boat could be
built anytime - now the boat is ignored but if you think the game should
have always disallowed building a boat and something else at the same turn,
well, then, just don't do it
. game: you can now select midi output again (but no effect, of course...)
. game: path finding made faster (twice as fast as before), should speed-up
computer moves too

Last edited by Aladin; 07 March 2021 at 19:55.
Aladin is offline  
Old 07 March 2021, 19:00   #235
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Quote:
Originally Posted by Aladin View Post
the readme:

0.5
. both: c2p slightly optimised (but this is probably not noticeable at all)
. game: some heroes were nearly never available in the player's castle and the
first hero wasn't always of the player's type (but of another player)
. game: spell "elemental storm" triggered an abort in 0.4
. game: due to misuse of sprintf in original code, signposts consisting of a
text having the "%" symbol in them weren't shown properly
. game: no longer stops the color cycling when moving a hero - why they did
this (it was intentional) is beyond me
. game: while the game explicitly forbids giving your spellbook to someone
else, it no longer prevents you moving it inside your own inventory
. game: titans located at the top of the screen and firing with a narrow angle
could destroy some off screen mem (negative start y coord), ultimately
leading to random crashes
. game: could not build something after building a boat, where a boat could be
built anytime - now the boat is ignored but if you think the game should
have always disallowed building a boat and something else at the same turn,
well, then, just don't do it
. game: you can now select midi output again (but no effect, of course...)
. game: path finding made faster (twice as fast as before), should speed-up
computer moves too
No, that's meynaf's "0.5" changes

Here's what I added to the meynaf's "History.txt" file:
I've tested further now and... although the intermittent slight speech issues with animations between the Campaign missions has been fixed; I have a major issue with the intro animation after clicking on "New Game" --> "Campaign" jittering like hell

[ Show youtube player ]

I'm running a 68040 / Fastest possible configuration... if I tick "Jit" then this fixes the issue but the game then plays way too fast...

So I'm afraid that I can't use this unofficial update.
DamienD is offline  
Old 07 March 2021, 19:52   #236
Aladin
Registered User
 
Join Date: Nov 2016
Location: France
Posts: 853
So I still had the version 0.4 readme on my installation, I do not have have replaced the history file, thank you for the clarification

Last edited by Aladin; 07 March 2021 at 19:58.
Aladin is offline  
Old 07 March 2021, 19:56   #237
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Quote:
Originally Posted by Aladin View Post
So I still had the version 0.4 readme on my installation, I didn't have to replace the history file, thank you for the clarification
Do you have the same issue as me though with the "unofficial update"?

Quote:
Originally Posted by DamienD View Post
I've tested further now and... although the intermittent slight speech issues with animations between the Campaign missions has been fixed; I have a major issue with the intro animation after clicking on "New Game" --> "Campaign" jittering like hell

[ Show youtube player ]

I'm running a 68040 / Fastest possible configuration... if I tick "Jit" then this fixes the issue but the game then plays way too fast...

So I'm afraid that I can't use this unofficial update.
DamienD is offline  
Old 07 March 2021, 20:11   #238
Aladin
Registered User
 
Join Date: Nov 2016
Location: France
Posts: 853
No with cpu max and nojit, i have first campaign video (the same that your video) running good. (winuae 68060 and 68040)

the only video that jerks a little is the intro video at the launch of the game

I'm using Homm2 french

Last edited by Aladin; 07 March 2021 at 20:31.
Aladin is offline  
Old 07 March 2021, 22:02   #239
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Quote:
Originally Posted by Aladin View Post
No with cpu max and nojit, i have first campaign video (the same that your video) running good. (winuae 68060 and 68040)

the only video that jerks a little is the intro video at the launch of the game

I'm using Homm2 french
Hmmm, without "Fastest possible" all videos jitter like the Campaign intro and the game far too slow

I guess my laptop is too old...

I can get around the "Campaign intro" issues by setting "Jit" and "CPU Speed = -60%":
DamienD is offline  
Old 08 March 2021, 08:16   #240
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,322
Seems someone has made some hacks to try to fix something.
But if a fix breaks something else, of course not a good fix.
meynaf is online now  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphical Problems with Bubble Heroes Marskilla support.FS-UAE 7 18 August 2014 00:15
Heroes of Might and Magic mattbarton.exe Retrogaming General Discussion 7 25 April 2010 04:01
Heroes of the Lance xaind HOL contributions 1 07 January 2010 15:31
Heroes of Might and Magic III almost made it to the Atari! Shoonay Nostalgia & memories 10 31 May 2009 08:02
Heroes of the lance... keil81 support.Games 3 16 December 2001 12:26

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 08:57.

Top

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