Dune II / OpenDUNE for Falcon (and TT)

All about games on the Falcon, TT & clones

Moderators: Mug UK, lp, moondog/.tSCc., [ProToS], Moderator Team

Post Reply
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

Dune II / OpenDUNE for Falcon (and TT)

Post by nanard »

Hello,
I have been coding for OpenDune for a couple of years now. One of the first thing I've done was to make the code Big endian compatible.
That was to make it run on PPC Macs. Then I added support for Midi under OS X, SDL 2 support, various improvements, Scale2x and Hqx rescaling, etc.

Last week I thought it could be possible to make OpenDUNE run under TOS. It needs a 256 color display, so I focussed on Falcon, who can do 320x200x8bpp
I sucessfully compiled OpenDUNE existing code with Vincent Riviere cross mint, added an assembly Chunky To planar routine.
After seeing the "Westwood studios" logo, I quickly added mouse + keyboard support.
The "port" was quite fast, thanks to work done years ago to be Big-endian compatible ! :)

I don't have a falcon, so I'm testing with Hatari. See the screen captures : http://nanard.free.fr/opendune/showpics.php

You can get the compiled version here : http://nanard.free.fr/opendune/OpenDUNE ... 160506.zip
or start from the source code : https://github.com/miniupnp/OpenDUNE/tree/atari

getting the original DOS Dune II v1.07 datafile is quite easy thanks to abandonware sites.

On an emulated Falcon 030 16mHz, the game is slow as hell. Not playable :(
I remember playing the original DOS game on a 386sx20, it had slowdowns, but was definitely playable. We here have the overhead of the chunky2planar conversion, but that shouldn't be that problematic.

Does anyone want to test the game on a fast machine ?
I can try to add TT support if someone wants/needs it. The 320x480x8bpp mode should be ok :)
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
User avatar
paul92706
Atari God
Atari God
Posts: 1551
Joined: Mon Apr 25, 2011 4:28 am
Location: Orange, CA

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

Post by paul92706 »

oh wow! this game bring's back lots of good memories!! :-) thanks :cheers: i would definitley like the TT supported version!
Atari Falcon CT60/CTPCI 14MB+ 512mb ATI9250 + NetUSBee
Atari Falcon030 CF 4gb + NetUSBee+ 14MB Ram
Atari TT030 2meg STRAM/16meg TTRAM + Nova Adaptor +Maxtor SCSI HD + DaynaPort Pocket SCSI
User avatar
Atari030
Atari Super Hero
Atari Super Hero
Posts: 760
Joined: Mon Feb 27, 2012 6:14 am
Location: Melbourne, Australia

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

Post by Atari030 »

I'll try it on a CT2. Yes please for the TT. :-) NICE ONE!!!!
User avatar
Xerus
Moderator
Moderator
Posts: 1249
Joined: Fri Dec 13, 2002 9:31 pm
Location: France

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

Post by Xerus »

Superb initiative!
I tested the game on my Falcon.
Under TOS (CT60 / 90MHz), the game is unplayable, too slow.
Under FreeMiNT (CT60 / 90MHz), the game is fast, perfectly playable :)

Without CT60, the game also seems playable at 16MHz (the framerate is acceptable during the intro) with FreeMiNT but I have a problem with the mouse, she is uncontrollable!
Maybe my config has a problem, it would take the opinion of another person.
In summary, the port goes wrong under TOS.

By the way, the sound is missing ;)

Thank you for this port.
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

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

Post by nanard »

hum the fact that it works under FreeMint but not TOS shows there must be something about a systemcall.
Thank you for your feedback.

About The TT version, any help on how to setup the 256 color mode and how to se palette entry is appreciated :)
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

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

Post by nanard »

OK I found that the gettimeofday() call was a bad idea :)
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
penguin
Captain Atari
Captain Atari
Posts: 265
Joined: Tue Dec 24, 2013 10:43 am

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

Post by penguin »

I've wasted hours on Dune II on my PC, thanks for porting the game to the Atari! I will be reviewing it in a future issue of my magazine :)
AtariUpToDate - Atari ST/TT/Falcon software database and version tracker: https://www.atariuptodate.de
ST-Computer magazine - https://www.st-computer.org/
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

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

Post by nanard »

OK here is the new version : http://nanard.free.fr/opendune/OpenDUNE ... 160507.zip
gettimeofday() is out of the way, so the game is (almost) playable on a Falcon 16Mhz with TOS. Should be really OK with a small CPU boost :)

I also added some code to make it run on TT : the set palette works, but I've no idea how to properly set video mode, so you better have to launch the game in TT Low resolution ;)
is that possible to get 320x240 256color mode on TT ?
According to my tests in Hatari, the game is playable, but the aspect ratio is difficult to bear with 320x480 resolution
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

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

Post by nanard »

Still to be done :
  • Proper TT video code : either setting a 320x200/320x240 mode, or doubling each line to accommodate 320x480
    Keyboard code : I use Crawcin() for now, It should get IKBD interrupt
    Sound : should not be that difficult to use DMA sound. Dune II only uses 1 channel
    Music : it must be possible to output MIDI music to the Atari Midi ports
Any help from any real Atari Coder is welcome :wink:
specific atari code is there : https://github.com/miniupnp/OpenDUNE/bl ... eo_atari.c
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
fidzen
Captain Atari
Captain Atari
Posts: 186
Joined: Tue Mar 31, 2015 5:13 pm
Location: Sweden

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

Post by fidzen »

Edit: It seems to work with the pak-files from the installation package.

Looks great! I really want to test it on my Falcon and I wonder if some nice
guy could post a link to the data files. I only find installation packages and
it's hard to install on Win 7 64-bit. :-)
Atari Falcon, 14Mb RAM, CT60e, Supervidel, Svetlana, 512Mb RAM, 8Gb CF.
Atari Falcon, 14Mb RAM, CT63, 256Mb RAM,4Gb CF.
Firebee Series 2, 16Gb CF, 2Gb SD, MEGA ST Keyboard and Atari Mice.
Atari Stacy 2 with 4Mb RAM and 20Mb HD.
Atari Lynx II with new LCD and VGA output.
Atari 2600 4-switch Woody
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

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

Post by nanard »

4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
Maeke
Captain Atari
Captain Atari
Posts: 313
Joined: Sun Mar 13, 2016 1:54 pm

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

Post by Maeke »

Try using d-fend dos emulator in windows 7, you should be able to install the game. the latest fans updates of d-fend contein a updated version of dosbox.
Playmobil
Captain Atari
Captain Atari
Posts: 295
Joined: Fri Nov 13, 2015 7:40 pm

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

Post by Playmobil »

Tried to ran opendune under Aranym+Emutos+XaAes.

Don't work... An error log file is created and he say :

Code: Select all

opendune.ini file not found.
Unsupported machine type.
don't know how to set palette on this machine.
Need to try with plain TOS.

Thanks nanard for your work ! :P :cheers:


EDIT : When crash, Aranym not responding, cause in the error log file, it's always don't know how to set palette, like an infinity loop. If it's help you ! :wink:
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

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

Post by nanard »

@playmobil: well it's not an infinite loop, it is there are a lot of palette calls :)
Logo display at start is done with color cycling for fading

You need to have a 256 color mode (8 bitplanes) for the game to display
I don't know if Aranym does this.
If a falcon is detected, VsetMode() is called to set video mode.

I just added DMA sound : sounds weird on Hatari
http://nanard.free.fr/opendune/OpenDUNE ... _SOUND.zip
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
Playmobil
Captain Atari
Captain Atari
Posts: 295
Joined: Fri Nov 13, 2015 7:40 pm

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

Post by Playmobil »

Ok ! My Aranym Setup is in TC, not in 256 colors... I need to change my FVDI settings and try again !
User avatar
Xerus
Moderator
Moderator
Posts: 1249
Joined: Fri Dec 13, 2002 9:31 pm
Location: France

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

Post by Xerus »

The game runs fine with TOS now :)
However, the mouse doesn't work in 030 mode, so FreeMiNT is not responsible.
  
The sound is too fast, I suppose the replay frequency of sample is too high (relative to the original sound).

Continue the fight :cheers:
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

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

Post by nanard »

OK, I found the sound bug. I swapped the Mono/stereo bit. bit 7 must be SET for MONO.
https://github.com/miniupnp/OpenDUNE/co ... b8e6cbc388

I have to find sample code for keyboard/mouse handling
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
User avatar
Atari030
Atari Super Hero
Atari Super Hero
Posts: 760
Joined: Mon Feb 27, 2012 6:14 am
Location: Melbourne, Australia

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

Post by Atari030 »

I get the same opendune.ini failure on my CT2, then a crash. TOS 7.04 or in stock Falcon mode running in 256 colours.
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

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

Post by nanard »

new build : http://nanard.free.fr/opendune/OpenDUNE ... 508dbg.zip
this is a debug build, with messages written to error.log and output.log.

- DMA sound is working better now
- I added proper IKBD handling for both Mouse and keyboard.

still to do :
- Proper TT video code : either setting a 320x200/320x240 mode, or doubling each line to accommodate 320x480
- Midi music : does anyone has a Midi synthetizer plugged to his Falcon or TT ?

@Atari030: which version have you tested ?
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
User avatar
mouse_master
Captain Atari
Captain Atari
Posts: 160
Joined: Tue Jun 17, 2003 7:24 pm

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

Post by mouse_master »

I'm on travel unfortunately, so I haven't been able to try this, but I have been following. I have a CT60 Falcon and can hook up to an MT32, unfortunately, I have an extremely busy next 2+ months. :( Besides the Falcon, someone probably should also try this on the Firebee.

I am not sure if this will help, but here is MIDI code from ScummVM for sending midi data

https://github.com/scummvm/scummvm/blob ... stmidi.cpp

Not sure if this will assists you or not. If you have any questions, I can try to answer, but I wrote that small chunk of code a long while ago.
MM41
Captain Atari
Captain Atari
Posts: 156
Joined: Sun Jun 28, 2015 2:36 pm
Location: France

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

Post by MM41 »

Nice work Nanard :D ,
I use a stock Falcon 14Mb TOS 4.02FR , the last opendune.tos freeze at the game selection (no mouse no keyboard).
I load the old version and i can try the game but it's impossible to play (the arrow move crazy).
My MT32 is wired if you want test midi sound :)

It's time to try on TT :D
MM41
Captain Atari
Captain Atari
Posts: 156
Joined: Sun Jun 28, 2015 2:36 pm
Location: France

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

Post by MM41 »

It's the same probleme with TT TOS 3.05FR, freeze after 1 seconde when the arrow is moved.
I can ear the voice intro (no sound on my Falcon?) some words are repeated but it's clear :)
With the older version the sound is too speed and the arrow don't work correctly.
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

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

Post by nanard »

Hum I think I need someone to look at the IKBD code to debug it. As everything works fine with Hatari, I don't know what is wrong :-(
I'm looking at midi code from ScummVM. looks pretty simple
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
User avatar
nanard
Captain Atari
Captain Atari
Posts: 179
Joined: Mon Apr 04, 2016 2:11 pm

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

Post by nanard »

with test midi output : http://nanard.free.fr/opendune/OpenDUNE ... I_test.zip
Tell me if you hear something
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44 /|\ Stacy 4
User avatar
Eero Tamminen
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3787
Joined: Sun Jul 31, 2011 1:11 pm

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

Post by Eero Tamminen »

nanard wrote:- Midi music : does anyone has a Midi synthetizer plugged to his Falcon or TT ?
You can use Hatari to test MIDI if you're on Linux, see:
https://hg.tuxfamily.org/mercurialroot/ ... -linux.txt
Post Reply

Return to “Games”