Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: My simple image viewer for showing prior to emulator start (MALA, etc)  (Read 1079 times)

0 Members and 1 Guest are viewing this topic.

chucklepie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
  • Last login:September 09, 2013, 08:56:54 am
  • I want to build my own arcade controls!
Hello,
Simply I couldn't get CPWizard to display a control panel layout prior to starting the emulator for anything other than MAME, and I'm sure there are plenty of these image viewers about, but I created one specifically for my needs. Hopefully somebody might find it useful. It is just one Windows executable and if there's interest I'm sure I can make a mac and linux version as it's written in a cross-platform library.

What you do is run the executable and as the first parameter give it an image file: jpeg, png, pcx, bmp, it will open up and wait for any key press then close, e.g.
NeilsSimpleFileViewer.exe c:\images\Nintendo64CP.png

How I use it is with Mala:
1. In Mala Config select other emulators then click on one (e.g. Nintendo64)
2. In Executable tab under pre steps enter the command
3. Start a game and the image is shown - in this case it's my mappings for the nintendo 64.

You can also supply a number of parameters and it's pretty robust in dealing with screens. As follows:

To run:
NeilsSimpleFileViewer.exe IMAGE STRETCH FULLSCREEN DEPTH WIDTH HEIGHT

Usually NeilsSimpleFileViewer.exe c:\myimage.jpg

Is all you need for an arcade cabinet and it will display the image fullscreen using the current desktop settings.

It is best to try this out from a command/dos window to ensure it works before integrating into MaLa or other front-end.
I use CPWizard to produce the layout with buttons, etc then export as an image and use that.

IMAGE: full filename and path to the image, quotes required if spaces in path/filename
STRETCH: 0 display the image as it is, 1 stretch it to fill the screen. Default 0
FULLSCREEN: 0 run as a windowed application, 1 run as a fullscreen application. Default 1
DEPTH: colour depth for screen, e.g. 16, 32. Default whatever desktop is
WIDTH/HEIGHT: pixel size to make screen. Default whatever desktop is

Only the filename is required.
Without an image or if '--help' is sent the parameters/help is displayed to the screen

To use the default for DEPTH/WIDTH/HEIGHT supply -1, which is the current desktop.

e.g. NeilsSimpleImageViewer.exe "c:\myimage.png" 1 0 -1 640 480
will show an image streteched in a window using the current depth and 640x480

If you experience flashing or magenta screen, it's because it couldn't use the settings you preferred. It will either  eventually work or give up and show the error on the screen

The order of activity is:
1. Using data as supplied, failing that
2. Using data supplied but desktop width and height, failing that
3. Using data supplied but desktop width and height, a depth not the one supplied (16 or 32)
4. Using desktop settings in a safe mode that should work

I've tried this on my arcade cabinet which is just a standard windows 7 machine, it requires DirectX 3, which should be on almost all windows computers.

If you get any difficulties then run the DEBUG version and any messages will appear on the dos windows.

The location is:
https://docs.google.com/file/d/0BxqlWI4aN5_CaFZpc2hweHFfNjg/edit?usp=sharing

click on file then download.

You only need the one .exe, the rest is a debug version as mentioned, some test images and the source code.

Neil.

chucklepie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
  • Last login:September 09, 2013, 08:56:54 am
  • I want to build my own arcade controls!
I've now added images (with CP Wizard layout files) for about 9 emulators (3DO, Atari2600, GBA, SNES, Dreamcast, Jaguar, Pinball, Genesis, N64)
https://drive.google.com/folderview?id=0BxqlWI4aN5_CWWt5X3lDTkpvVGM&usp=sharing

Here's a couple of samples.
« Last Edit: May 26, 2013, 09:06:32 am by chucklepie »