Pompey Pirates Menu 26 (DirectX programming)

What is it?

Pompey Pirates were a hacking group on the Atari ST. For me their intros were better than the games. I kept Menu 26 because I really liked the music and the variety of text scrolling effects it shows. They don't "do it" any more, but if you are interested in them you should check out their excellent web site.

I tested the Menu 26 Intro on the Atari ST emulator SainT in 2002 and to my surprise it didn't work. I dug out my Atari ST and discovered it requires certain key values on sectors on the disk to work correctly. I cracked the intro by jumping past the disk sector content routine and now it works on the emulator. I then thought about converting it to the PC as a DirectX demo - and I managed to do it in under 12 hours!

The source and the binary files are available on the download page.

Screen shot

Prerequisites

P2-333 or higher with music (P200 with high performance Mode-X graphics card should be OK),
Decent graphics card capable of 320*240 in 256 colours,
DirectX 3 or higher,
Windows 95/98/ME/NT4.0/2000/XP.

What does it do?

1. Sets up double buffered, palettized, full screen DirectX surfaces in 320*240 in 256 colours,
2. Displays the Rainbow Island character and plays an ST disk whirring sound effect (for real nostalgia!),
3. Starts the ST Sound Engine (by Arnaud Carré) with first tune (in .YM format),
4. Displays the scrolling message demonstrating all 13 scrolling effects!

When M is pressed the music changes to the next one in the list,
When Escape is pressed the reset screen is displayed,
When 1 or 2 is pressed the "Loading..." bitmap is displayed,
When 3 is pressed the "Guess where the are..." bitmap is displayed.

Effects are: 1. Straight horizontal scroller, 2. Horizontal scroller with alternate line spacing, 3. Double sine wave, 4. Arch, 5. Hump-backed bridge, 6. Inverse hump-backed bridge, 7. Sine wave, 8. Linear changing direction in middle, 9. Small sine wave with scroller y position offset by major sine wave, 10. Vertical sine wave with reflection, 11. 3* height horizontal scroller, 12. Horizontal scroller with double height reflection, 13. Uphill double height scroller.

Why?

Pure nostalgia. This demo also shows how to use the ST Sound Engine and YM player, use bitmap resources with DirectX and it uses the .EXE packer (upx.exe) to reduce the final size of the .EXE. I also show how to use scroll effect change instructions in a scroll routine.

Bugs fixed

1. The .YM tunes are not built in to the .EXE
This is because the public YmEngine.lib only uses standard file IO to read the tunes.
Just have to live with this at the moment, all the other resources are bound to the .EXE at compile time.
Arnaud Carré has released an updated version of his library to allow this.
Fixed in version 0.2

2. Sound deadlock on Windows NT4.0
The SoundEngine used WaveOut functions in a callback. The callback now posts a Window Message back to the main loop to do the sound playing. This prevents deadlock. This may be a sound driver implementation problem and so it had to be fixed.
Fixed in version 0.2

Known issues

1. Mode-X performance
The ST version had no lower border. This gives an approximate resolution of 320*240 pixels.

On the PC Mode-X (320*240) is the closest. It is a palettized VGA mode with performance issues on some graphics cards. Some cards perform better at 640*480 but I didn't want to have to double everything in size to use that resolution. Mode-X doesn't perform well on my old P200 with a 4Mb PCI SIS graphics card, but it's fine on my new machine. Any PC with an AGP graphics card should be OK.

History

17/9/2002
Build 2.
Sound player bug fix, tunes bound to .EXE as resources and new YM player library used.

7/9/2002
Build 1. Quick release.
This had 6 internal revisions, including an XP bug fix for the sound player.

Activities:
1. Ripped the 2 missing Led Storm music files using PaCifiST v0.48,
2. Learned how to use the YmEngine.lib and WaveOut sound player.

Using a real Atari ST:
3. Decompressed demo and jumped past protection using MonST2. I then had to modify Menu26.prg accordingly using Disk Doctor,
4. Make .MSA (for emulator) and keep modified .prg (for real Atari ST),
5. Ripped graphics using Ultimate Ripper.

Back on the PC:
6. Converted ST graphics to Windows Bitmaps using degas.exe (.PI1\.PC1 convertor) and PSP,
7. Wrote the demo code using DirectX demo template,
8. Reprogrammed scrolling effects and generated waveforms in VB (copied data into arrays in C),
9. Converted scroll text and added new effect identifiers,
10. Tested and released.

Build instructions

The program was built with Microsoft Visual C++ (Service Pack 5) on Windows 98 running DirectX 8 MiniSDK

1. Load myex1.dsw into Visual C++,
2. Goto Build\Rebuild All,
3. It should run.

DDRAW.LIB must be in the project, so go to the FileView and remove my reference and add a reference to DDRAW.LIB on your build machine if there are build errors.

Back to index.