Archive for the ‘Software Development’ Category

M.A.M.E. Emulator for Microsoft XBOX

Wednesday, June 6th, 2001

xbox_mame_21.jpgSo some loony let me loose on a Microsoft XBOX development kit a month or two ago and I had some spare time on my hands this last weekend so it was only natural that I do something “creative”. M.A.M.E. for the XBOX is the result, and it was a lot easier to port to another platform the second time around than it was this time last year . The XBOX version runs at a rock solid 60 FPS on all the old 80’s ROMs I’ve tested it with, and also the NEOGEO ROMs too, and this is only with a debug build. There are a few lines in some of the drivers of the M.A.M.E. source code that give the MS VC++ 7.0 compiler the screaming ghoulies so I have not been able to test a fully optimised compile yet.

I’ve got to tweak a few bugs in my rendering code that copies the arcade game bitmap that M.A.M.E. creates each video frame to the XBOX bitmap and that will remove some of the blown out colours you can see in the screen shots and also the fact that NEOGEO games only fill two third’s of the screen.

I also need to come up with a decent menu system & interface for the emulator, right now, if you want to change games you have to restart the XBOX console, edit a config file that contains the game name you want to play, and then reload M.A.M.E.

So yeah, this should be the ideal machine to put in a M.A.M.E. cabinet I am still trying to find time to construct. I’d like it to be an XBOX. The console has a built-in hard drive, Ethernet connection, and supports analogue & digital controlllers, and only costs a few hundred American dollars, plus it already supports a standard TV signal so I can wire up any decent TV instead of an expensive Wells Gardner monitor.

The screenshots below were taken with a Kodak Digital DC240 camera in very poor lighting conditions, plus I was in a bit of a hurry to take them too as I had borrowed the camera from a colleague who needed it back to finish up some work.

As an aside I have come to the empirical conclusion that I am an utterly awful photgrapher. I’m going to have a more artistically inclined colleague take some far better pictures later on and use those instead. I’m also hoping to get an .AVI of the emulator actually running a few games at some point in the near future.

I posted a small update on my progress

SCREENSHOTS

Ghosts & Goblins with all the colours blown out. The second game I managed to get to load. Note the subtle brand placement of the Starbucks’ coffee cup. small_xbox_011.jpg
The XBOX development kit (the big silver box) tucked away under the desk alongside a PlayStation 2 devkit. Those big meaty paws belong to Nate, a colleague. He’s a big man, probably the only man I personally know who’s hands made the prototype XBOX controller seem small when he held it. small_xbox_021.jpg
More Ghosts & Goblins. The prototype XBOX controller propped up on the top of the PSX controller behind it. Or perhaps the XBOX controller is attempting to mount the PSX controller. Microsot & SONY. Who’s your daddy? small_xbox_031.jpg
More G&G. I figured out how to turn on the camera flash so you can get a better look at the XBOX dev kit. small_xbox_041.jpg
A half hour later, a little tweaking and we have better colour control in the emulator. small_xbox_051.jpg
The XBOX dev kit boot loader with a couple of demos already sat on the hard drive and the last but one item declaring itself to be XBOX M.A.M.E. small_xbox_061.jpg
  small_xbox_071.jpg
  small_xbox_081.jpg
Donkey Kong attract mode. small_xbox_091.jpg
The first level of Donkey Kong. small_xbox_101.jpg
  small_xbox_111.jpg
  small_xbox_121.jpg
NEOGEO Metal Slug. The first game I loaded on the emulator. I don’t yet have the rendering system properly implemented so it is squashing the screen horizontally. small_xbox_131.jpg
  small_xbox_141.jpg
NEOGEO Metal Slug running just fine. Strangely the NEOGEO emulator had pretty decent colour reproduction, though I think this was due to the fact that the game should have been dark and the overblown colours just made this scene look “correct.” small_xbox_151.jpg
The less said about my photography skills in this one, the better. small_xbox_161.jpg
   
   
   
   
   

Atari 2600 VCS Emulator for SONY PlayStation 2

Monday, December 4th, 2000

atari26001.png

After successfully porting M.A.M.E. to the Sony PlayStation 2 I just had to try and port my generic Atari VCS 2600 emulator. The results are good. I’ve mapped the video display on to a cube that can be rotated around as you play. With VSync turned off the emulator runs at well over 300 frames per second, and whilst I have yet to do it, I could conceivably place different games on each side of the cube and still have it run at 60 fps with a little optimisation.

I took a few pictures of the Atari VCS emulator with a handheld digital camera — sorry about the camera shake and poor lighting. ^_^;

Note that “Wizard of Wor” and “Space Invaders” are rotated around on the cube. Makes it difficult to play but interesting to watch. Hmmm… that gives me an idea for a game design! =^_^=

SCREENSHOTS

Activision’s Pitfall running on a SONY PlayStation 2. Activision’s Pitfall running on a SONY PlayStation 2.
  vcs0021.jpg
  vcs0031.jpg
  vcs0041.jpg
  vcs0051.jpg
The SONY PlayStation 2 development hardware, a DTL-1000, tucked away under the desk. “Would you like that SONY super-sized for only $18,000 more?” vcs0061.jpg
Atari’s Space Invaders mapped on to a spinning cube. The lights of the PS2 devkit glow eerily beneath the desk. vcs0071.jpg
Playing Atari’s Space Invaders properly. vcs0081.jpg
Wizard of Wor. vcs0091.jpg
Wizard of Wor mapped on to a rotating cube. vcs0101.jpg

M.A.M.E. for SONY PlayStation 2

Monday, December 4th, 2000

As I’ve just started working on PlayStation 2 hardware and I have access to a DTL-T10000 development station (the big black monolith) I wanted to find out just how fast the main CPU, an Hitachi clone of a MIPS processor, really was.I took the source code to M.A.M.E. and xMAME and with a little tweaking ported it to the Sony PlayStation 2 without too much trouble. The emulator runs at 40fps for most of the older 1980’s ROMs with all the GNU compiler optimisations switched on, with no audio support currently. Once I have the graphics functions optimised I expect to see it running at a solid 60fps.

The other speed test I did was take the open-source 1964 Nintendo 64 Emulator that is available and to which I can claim absolutely no credit for and ported it to the PS2, I just cheekily renamed it to 2064 to bring it up to date.

Getting the N64 emulator up was a much easier task and with only a few tweaks and a little optimisation it is running a good 55fps. With some thougth given to the 3D rendering and harnessing the full power of the PS2 I expect to have an N64 emulator running at 150% to 200% of the speed of the actual console.

I’m hoping that the MAME cabinet I intend to put together wil not require a $1500 PC inside of it and I’ll be able to slip in a $300 PlayStation 2.

Please do not ask me for either of these programs as I cannot legally distribute them.

Update #1: Unfortunately for me, I was too dumb to actually take any pictures with a camera of M.A.M.E. running on the PS2 dev kit. A couple of days later I did remember to take pictures of my generic Atari 2600 VCS Emulator that I ported so you’ll just have to satisfy yourself with those.

atari2600_thumbnail1.pngUpdate #2: I ported my Atari 2600 VCS Emulator to the Sony PlayStation 2 as well.

Update #3: At least I had the presence of mind to take pictures of M.A.M.E. running on the Microsoft XBOX a year later.

Nintendo Game Colour Link-Up Example

Sunday, February 27th, 2000

gbc_link_cable1.pngTrying to figure out how to make several Nintendo Gameboys communicate with each other in your game?

Use this handy piece of commercial grade source code written in assembly to handle it all for you.

This is a fully functioning example of two Gameboys communicating with each other over the serial cable.

The source code was originally written for a Gameboy title that was never published and rather than let the source code remain unused I thought that other people might benefit from it.

The .ZIP archive contains all the source code you need to be able to integrate multi-player in to your games.

I do not offer any kind of technical support with this software so please do not ask.

You should be aware that this software is copyrighted and the source code does belong to me but I am granting you a license to use it for free, in a commercial or non-commercial product.

If you distribute the .ZIP archive on your web site, or give a copy to someone else, please leave the license.txt file intact. Even if you, or they, do not read the license.txt file you and the other person are still bound by it if either of you use this software.

The license is more than fair, it just says you can’t sell this source code in source form or as part of an API or library but you can put it in to a product and sell the product and not owe me a penny (or cent.)

LICENSE

This is a legally binding document, so read it!

END USER LICENSE
================

PLEASE READ BEFORE INSTALLING OR USING THIS SOURCE CODE

LICENSE FOR CUSTOMER USE OF OTAKU NO ZOKU SOFTWARE

IMPORTANT NOTICE — READ CAREFULLY: This Otaku No Zoku Customer License and Evaluation Agreement (”LICENSE”) is the agreement which governs use of the source code downloadable herefrom, including computer software and associated printed materials (”SOFTWARE”). By downloading, installing, copying, or otherwise using the SOFTWARE, you agree to be bound by the terms of this LICENSE. If you do not agree to the terms of this LICENSE, do not download the software.

RECITALS

Use of Otaku No Zoku’s products and source code is protected. The SOFTWARE is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE is not sold, and instead is merely licensed for use, strictly in accordance with this document. This agreement sets forth the terms and conditions of the SOFTWARE license only.

1. DEFINITIONS:

1.1 Customer. Customer means the business entity or individual that downloads the SOFTWARE.

2. GRANT OF LICENSE.

2.1 Rights and Limitations of Grant. Otaku No Zoku hereby grants Customer the following non-exclusive, non-transferable right to use the SOFTWARE, with the following limitations:

2.1.1 Rights. Customer may install and use as many copies of the SOFTWARE on a single computer, and may make multiple back-up copies of the Software. This LICENSE of SOFTWARE may be shared or used concurrently on different computers.

2.1.2 Product. Customer may incorporate Software in to a commercial or non-commercial Product as long as such Product contains an acknowledgement to either “Otaku” or “Otaku No Zoku” that is visible on the game introduction or a game end credits. Customer may not incorporate this Software as part of an API or library.

2.1.3 Distribution. Customer may distribute the Software in source code form as long as the .ZIP archive remains intact, no fee is charged for distribution, and this license and all copyright notices remain intact and unaltered. Customer may distribute the Software in final object form as part of another product without the accompanying license. Customer may not distribute the Software in an intermediate form or as part of an API or library.

2.1.4 Restricted Entities. No current employee or company, that is carrying out work under contract, for hire, or for sale, to any of the following companies may make use of this software, in whole, or in part, for any purpose. The companies so listed; Lucky Chicken Games, Interplay, 3DO, Activision, Slitherine Software, Eidos.

2.1.5 Limitations. No Separation of Components. The SOFTWARE is licensed as a single product. Its component parts may not be separated for use on more than one computer, nor otherwise used separately from the other parts. No Rental. Customer may not rent or lease the SOFTWARE to someone else. No Sale. Customer may not sell for profit the SOFTWARE to someone else.

3. TERMINATION.

This LICENSE will automatically terminate if Customer fails to comply with any of the terms and conditions of it. In such event, Customer must destroy all copies of the SOFTWARE and all of its component parts.

4. COPYRIGHT.

All title and copyrights in and to the SOFTWARE (including but not limited to all images, photographs, animations, video, audio, music, text, and other matters incorporated into the SOFTWARE), the accompanying printed materials, and any copies of the SOFTWARE, are owned by Otaku No Zoku, or its suppliers. The SOFTWARE is protected by copyright laws and international treaty provisions. Accordingly, Customer is required to treat the SOFTWARE like any other copyrighted material except that it may make multiple copies of the SOFTWARE for backup or archive purposes.

5. APPLICABLE LAW.

This agreement shall be deemed to have been made in, and shall be construed pursuant to, the laws of the State of California.

6. DISCLAIMER OF WARRANTIES AND LIMITATION ON LIABILITY.

6.1 No Warranties. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED “AS IS” AND OTAKU NO ZOKU AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

6.2 No Liability for Consequential Damages. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL OTAKU NO ZOKU OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF OTAKU NO ZOKU HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. MISCELLANEOUS. The United Nations Convention on Contracts for the International Sale of Goods is specifically disclaimed. If any provision of this LICENSE is inconsistent with, or cannot be fully enforced under, the law, such provision will be construed as limited to the extent necessary to be consistent with and fully enforceable under the law. This Agreement is the final, complete and exclusive agreement between the parties relating to the subject matter hereof, and supersedes all prior or contemporaneous understandings and agreements relating to such subject matter, whether oral or written. Customer agrees that it will not ship, transfer or export the SOFTWARE into any country, or use the SOFTWARE in any manner, prohibited by the United States Export Administration Act or any other export laws, restrictions or regulations. This LICENSE may only be modified in writing signed by an authorized officer of OTAKU NO ZOKU.

DOWNLOAD

If you agree to the license, download the example & source code

 

linkupzip1.gif

 

If you do not agree to the license, leave this page.

 

Click here.