Possible to port this to the X68k!?

Started by H68k, November 10, 2013, 03:57:09 PM

Previous topic - Next topic

H68k

Ok.. First off... What the hell is this?!?

Cannonball is an open source recreation of Outrun's game engine, it is the result of one nut job's 3 years of reverse engineering the original Outrun arcade game. to make an open source re-implementation of it's game engine and game play.

Apparently.. Hertz (the company that ported several games to other computers and consoles) had a complete, ready to go port of Outrun for the X68k alongside the Mega Drive conversion they did. but the powers that be prevented them from releasing the X68k version...

So i was thinking... Would it be possible to port this to the X68k? and make up for this systems lack of Outrun for nearly 25+ years??

https://github.com/djyt/cannonball   





SuperDeadite

Sounds like a great project for you.  Let me know when you're finished.

H68k

QuoteSounds like a great project for you.  Let me know when you're finished.

Project.. For me?? well.. that's part of the problem... i'm a "bedroom coder" who has little understanding of how to really program. And not much indepth knowledge of the internal working's of the X68k's hardware.

So that's why i came here asking if any ace coders and people with more in depth knowledge of the hardware, if this is possible?

I could ask the guy behind Cannonball, if he wouldn't mind the source code being forked off on github for a port to the X68k? if he said yes, and members of the NFG community wanted to give it ago... it could become an NFG games community project maybe?   

kamiboy

An NFG X68000 community project should be something new that you can only play on the X68000, not something available on so many other platforms.

In any regard, I've thankfully never had to port someone else's code to another platform and I am not about to start now. You can count me out.

The prospect of digging through other people's code scares me.

neko68k

You pretty much couldn't do a straight port. All the scaling would have to be replaced with pre-scaled sprites. The road would have to be emulated with raster effects. The music would be difficult to port over, basically, because it ran on a sub-cpu(z80)on system 16/x/y boards. That's just the stuff off the top of my head. I wouldn't be interested.

H68k

A few ideas:

Sprite Scaling:
Cannonball uses Direct 3D calls to use a GPU for the sprite scaling work. trying to redraw and pre-scale Outruns spites already would be to time consuming, and not really possible as Cannonballs code reads data from Outruns ROM images as they are. so removing the sprite scaling code would bring it into line with other home computer ports (the Mega Drive port did not have spite scaling ether)

The road part is handled by code seams do the work of the 2ndry rendering CPU of the original arcade hardware on 1 CPU... but again... it uses Direct 3D for rendering.. so the not so easy part of rewriting that part of the code to talk to the X68k's hardware.

Sound: Cannonball already features a Z80 emulator in it's code base, and code to interface with an emulated YM2151, could this code be cut out and rewritten without much difficulty. to interface with the real ym2151 in hardware?

PCM could be handled by Rydeen's polyphonic ADPCM driver? this would allow more PCM channels in software, with little CPU overhead?


I know a 100% perfect arcade port is impossible... and this would not be an easy port to do.. but something close to other home computer ports could be achieved maybe.. even surpassing them a little? 

I just thought this could be a chance to make up for the lack of Outrun on the X68k after so long...

lydux

Hi H68K,

Quote
Sprite Scaling:
Cannonball uses Direct 3D calls to use a GPU for the sprite scaling work. trying to redraw and pre-scale Outruns spites already would be to time consuming, and not really possible as Cannonballs code reads data from Outruns ROM images as they are. so removing the sprite scaling code would bring it into line with other home computer ports (the Mega Drive port did not have spite scaling ether)

The road part is handled by code seams do the work of the 2ndry rendering CPU of the original arcade hardware on 1 CPU... but again... it uses Direct 3D for rendering.. so the not so easy part of rewriting that part of the code to talk to the X68k's hardware.
Not exactly. Cannonball emulates functions of all 3 video hardware parts (road, sprites, tiles). They are based on MAME source code. All hardware operations (zoom, flip, scaling, etc...) are done by software, without any help of SDL/OpenGL or any kind of supportive library (Cannonball does not use Direct3D anywhere). A frame is a simple pixels buffer where all layers draw within. Finally, this pixels buffer is passed to the rendering backend (SDL or OpenGL actually) that just show it to you.
This is the simpliest form of rendering a scene in fact.
But this method requires a full color frame buffer and a very fast hardware as each frame have to be redrawed. The x68k just can't perform this, this is not the way it works.

Quote
Sound: Cannonball already features a Z80 emulator in it's code base, and code to interface with an emulated YM2151, could this code be cut out and rewritten without much difficulty. to interface with the real ym2151 in hardware?
The sound side does not emulate a Z80 at all. Thankfully ! Otherwise, Cannonball would not differ from MAME ! :D
No, it reimplements the whole sound cpu code, just like the main engine.
But you're right for the YM2151, it's emulated. As well as the SegaPCM.
I think the sound part could be the simpliest one, almost native to the x68000. The SegaPCM samples might just be downsampled to 4 bits ADPCM in our dialogic compression method.

Quote
PCM could be handled by Rydeen's polyphonic ADPCM driver? this would allow more PCM channels in software, with little CPU overhead?
Little CPU overhead ? This is this "little" cpu time consumption you want to save.
Remember we only have a single m68000 @ 10Mhz. The Outrun hardware is two m68000 @ 10Mhz and one Z80 @ 4Mhz ! Plus video hardware support we do not have.

Finally, I want to point that Cannonball source code is fully written in C++, we do not have C++ compiler. And anyway, in case we do (which I have already done), it would produce a terrible huge executable that requires a lots of memory and cpu usage... I've just dropped C++ for the x68k.

I don't say having Outrun on x68000 is impossible : we do already have a nice Super Hang On port, which share the same hardware as Outrun on arcade version, so...
It's just that Cannonball source code is unusable for us like this. At least, it says how Outrun engine works, which is a good point.

It's very frustating... The code seems so simple, totally adapted for modern computer. But I already know it's not so easy for the x68k. A more hardware approach is required...

kamiboy

Seems to me that the best way to go about this is to track down one of these former Hertz guys and put the squeeze on him till he gives up the nearly complete port that already exists. Assuming of course that a copy still exists on a dusty floppy somewhere.

SuperDeadite

LOL, No love for for the, "interesting" Full Throttle port?

H68k

So it may as well be damn hard... to impossible to port cannonball as it is? ah well.. thank you for taking the time to explain Lydux..

Ok... but what about this for a Plan B? using part of the code of cannonball that does the gameplay and physics... (maybe the sound to?) and using it as a bases to code something from new that would work within the limitations of the X68k's hardware? something on the level of the Super Hang-On port for the X68k? but more like outrun?

QuoteSeems to me that the best way to go about this is to track down one of these former Hertz guys and put the squeeze on him till he gives up the nearly complete port that already exists. Assuming of course that a copy still exists on a dusty floppy somewhere.

Maybe one of the former Hertz employees did make/or still has a copy or two on a dusty forgotten about set of 5 inch floppy disks somewhere... haven't got a clue where to start though.. or even if they'd be willing to 'release' it.



neko68k

The Super Hang-On port uses raster scrolling to emulate the road. This seems like a very good(maybe the best) way to do that. I don't know how rydeen does its pcm mixing, but I do know that the somewhat better PCM8.X uses the hblank interrupt to mix while the frame is drawing to the screen. These things combined may not be possible as you run out of time in HBLANK very quickly. The video hardware doesn't support raster functions like, say, the Sega Genesis does so you have to manipulate the scroll registers yourself during HBLANK.

kamiboy

QuoteMaybe one of the former Hertz employees did make/or still has a copy or two on a dusty forgotten about set of 5 inch floppy disks somewhere... haven't got a clue where to start though.. or even if they'd be willing to 'release' it.

Chances of willingness is about zero if I know Japanese developers right.

Western devs are a lot better at preservation than their Japanese counterparts.

H68k

QuoteI don't know how rydeen does its pcm mixing, but I do know that the somewhat better PCM8.X uses the hblank interrupt to mix while the frame is drawing to the screen. These things combined may not be possible as you run out of time in HBLANK very quickly.

From what I understand (witch again.. is not much here)... Rydeen's ADPCM driver is the most efficient Polyphonic ADPCM driver of them all. it was entirely coded in 68k assembler by Rydeen himself and has a bit less CPU requirements than PCM8.

On testing in XM6g and my own XVI set to 10Mhz, it managed to play most sample based MDX music with a little or no slowdown. only MDX music with that use all of the software ADPCM channels really bogged it down. when set to 16Mhz the slowdown and stuttering is gone entirely, with a few CPU cycles to spare it seams.


QuoteThese things combined may not be possible as you run out of time in HBLANK very quickly.

Would keeping the software ADPCM channels down to say, 4 help here?

2 or 3 for digital percussion samples, and the last one for one sound fx at-a-time? etc



QuoteChances of willingness is about zero if I know Japanese developers right.

Western devs are a lot better at preservation than their Japanese counterparts.

Sadly.. your observation is on the money here...

The Dreamcast... for example, has had a few unreleased or semi finished titles that got canned and never saw the light of day 'released' via the usual channels, into the public over the past couple years.

Most of these were from western developers who made the game... or who had been contracted to port it to the Dreamcast.

Only a miniscal few of those, were made by Japanese devs.

SuperDeadite

If you are seriously going to do this, just use the NAGDRV tracks. :)

OutRun Roland MT-32 + FM mix

H68k

Holy cow... I feel like something just made sweet love down my ear holes...

I sir... am impressed.. if slightly envious...  :o

SuperDeadite

Quote from: H68k on December 14, 2013, 06:45:49 AM
Holy cow... I feel like something just made sweet love down my ear holes...

I sir... am impressed.. if slightly envious...  :o

If you hadn't realized Cannonball supports custom music (wav files).  I like to play Cannonball on my PC using these tracks. :)  Sadly Micomsoft never did Magical Sound Shower though. XD

H68k

To be honest.. I haven't really been keeping track of what Djyt has been adding to the code base of cannonball.. my copy of the code from GitHub is several months out of date.

genocho

Never knew about that unreleased port of outrun for the x68000, but if really exists, could be awesome if authors make it public, at least we can have hope on that, or maybe we can contact with the company, its better to make it public than lost it in an office.....

Besides outrun, for me the game that really miss on the x68000 is shinobi, dont know if can be ported, emulated, whatever, but can be really awesome have a decent port of this classic arcade, for potential think can be near pixel perfect.

Dream is for free so, maybe one day someone can make a remake of both games, the machine deserves it.

Regards.

H68k

#18
QuoteNever knew about that unreleased port of outrun for the x68000, but if really exists, could be awesome if authors make it public, at least we can have hope on that, or maybe we can contact with the company, its better to make it public than lost it in an office.....

There is... unfortunately a few... problem's here, Hertz Co Ltd was shut down, about some 20 years ago by there parent company. (most of there EX-employees likely went on to join other game company's, and other's from there on. or take a complete change in there career path or just quit the games business and retire altogether)

No one really knows where they went from then on... or have any of there contact details.

QuoteBesides outrun, for me the game that really miss on the x68000 is shinobi, dont know if can be ported, emulated, whatever, but can be really awesome have a decent port of this classic arcade, for potential think can be near pixel perfect.

It would not have been easy.. but not impossible for a team of game developer's that know the in's and out's of the X68k's hardware. (considering how close the X68k's spec's are to Sega's System 16 board) to port an arcade perfect version of Shinobi to it.

It might be possible to do for a small team of X68k guru's... who knows?

QuoteDream is for free so, maybe one day someone can make a remake of both games, the machine deserves it.

I wondered if it was possible to port "Cannonball" to the X68k... but i was told by people more in-the-know than i am, on this forum. it would be impossible... due to the complexity of it's code and the short comings of the X68k's hardware... compared to the capability of the original arcade hardware the game ran on.

perhaps something new could be coded, from the ground up. like if a team of game dev's were porting outrun to the X68k that would work within the limitations of it's hardware?

After this machine got several good... to fantastic ports of Sega arcade classics.... Such as: Afterburner 2, Alien Syndrome, Fantasy Zone, Super Hang On, Thunder Blade... etc etc, I think it's down right criminal... that Outrun is missing from them...

papa_november

You'd be looking at rewriting a shitload of poorly-documented 68K assembly for speed, and even then your finished product would probably need an 030 to get anything near the typical arcade-perfect x68k arcade port experience. If you aren't an Amiga demoscene alumni or one of the other top 68k assembly programmers on the planet you will not be able to pull it off, this is not a project for beginners.

The After Burner and Space Harrier ports cut a lot of corners and they look the part.