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: MameCFE (new frontend)  (Read 4101 times)

0 Members and 1 Guest are viewing this topic.

AndrewEmpson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 08, 2008, 07:09:23 am
MameCFE (new frontend)
« on: May 27, 2008, 11:17:19 pm »
Hi

I posted this on another forum, and it was suggested I post it here. It's a new keyboard driven frontend for Win2k or higher, which I wrote for the cabinet I've built. I thought other people might like it too. Copy the contents of both zip files into your MAME folder, then run MameCFE.exe. It will build a list of games for your version of MAME, the build a list of games you have and create an ini file. You can edit the ini file to change colours, fonts, background image and categories.

It requires any Win 32 (haven't tried it in 64) with DirectX 9. I had to break it into 2 zip files because of the posting size limit per attachment on this forum. Screenshot is also attached (snaps appear on the left of the game list). The ReadMe file explains the keys and setup.

If you want to remove it after you've had a play, delete the following files:
MameCFE.exe
MameCFE Readme.txt
DevIL.dll
MameList.txt
MameCFE.txt
MameCFE.ini

Otherwise, enjoy!

Cheers,
Andrew.
« Last Edit: June 03, 2008, 06:36:11 pm by AndrewEmpson »

Cakemeister

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1002
  • Last login:May 31, 2024, 06:23:16 pm
  • I'm a llama!
Re: MameCFE (new frontend)
« Reply #1 on: May 28, 2008, 11:53:20 am »
The fast text scrolling is nice.

DevIL handles many more file formats than just bmp and jpg. The frontend crashed when I tried a png image. Why not support png?

Also, when I tried alt tabbing, the background was all messed up when I switched back to the application.

Old, but not obsolete.

AndrewEmpson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 08, 2008, 07:09:23 am
Re: MameCFE (new frontend)
« Reply #2 on: May 28, 2008, 06:30:43 pm »
Hi Cakemeister

Could you post the png file so I can test it?

Cheers,
Andrew.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #3 on: May 29, 2008, 03:40:48 am »
I couldn't get this to work at all it looks like it's caught in a loop trying to change resolution. Perhaps you could add a logging feature to help track down problems?
« Last Edit: May 29, 2008, 03:47:34 am by headkaze »

Space Fractal

  • Wiki Master
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 1888
  • Last login:September 26, 2023, 11:32:13 am
  • Space Fractal
    • Space Fractal
Re: MameCFE (new frontend)
« Reply #4 on: May 29, 2008, 04:46:19 am »
The fast text scrolling is nice.

DevIL handles many more file formats than just bmp and jpg. The frontend crashed when I tried a png image. Why not support png?

Also, when I tried alt tabbing, the background was all messed up when I switched back to the application.



Pretty normal in DirectX9 applications, which is a annoying "feature" in Direct9 itself. The apllication might not check, if the graphic have been gone or not.
Decade Old Work: MultiFE, ArcadeMusicBox
Today Works: Various Spectrum Next games from Rusty Pixels and html5 games.

youki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1612
  • Last login:November 19, 2016, 01:07:33 pm
  • Atomic Front End Creator
    • Atomic Front End
Re: MameCFE (new frontend)
« Reply #5 on: May 29, 2008, 05:16:54 am »
I read you made it using EBasic .

I didn't know that Free Basic . It seems very interresting to do quickly little graphic tool  thanks to its DirectX 9 integration.

It didn't try it. But what do you think of this basic?  Do you have experience with other development tool? How would you compare to them?


AndrewEmpson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 08, 2008, 07:09:23 am
Re: MameCFE (new frontend)
« Reply #6 on: May 29, 2008, 06:29:11 am »
headkaze: I think the loop is my fault. If it gets an error trying to initialize the directx screen, it waits 4 seconds then tries again, but it only does it 3 times, then errors out. I put this in because it's in my startup folder, and the video card takes a few seconds to initialize once Windows starts. I don't know why it wouldn't work at all on your machine. Does other DirectX stuff work?

Space Fractal: I'm not sure how to check if the sprite has been corrupted. I'm checking for a NULL sprite before attempting to draw it, but for some reason, Windows seems to overwrite that chunk of memory with some garbage when you alt-tab. I don't want to reload the sprite each time I have to draw it, because that would really slow it down.

Youki: EBasic is a great language, and I've used a few. BASIC and 6502 asm on the Apple ][e, QBasic in Dos, Visual Basic, IBasic standard and professional, M$ Visual C in Windows, Onboard C, GCC and PocketC on the Palm, and now EBasic.

I've found Ebasic to be very simple and powerful. It's like a cross between Basic and C++ - with the simplicity of Basic, but the power of C++. It creates full compiled standalone exe and dll files (no runtimes), and is quite quick for prototyping. Supports classes and inheritance, 2d and 3d directX built in (OpenGL is available too - I had to use some OpenGL functions to read the png snapshots).

Worth learning I think.

Cheers all. Trying to fix the alt-tab problem, and not sure about the bad png, because mine all load fine.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #7 on: May 29, 2008, 06:56:57 am »
headkaze: I think the loop is my fault. If it gets an error trying to initialize the directx screen, it waits 4 seconds then tries again, but it only does it 3 times, then errors out. I put this in because it's in my startup folder, and the video card takes a few seconds to initialize once Windows starts. I don't know why it wouldn't work at all on your machine. Does other DirectX stuff work?

Yes definately not a problem with DirectX, this is actually my development machine so it has the DX SDK installed and I've developed a few DirectX applications on it. I followed the instructions, installed to C:\Mame, it created the gamelist.txt list, showed a picture of the Mame logo but then kept trying to change resolution in a loop. I could tell it was in a loop because on my secondary monitor I could see it changing (if you use two monitors the second screen will go strange when it's changing resolution). Perhaps you could have it run in the desktop resolution by default rather than forcing a new one.

Not sure what it could be I don't have any problems running (or developing) for DirectX on this machine. That's why I suggested adding file logging so it will show where the problem is occuring in the intialization.

I'm interested in seeing how your text scrolling works, because I've implemented high speed scrolling in my own DirectX engine I'm developing. I was more just curious to see how you implemented it. Still I don't mind helping beta test it but there really needs to be error logging for any kind of hope in finding whats going wrong.

BTW I'm not sure if you've realised this but all the people who have replied to your thread so far are software developers.
« Last Edit: May 29, 2008, 07:02:50 am by headkaze »

AndrewEmpson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 08, 2008, 07:09:23 am
Re: MameCFE (new frontend)
« Reply #8 on: May 29, 2008, 07:43:17 am »
No, I didn't realise that. Good to know, thanks :)

Unusual that it would show the title screen then wig out. It shouldn't be attempting to change resolutions once that's happened, until you run a MAME game, and it doesn't create the MameList.txt file or display the logo until DirectX has successfully initialized. Maybe my Heapsort algorithm is playing up, or it could be running into problems trying to iterate through the roms folder. I'll add a log to it tomorrow and repost, if you could try it out again then?

The scrolling acceleration is just handled with timing. I have a global integer (pressed) holding the last keypress. If a key is pressed, Pressed holds the key value so I know whether it's being held or just been pressed. Hold a key for a certain amount of time (say 3 seconds), and it adds 5 to the selection increment. After each 3 seconds pass while the key is still being held down, +5 more to the increment. The increment resets to 0 when the key is released. So when you first hold it down, it's slow enough to be accurate, and the longer you hold it, the faster it gets.

Edit: Actually, looking back, it only accelerates it twice to a maximum increment of 11.

Thanks for the response.
« Last Edit: May 29, 2008, 07:47:56 am by AndrewEmpson »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #9 on: May 29, 2008, 07:57:41 am »
Happy to test it again with the log file added :)

You've pretty much done the scrolling the same way although I use a floating point variable for acceleration so it speeds up more gradually (adding 0.1f each time a KeyDown event occurs). It gets fast pretty quickly so I can find any game in a 3000 game list in about 5 seconds but you can still scroll through games one by one as well. My maximum accelleration is 100.

I don't need to use timers or anything because in C# it has both KeyDown and KeyUp events, so I just use the KeyDown to accellerate and Keyup to reset the accelleration.

youki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1612
  • Last login:November 19, 2016, 01:07:33 pm
  • Atomic Front End Creator
    • Atomic Front End
Re: MameCFE (new frontend)
« Reply #10 on: May 29, 2008, 08:02:55 am »
Quote
The scrolling acceleration is just handled with timing. I have a global integer (pressed) holding the last keypress. If a key is pressed, Pressed holds the key value so I know whether it's being held or just been pressed. Hold a key for a certain amount of time (say 3 seconds), and it adds 5 to the selection increment. After each 3 seconds pass while the key is still being held down, +5 more to the increment. The increment resets to 0 when the key is released. So when you first hold it down, it's slow enough to be accurate, and the longer you hold it, the faster it gets.

Exactly like i implemeted by Turbo Browse option , in my Front End. :)
« Last Edit: May 29, 2008, 11:51:14 am by Peale »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #11 on: May 29, 2008, 08:30:22 am »
Yeah I think it's pretty obvious how it would work, I was actually more interested to see if it was per-pixel scrolling or not. I don't think that would work very well in Atomic though as it uses DirectDraw. I noticed your horizontal text scroller and background scrolling is pretty jerky in Atomic and I've had the same issues with blitting using DirectDraw for per pixel scrolling.
« Last Edit: May 29, 2008, 08:35:06 am by headkaze »

youki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1612
  • Last login:November 19, 2016, 01:07:33 pm
  • Atomic Front End Creator
    • Atomic Front End
Re: MameCFE (new frontend)
« Reply #12 on: May 29, 2008, 08:45:54 am »
Scrolling rendering in Atomic depend lot on machine power and graphic card. And different parameter you use in the layout editor. Like timing.

I didn't try to achieve perfect quality Scrolling for the Front end, i had other thing to concentrate on.

But i can assure you , you do very smooth scrolling with DirectDraw. I made few year ago a video game using DirectDraw 3 under window 95. featuring multidirection scrolling on multiple plan , and it was very very smooth on a Pentium 90 and a Matrox Mystic. (the machine i had i this time).

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #13 on: May 29, 2008, 09:06:06 am »
Scrolling rendering in Atomic depend lot on machine power and graphic card. And different parameter you use in the layout editor. Like timing.

I didn't try to achieve perfect quality Scrolling for the Front end, i had other thing to concentrate on.

But i can assure you , you do very smooth scrolling with DirectDraw. I made few year ago a video game using DirectDraw 3 under window 95. featuring multidirection scrolling on multiple plan , and it was very very smooth on a Pentium 90 and a Matrox Mystic. (the machine i had i this time).

Yeah it depends alot on how much is going on in the render loop, I've even had trouble with smooth scrolling in Direct3D if the frame rate is not keeping up with the monitor's refresh rate when using VSync. I'm interested in getting per pixel text scrolling going as I think it would look pretty cool. Haven't seen it being done well yet.

I've seen some good games written in DirectDraw, but it's not going to give you the extra speed that Direct3D does. It's a shame Microsoft dropped development for DirectDraw as doing 2D stuff is much more difficult in Direct3D. I think they dropped it more because the hardware was being optimized for 3D so I guess it didn't make sense to continue with that API. I think more people are going to be using shaders and the GPU for calculations in the near future. Unfortunately DirectDraw could not take advantage of that.

Speaking of Atomic I've seen the default skin running in Khameleon and the scrolling is still pretty bad. You would think running it through OpenGL would improve it. What happened there Cakemeister?

Cakemeister

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1002
  • Last login:May 31, 2024, 06:23:16 pm
  • I'm a llama!
Re: MameCFE (new frontend)
« Reply #14 on: May 29, 2008, 09:35:26 am »
Hi Cakemeister

Could you post the png file so I can test it?

Cheers,
Andrew.
Old, but not obsolete.

Cakemeister

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1002
  • Last login:May 31, 2024, 06:23:16 pm
  • I'm a llama!
Re: MameCFE (new frontend)
« Reply #15 on: May 29, 2008, 09:41:52 am »
Quote
Speaking of Atomic I've seen the default skin running in Khameleon and the scrolling is still pretty bad. You would think running it through OpenGL would improve it. What happened there Cakemeister?

Please send me a PM with the symptoms of the problem you're having, I don't want this thread to go off topic.



Old, but not obsolete.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #16 on: May 29, 2008, 10:24:41 am »
Please send me a PM with the symptoms of the problem you're having, I don't want this thread to go off topic.

Good point, sorry about the slight derailing there Andrew. PM sent Cakemeister.

AndrewEmpson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 08, 2008, 07:09:23 am
Re: MameCFE (new frontend)
« Reply #17 on: May 29, 2008, 06:41:19 pm »
No worries. I didn't want to do pixel scrolling initially, even though it would be smoother. Might look into it later.

I've attached a new version with logging to the first post in this thread. Also now supports windowed or fullscreen mode (set through the ini file [System], Window=Windowed/FullScreen), and can now go in any folder as long as devIL.dll is in the same place. Appreciate the testing :)

Cakemeister: That png doesn't crash for me. It takes a second to load because it's so big, but works fine. What's the crash at your end? BSOD?

Cheers,
Andrew.
« Last Edit: May 29, 2008, 07:37:38 pm by AndrewEmpson »

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #18 on: May 29, 2008, 07:29:06 pm »
Can I suggest you edit your first post and put the new upload there. It saves people searching around a thread for the latest version. Also it might be a good idea to clear the log everytime the program runs.

This time I'm getting "MameCFE.exe has encountered a problem and needs to close." I tried it in both Fullscreen and Windowed mode. In Windowed mode it shows the Mame logo and a some messages down the bottom of the screen, but crashes just after it says "Building Available Game List".

Attached is my log and ini file.

AndrewEmpson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 08, 2008, 07:09:23 am
Re: MameCFE (new frontend)
« Reply #19 on: May 29, 2008, 07:39:38 pm »
Thanks for that headkaze. Have updated first post.

Are your ROMS in the normal spot?

Cheers,
Andrew.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #20 on: May 29, 2008, 07:42:54 pm »
Thanks for that headkaze. Have updated first post.

Are your ROMS in the normal spot?

Cheers,
Andrew.

No they wouldn't be considered in the normal spot. They are located in C:\Emulation\Roms\Mame. But I was assuming you were reading in mame.ini and getting the rom folder from there.

mame.ini
Code: [Select]
rompath                   C:\Emulation\Roms\Mame
If this is what is causing the crash can you add an option to change the location of the ROM folder? I think a few people would like this because people often have their ROMs located on a different drive.

AndrewEmpson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 08, 2008, 07:09:23 am
Re: MameCFE (new frontend)
« Reply #21 on: May 29, 2008, 07:56:13 pm »
Ah. I never even thought of having the roms in a different path. Silly me. Added an entry for the Roms folder in the ini file, and exits semi-gracefully if it's wrong. New version at the first post again. Next version I'll check the mame.ini file for it first.

Thanks again headkaze.

Andrew.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #22 on: May 29, 2008, 08:15:31 pm »
Okay it works now :) I quite like it, it's very simple and does the job well. Very nice :)

I have a few suggestions / bug reports

- In the MameCFE.ini when you specify folders they must end in "\". If they don't it can't find the folder
- When scrolling through a list, I like the menu wrapping, but there is a huge blank gap between "Zzyzzyxx (set 2)" and "(Medal) Yumefuda [Bet]". In fact ROMs 1 to 116 are blank and "(Medal) Yumefuda [Bet]" actually starts at 117.
- When you exit the first option should be "Exit to Windows" rather than shutdown
- I don't like how the snaps move in from the side. I would much rather them just appear straight away. Perhaps an option to turn it off? Also some snaps are showing up blank.
- I much prefer videos than snaps, perhaps consider adding support for them
« Last Edit: May 29, 2008, 08:17:34 pm by headkaze »

AndrewEmpson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 08, 2008, 07:09:23 am
Re: MameCFE (new frontend)
« Reply #23 on: May 29, 2008, 09:58:39 pm »
Videos?  :o Shows what I know about it! Can you record them from MAME? What format are they in?

The rest should be pretty easy fixes. A bit of a worry that there are blanks in there though. I wonder if some of the games in your list have been dropped off all together. Could I see your MameCFE.txt file?

Cheers,
Andrew.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #24 on: May 29, 2008, 10:05:28 pm »
Videos are generally in avi format, XVid/mp3 but it depends. Check out EmuMovies for more info.

You can record from Mame, it outputs mng format which is a movie/png format. If you press Shift-F12 when running Mame it will start recording. But Circo from EmuMovies has converted them to avi format, and they are much better than recording your own anyway. There are other sets available, but EmuMovies are the best.

HEre is my MameCFE.txt attached

AndrewEmpson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 08, 2008, 07:09:23 am
Re: MameCFE (new frontend)
« Reply #25 on: May 29, 2008, 10:13:24 pm »
Thanks for the info on movies. Will definitely look into it.

Hm. Lots of blanks. They should only show up in the 'ALL' category though, not the Unsorted one, which is where all of your available games start out. The main worry there is there are 7076 games listed, of which 116 are blank, so they're not being inserted, those games (whatever they were) in the master list are being ignored.

Thanks again. I have something to look for now.

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: MameCFE (new frontend)
« Reply #26 on: May 29, 2008, 10:24:31 pm »
Sorry my bad, I must have moved the category to All, when I go to Unsorted they display fine. Still I guess it's worth figuring out why there are blanks. I've attached my MameList.txt just in case that will help also.

AndrewEmpson

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:June 08, 2008, 07:09:23 am
Re: MameCFE (new frontend)
« Reply #27 on: May 30, 2008, 01:48:29 am »
Updated. Should fix all problems you mentioned, but no video yet.

Another assumption of mine was that MAME 0.125 would be on the machine, so I hard coded the gamecount into it. Oops!  :-[ If you delete your MameCFE.txt file so that it can recreate it, the blanks should now disappear.

Exit is now before shutdown, trailing folder slash is added automatically if you don't put it in, animation is controlable through the ini file, mame.ini is checked for correct rom dir on first run.

Thanks again!

Andrew.

youki

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1612
  • Last login:November 19, 2016, 01:07:33 pm
  • Atomic Front End Creator
    • Atomic Front End
Re: MameCFE (new frontend)
« Reply #28 on: May 30, 2008, 04:06:01 am »
Hi,

I suggest you check what and how other Front End does.

We have now for some of us , few years of experiences in Front End development. Responding to most of user's requests. It could avoid you to go to wrong way for instance.

If you didn't , you should try AtomicFe , Mala or MameWah for instance.

have a look to this video for instance. You can see few features of Atomic like video display instead of snap.



As you are starting a new front end, it would be good to not do the same errors we did.  Or may be to improve things where our front end are weak.
« Last Edit: May 30, 2008, 05:42:30 am by youki »

Neverending Project

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 851
  • Last login:April 06, 2015, 10:07:43 pm
    • Arcade Fixer
Re: MameCFE (new frontend)
« Reply #29 on: May 30, 2008, 11:48:03 am »
You can record from Mame, it outputs mng format which is a movie/png format. If you press Shift-F12 when running Mame it will start recording. But Circo from EmuMovies has converted them to avi format, and they are much better than recording your own anyway. There are other sets available, but EmuMovies are the best.

As of .125u1, MAME can now output uncompressed AVI files. But you're right... it is still much easier to use all the hard work that Circo has done.