Dune II / OpenDUNE for Falcon (and TT)

All about games on the Falcon, TT & clones

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

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

Dune II / OpenDUNE for Falcon (and TT)

Postby nanard » Fri May 06, 2016 5:59 pm

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

User avatar
paul92706
Atari God
Atari God
Posts: 1341
Joined: Mon Apr 25, 2011 4:28 am
Location: Orange, CA

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

Postby paul92706 » Fri May 06, 2016 9:42 pm

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: 518
Joined: Mon Feb 27, 2012 6:14 am
Location: Melbourne, Australia

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

Postby Atari030 » Fri May 06, 2016 10:54 pm

I'll try it on a CT2. Yes please for the TT. :-) NICE ONE!!!!

User avatar
Xerus
Moderator
Moderator
Posts: 1176
Joined: Fri Dec 13, 2002 9:31 pm
Location: France

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

Postby Xerus » Sat May 07, 2016 4:11 am

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.

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

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

Postby nanard » Sat May 07, 2016 6:07 am

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

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

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

Postby nanard » Sat May 07, 2016 6:58 am

OK I found that the gettimeofday() call was a bad idea :)
4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44

penguin
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Tue Dec 24, 2013 10:43 am

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

Postby penguin » Sat May 07, 2016 8:45 am

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: http://www.atariuptodate.de
st-computer magazine - http://st-computer.atariuptodate.de/

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

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

Postby nanard » Sat May 07, 2016 8:46 am

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

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

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

Postby nanard » Sat May 07, 2016 9:16 am

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

fidzen
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 145
Joined: Tue Mar 31, 2015 5:13 pm
Location: Sweden

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

Postby fidzen » Sat May 07, 2016 11:46 am

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 2600 4-switch Woody

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

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

Postby nanard » Sat May 07, 2016 3:20 pm

4MB STE + CosmosEx /|\ MegaST4 + MegaFile 44

Maeke
Captain Atari
Captain Atari
Posts: 301
Joined: Sun Mar 13, 2016 1:54 pm

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

Postby Maeke » Sat May 07, 2016 3:25 pm

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
Atari maniac
Atari maniac
Posts: 78
Joined: Fri Nov 13, 2015 7:40 pm

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

Postby Playmobil » Sat May 07, 2016 5:19 pm

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:

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

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

Postby nanard » Sat May 07, 2016 5:38 pm

@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

Playmobil
Atari maniac
Atari maniac
Posts: 78
Joined: Fri Nov 13, 2015 7:40 pm

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

Postby Playmobil » Sat May 07, 2016 6:21 pm

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: 1176
Joined: Fri Dec 13, 2002 9:31 pm
Location: France

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

Postby Xerus » Sat May 07, 2016 7:19 pm

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:

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

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

Postby nanard » Sun May 08, 2016 12:06 am

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

User avatar
Atari030
Atari Super Hero
Atari Super Hero
Posts: 518
Joined: Mon Feb 27, 2012 6:14 am
Location: Melbourne, Australia

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

Postby Atari030 » Sun May 08, 2016 12:18 am

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.

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

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

Postby nanard » Sun May 08, 2016 1:31 am

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

User avatar
mouse_master
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 121
Joined: Tue Jun 17, 2003 7:24 pm

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

Postby mouse_master » Sun May 08, 2016 11:38 am

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.
My Ancient Website dedicated to the ST:

http://www.geocities.ws/SiliconValley/Vista/5975/

Update? Its gone now....... But an archive of it lives...

MM41
Atari maniac
Atari maniac
Posts: 79
Joined: Sun Jun 28, 2015 2:36 pm
Location: France

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

Postby MM41 » Sun May 08, 2016 1:45 pm

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
Atari maniac
Atari maniac
Posts: 79
Joined: Sun Jun 28, 2015 2:36 pm
Location: France

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

Postby MM41 » Sun May 08, 2016 6:44 pm

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.

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

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

Postby nanard » Sun May 08, 2016 8:00 pm

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

nanard
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Mon Apr 04, 2016 2:11 pm

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

Postby nanard » Sun May 08, 2016 8:34 pm

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

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1512
Joined: Sun Jul 31, 2011 1:11 pm

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

Postby Eero Tamminen » Sun May 08, 2016 8:48 pm

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


Social Media

     

Return to “Games”

Who is online

Users browsing this forum: No registered users and 2 guests