Search found 168 matches

by nanard
Thu Jan 07, 2021 8:57 am
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

... I think there is a misunderstanding at what you can call a "frame" in Dune II. The game engine just draw to the screen as it process the units, etc. There is no such thing as video synchronization, except during explosions and when the radar is activated. (and maybe during cutscenes) So there i...
by nanard
Thu Jan 07, 2021 8:54 am
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

Your code still scan the whole palette to look for changes. That was different approach, to help ST resolution by avoiding converting extra palette entries between from & to variables, as palette entry conversion is costly, and you indicated the extra entry conversions as problem. It assumed that 6...
by nanard
Wed Jan 06, 2021 2:11 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

yes of course, you can use Video_Tick. Hm. That's called from a timer callback, and doesn't have at end any function call that would be called exactly once per frame. I would actually want symbols marking both rendering start and end, so that I could separately profile worst frames for rendering ti...
by nanard
Wed Jan 06, 2021 1:54 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

The real optimisation is to change the DuneII code to call SetPalette with the indexes it is changing instead of trying to send the whole palette even when a few entries changed (which is what it does) What about something like in the attached (untested!) patch, where current Atari SetPalette() fun...
by nanard
Mon Jan 04, 2021 5:55 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

well... how is it supposed to work ? memcmp() doesn't return the index where the values are different, only the value difference. The check following the first loop doesn't care about what the index is. Speed improvement from memcmp() would compensate impact of scanning the whole palette in next lo...
by nanard
Mon Jan 04, 2021 5:52 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

Also, is there some function that's called exactly once every game frame, no more, no less? what about Video_ShowFPS_2 ? But that's called only when FPS showing is enabled, which one needs to enable manually, right? (need for manual game actions would make it unsuitable for profiling automation) Vi...
by nanard
Mon Jan 04, 2021 5:51 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

What about replacing this loop in the generic code: https://github.com/OpenDUNE/OpenDUNE/blob/master/src/gfx.c#L467 With memcmp()? well... how is it supposed to work ? memcmp() doesn't return the index where the values are different, only the value difference. The check following the first loop doe...
by nanard
Sun Jan 03, 2021 11:32 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

What about replacing this loop in the generic code: https://github.com/OpenDUNE/OpenDUNE/blob/master/src/gfx.c#L467 With memcmp()? well... how is it supposed to work ? memcmp() doesn't return the index where the values are different, only the value difference. Also, is there some function that's ca...
by nanard
Tue Dec 29, 2020 5:16 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

We know that palette 256c => 16c remaping is not efficient. First of all, I'm looking what are the palettes used in the Amiga port to see if we can do better than a fixed palette for the whole game. Unfortunately, the amiga palettes are 32 colors, not 16. Then of course the color cycling must be spe...
by nanard
Sun Dec 27, 2020 8:13 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

I would have thought that palette doesn't need changing during normal game play, but GFX_SetPalette() + Video_SetPalette() take together >6.5% of the cycles! There are color cycling that happens during the game in Dune II : color 223 = Windtrap cycling color color 239 : highlighted text in structur...
by nanard
Sun Dec 27, 2020 7:49 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

I'm trying to compile with -mshort but there are some issues, there are a lot of enums which are supposed to be 32bits values I wouldn't do that on code base that hasn't been designed for 16-bit int, you can be left with *lots* of subtle bugs with code that assumes int to be at least 32-bit. It's m...
by nanard
Sun Dec 27, 2020 7:41 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

I'm trying to compile with -mshort but there are some issues, there are a lot of enums which are supposed to be 32bits values That only works if your are using libcmini or similar. mintlib does not have an -mshort variant currently. Same applies to all other libraries you need, like SDL. I will loo...
by nanard
Sat Dec 26, 2020 10:55 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

I have made 2 optimizations : 1. use pre-converted sound files. That was easy ;) https://github.com/miniupnp/OpenDUNE/commit/eee35eaa55ebd39cc77398a25fd5c9f38b4a4e83 just unzip http://nanard.free.fr/opendune/DUNE2_STE_CONVERTED_SOUND.zip in the DATA directory to have the .AU files next to the .PAK f...
by nanard
Sat Dec 26, 2020 12:40 am
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

"__mulsim3", GCC internal function for 68000 long multiplication is only ~1%, but if you end up optimizing everything, optimizing calls to that should also be eventually considered (it's e.g. something EmuTOS optimized). Getting callgraph of its callers is easy: hatari_profile.py -p -g -r opendune....
by nanard
Thu Dec 24, 2020 3:52 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

So most of the time is take by c2p

Before converting to planar tiles and sprites routines
I think we should reverse engineer the Amiga version.
I had extracted/converted the sounds but no graphics

I'm curious about the cut scenes
by nanard
Thu Dec 24, 2020 12:27 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

try to turn of sound and play the intro again (in game, there is an option to turn off music and/or sound fx) I don't remember when the sounds are sample rate converted, but having it working properly on 68000 8Mhz would need to have them preconverted to the proper format (8bits signed at 12500Hz if...
by nanard
Thu Dec 24, 2020 11:48 am
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

to be allowed to skip intro, you must have ONETIME.DAT file existing in the SAVES/ directory

20000 does mean 20Hz.
Frame rate capping is available through editing opendune.ini
the default is framerate=50
by nanard
Wed Dec 23, 2020 9:50 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

Reading your answer... we all notice the waste of time trying to give some advices... Really I am so sorry for the rest of the users, and for bother you. I still don't understand the added value of your advice, @agranlund had already made the most important point : drawing planar gfx from the insid...
by nanard
Wed Dec 23, 2020 9:23 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

Graphics ST graphics look great! Is all of it being converted on the fly at run-time, or has something been converted manually? Only thing that seemed buggy with ST gfx, was the F8 FPS output, that was unreadable. Could it be blit directly to screen, instead of going through the conversion? the FPS...
by nanard
Wed Dec 23, 2020 4:17 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

I forgot: there is also a Sega Megadrive version of Dune II
and a RiscOS one, but I don't know much about them.
by nanard
Wed Dec 23, 2020 3:54 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

I think you need to know a bit more about dune II before explaining what needs to be done... (unless you want to do it yourself, and I'm pretty sure you can ;) 0 - Dune 2 exists in 2 versions : * IBM PC - Realmode (ie 16bits) code and MCGA graphics (320x200x256colors) Use AIL = IBM Audio Interface L...
by nanard
Wed Dec 23, 2020 9:08 am
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

Hm, it indeed is slow. I guess the 256 instruction cache (and/or data cache) in 030 really helps with the gfx conversion inner loop... I didn't get bus error with EmuTOS or TOS2, but 68000 version gets stuck in middle of intro and before that it doesn't react to input, so that I could try the speed...
by nanard
Tue Dec 22, 2020 11:15 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

hum it works well when using EMUTOS. The bus error happens with 1.62
by nanard
Tue Dec 22, 2020 10:52 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

WARN : Bus Error at address $ffffffe0, PC=$11ad8 addr_e3=11ad8 op_e3=10c5
by nanard
Tue Dec 22, 2020 10:50 pm
Forum: Games
Topic: Dune II / OpenDUNE for Falcon (and TT)
Replies: 205
Views: 107654

Re: Dune II / OpenDUNE for Falcon (and TT)

I've built http://nanard.free.fr/opendune/opendune ... 00-TOS.zip
It is slow as hell in hatari emulating a 68000 @16MHz and bombs quite quick with 2 bombs: Bus Error

Go to advanced search