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: Software problems or glitches after adding rotation?  (Read 7345 times)

0 Members and 1 Guest are viewing this topic.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Software problems or glitches after adding rotation?
« on: November 02, 2012, 03:14:57 pm »
I gave up on using the parallel port in Vista64 and moved on to a usb pololu motor driver/controller. 
Had it swapped in and rotation working in a couple hours.
I'm using Mala with the Startcom plugin and a batch file (copied from TopJimmyCooks) to trigger rotation via pololu command lines.

I'm having a couple issues and wondered if anyone else has had them and found a solution.

First-

The rotation is working fine, but when launching a game in MAME after rotating the screen, MAME will work normally for about 5 seconds, then shrink down to a small title bar in the upper left corner of the desktop.  I can still hear it, but Mala is also active and playing video snaps.
The only way to fix things is to bring up task manager and kill the proccess (switching to MAME does not bring it back).
I think MAME, startcom, & my batch file are tripping over each other at some point, but if I have startcom not launch the game until after rotation, it still happens.
It only happens with MAME, not other emulators.  I'm using SGT's all-in-one list method where Mala is pointed to a batch file to launch the appropriate emulator rather than pointed to mame.exe.  I guess that's another batch file executing at the same time as the others.  ;D

Having Startcom rotate Mala after the game exits instead of before it launches, fixes the issue, but I'd rather have it rotate before the game launches, while everything is hidden behind a splash screen (which I haven't added yet).

Strange thing is that I could have sworn it wasn't doing this before I installed a new layout that had both horizontal & vertical layouts included.
EDIT: It's possible that I changed some setting related to layout resolution or re-ordering the layout.  Hmmmm...will have to experiment with that when I get home.


Second-

I copied TopJimmyCooks batch file to rotate the screen back to horizontal when Mala exits, but Mala is still in the vertical layout next time it is started.
Is there a way to make Mala start in the horizontal layout every time?


I'm loving having a big monitor for both directions.
Thanks to all who made this a possibility.  :cheers:

I'd be interested in hearing about any other problems that have crept up and what you did to overcome them.

« Last Edit: November 02, 2012, 03:20:05 pm by BadMouth »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Software problems or glitches after adding rotation?
« Reply #1 on: November 02, 2012, 06:41:51 pm »
Did some testing regarding my first issue.  Re-ordering the layout and changing the desktop resolution options in Mala had no effect.
I pointed Startcom to a dummy bat file to see if it was my rotation bat;made no difference.

I put a long delay in my bat file that launches MAME.  MAME stayed full screen and worked, but that gave me time to notice something else....
When Startcom Rotates the Mala layout, the video snap starts playing again and continues to play while MAME is running.
I disabled the video snaps and the problem went away.

DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #2 on: November 06, 2012, 02:14:46 am »
64 bit is a little strange as far as using Mrotate, BUT... I have used it on my new 64 bit Win 7 with no apparent issues.
However I did find that I must place inpout.dll in the same folder as mrotate.

Im not sure what you have going on with Mala. I will need to simulate your setup and see what i can find.

On a related note:
I could not use an old DOS checkbook program with 64 bit Win7. I have been using this program for several years and it does what i need, so I was disappointed to find i may have to finally SC it after 20 years, BUT.. I found a very neat little program that runs dos on 64 bit systems, its called DosBox.
Im thinking that using dosbox, we may be able to run my very first version of mrotate for dos, called drotate, in 64 bit.
But I have not tried it yet, so its just a pipe dream right now.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Software problems or glitches after adding rotation?
« Reply #3 on: November 06, 2012, 08:03:36 am »
Im not sure what you have going on with Mala. I will need to simulate your setup and see what i can find.

It's using mp4 video snaps from emumovies with Mala v1.745 (WIP).
Problem is caused by the video player restarting the video when Startcom rotates Mala before the game.

I'm not sure if anyone else is using video snaps with their rotating setup?
Mala did get a new video player, so maybe it's not an issue with the old version of Mala and avi snaps?

I have it set to rotate after the game exits and that works fine, but you can see Mala facing the wrong direction for a bit before it is rotated.

DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #4 on: November 06, 2012, 10:07:34 am »
Have you tried a previous version of mala?

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Software problems or glitches after adding rotation?
« Reply #5 on: November 07, 2012, 05:22:04 pm »
Have you tried a previous version of mala?

I hadn't before.  I tried v1.74 just now and it works fine.
Had to use AVI files since MP4's aren't supported in that version.

For the sake of testing, I tried using AVI files with the new version(v1.745) and still had the issue.
I also tried it without the display delay enabled in Mala.
Without the display delay, MAME stays fullscreen and works, but I can still hear the video preview playing in the background.

Looks like it's an issue introduced with Mala's new video player.
It's a fairly minor issue on a WIP Mala build.  Do you think you'll mess with it?

DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #6 on: November 09, 2012, 12:16:39 pm »
It sure sounds like a problem with Mala, maybe you ask about it over in the Mala forum.

TopJimmyCooks

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2097
  • Last login:March 26, 2024, 01:18:39 pm
Re: Software problems or glitches after adding rotation?
« Reply #7 on: November 09, 2012, 12:30:38 pm »
My bat files and mala/startcom setup don't rotate back to horizontal on game exit.  Mala does switch the layout orientation to match the screen.  I have another, different bat file that rotates the screen to horizontal upon mala exit, to be able to look at everything else in windows correctly while outside Mala. 

Therefore, If I have mala and the screen vertical and exit the system via windows/momentary system power switch, it comes back up vertical and mala remembers to use vertical layout.  If I exit mala to windows it will rotate horizontal after mala exit, so the next time you start mala the screen is horizontal and the layout is vertical/sideways.  I never really pursued fixing this - I just mapped the pause button so that it flips the layout while Mala is active. 

I don't use videos so I don't have any info on that issue.  I would love for mala to always start with a layout coordinated with the screen orientation, but that's a complex issue that not a lot of people would use. 

DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #8 on: November 10, 2012, 11:57:08 am »
...I would love for mala to always start with a layout coordinated with the screen orientation, but that's a complex issue that not a lot of people would use.

I do have a small program that will look at the printer port inputs before starting mala, to detect if the monitor is horz or vert, and start mala in the appropiate orientation based on that.
The idea is to have this program in the startup folder of windows, then let it start Mala.
It does read the printer port, so your limits will need to tie to the printer port, if your present setup does not use the printer port, you can add additional limits that tie to it.
If you dont have a printer port, but do have the 9 pin serial port, I have done some work with the serial port. There are two inputs on it, and with a ittle tweaking I can modify my program to look at those inputs instead of the printer port ones.
Let me know if it interests you.

Update: I guess if you couldnt get your printer port to work before, it probably wont work with the program I just mentioned.
« Last Edit: November 10, 2012, 04:45:53 pm by DaOld Man »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Software problems or glitches after adding rotation?
« Reply #9 on: November 13, 2012, 07:56:20 pm »
I made a quick fix for having Mala start on horizontal every time (since I have the monitor rotate on exit every time).
Added:
Code: [Select]
@echo off
Copy /Y "C:\Emulators\Mala\horizontal.ini" "C:\Emulators\Mala\mala.ini"
to the rotate on exit batch file.

horizontal.ini is just mala.ini with horizontal settings saved.
Of course, the gamelist and game you were on won't be the last one you were on. 
It will be whatever you were on when horizontal.ini was created.

I messed around a little bit trying to make a batch file that would just swap in the single vertical=0 line to mala.ini, but it was a bit over my head.

Not too worried about it, as I just wanted a temporary fix while I'm setting things up.
Once the cab is set up, I won't bother having the monitor rotate to horizontal on exit any more.

DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #10 on: November 14, 2012, 11:30:41 pm »
There are two (or maybe 4, I will have to double check, its been a while) sections of the mala.ini that my program changes to get correct orientation. Its pretty simple to open the ini file as a text file, change the settings, then re-save it.
That way everything is saved and Mala starts as it normally would.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Software problems or glitches after adding rotation?
« Reply #11 on: November 15, 2012, 07:19:36 pm »
There are two (or maybe 4, I will have to double check, its been a while) sections of the mala.ini that my program changes to get correct orientation. Its pretty simple to open the ini file as a text file, change the settings, then re-save it.
That way everything is saved and Mala starts as it normally would.

Just realized that since I'm playing a video at startup, the screen does need to be horizontal on startup every time.
Could you give me an example of how to change individual lines via batch file?
Pretty please?  :angel:

DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #12 on: November 15, 2012, 11:47:20 pm »
Well, Im not sure about doing it with a bat file, I have although changed my program to allow you to do it from a bat file. (Run or call this program with desired argument form your bat file.)
The name of the program is malaori3.
You will need to run this file instead of mala.
This file will start mala in the orientation that you pass to it via an argument.
Example:
malaori3 90 will start mala in the 90 degree orientation.
You will need to run setup first by starting malaori3 (malaori3 with no argument will start the setup program.) Examples: malaori3  malaori3.exe or double click on malaori3 icon.
After you run setup, next time run malaori3 90 to start mala in 90 degree orientation, malaori3 0 for 0 orientation, etc.
A couple of screenshots of the setup mode below, and malaori.zip file.
This is beta mode only, please let me know if you have any issues.

Edit: modified program to allow user to just change the mala.ini file and not start mala.
Latest program is below, plus new screen shot showing modification.
Enjoy!
« Last Edit: November 16, 2012, 11:47:20 am by DaOld Man »

DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #13 on: November 16, 2012, 12:23:43 am »
I have just modified malaori3 to allow you to use it to only change the mala.ini file and not run mala.
I was thinking this may be what you really need, if so let me know I will post it.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Software problems or glitches after adding rotation?
« Reply #14 on: November 16, 2012, 09:47:28 am »
Sweet!  I will set it up and test tonight.
I'd like the other version too if it's already created since it might work out better to make the changes on exit.

Some of the Taito Type X games (which originally ran on embedded xp) won't run if Mala is running,
so I have an autohotkey script that kills mala, then restarts it on game exit.
This will fix the orientation issue for those also.
 
I really appreciate it.




DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #15 on: November 16, 2012, 11:54:33 am »
Sweet!  I will set it up and test tonight.
I'd like the other version too if it's already created since it might work out better to make the changes on exit.

Some of the Taito Type X games (which originally ran on embedded xp) won't run if Mala is running,
so I have an autohotkey script that kills mala, then restarts it on game exit.
This will fix the orientation issue for those also.
 
I really appreciate it.

No problem..
Latest version is in the download link above.
Hope you enjoy it. I used win7 64 bit to modify the original Malaori (for printer port inputs), so this should run on 64 bit or 32 bit.
Let me know if you have any problems with it.

DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #16 on: November 16, 2012, 12:01:19 pm »
If anyone wants to use this with your printer port inputs, I can upload the original MalaOri.

Edit: The original MalaOri has already been uploaded to the file repository.
The original MalaOri looked at your printer port inputs on startup, and based on horz or vert limit switch being made, re-writes mala.ini and then starts mala to match the current monitor orientation.
If you would like to try it, you can find it here:

http://files.arcadecontrols.com/details.php?image_id=3585
« Last Edit: November 16, 2012, 04:24:20 pm by DaOld Man »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
Re: Software problems or glitches after adding rotation?
« Reply #17 on: November 16, 2012, 08:05:04 pm »
It works perfectly except when I run it on exit.
For some reason the changes just don't take when it's run on Mala exit.
I guess Mala is still writing to the ini. 
If I run the same batch file a second later, the changes are made.

Launching malaori3 and having it launch Mala accomplishes everything I need though.
I added it to the few Taito Type X scripts that needed to relaunch Mala and it does exactly what I wanted.

Since my monitor rotates counter clockwise, it was nice being able to change the settings to still use 90 as a command instead of 270.

Thanks again! 
 :cheers:

On a side note, I'm in the process of re-downloading my video snaps in AVI format so I can revert to Mala v1.74 and be done with the other issue.  :)
EDIT: reverted to Mala v1.74 and still have the issue.  I guess my testing was flawed.  :banghead:
Oh well, just going to have startcom rotate mala after the game exits and try to make a black splash screen to cover it.
« Last Edit: November 17, 2012, 12:48:36 pm by BadMouth »

DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #18 on: November 16, 2012, 08:48:48 pm »
Im glad it worked for you, and yes, I think mala does update the mala.ini file on exit.

TopJimmyCooks

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2097
  • Last login:March 26, 2024, 01:18:39 pm
Re: Software problems or glitches after adding rotation?
« Reply #19 on: December 14, 2012, 11:39:30 pm »
Ken, I would name my firstborn after you if it wasn't already 10 years too late.  I am now using MaLaOri3 to change mala.ini to always start in the horizontal layout.  I added calling MalaOri3 to my batch file written to always rotate to horizontal on mala exit.  Thanks for doing that program. 

DaOld Man

  • Moderator
  • Trade Count: (+4)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 5139
  • Last login:December 13, 2023, 12:03:14 am
  • Wheres my coffee?
    • Skenny's Outpost
Re: Software problems or glitches after adding rotation?
« Reply #20 on: December 15, 2012, 10:02:10 am »
Why thank you for the kind words TJC!
Im glad it worked for you.
And go ahead and re-name the kid "DaOld Man", I bet his friends would love that!  :lol

Sneak peek: This will be announced later in its own thread, but here is what Im working on right now:
On the juke boxes I have made, I added a "service mode" switch that allows the user, on startup,  to go to windows desktop instead of running the juke front end (X-Lobby in my case).
This was intended to allow user to start up in windows to rip cd's and play dvds, since I never could get X-Lobby to do it. It worked pretty well, so on my latest arcade cab, "A Little Rage" Im going to add a service switch inside the cab that will basically do the same thing as the jukes' service switches. I figure this will be handy for troubleshooting and PC maintenance.
My new program (Im calling it "winstart" right now, but it's subject to change), will be placed in the windows startup folder.
When the program starts, it will look at the printer port to see if a chosen input is connected to the ground (via the service switch), if not, then it will start mala (or just about any front end), if the switch is made, then it wont start mala.
Pretty simple.
But Im thinking that if I have mala selected to shut down the arcade when I exit it, then if I need to run mala while in service mode, when I exit it, the arcade will shutdown, which may not be desirable.
So instead of having mala shutdown the PC, I have it call winstart when I exit mala.
It will call it with an argument "shutdown".
So when mala exits, winstart will again check the status of the printer port input pin, and shutdown the PC only if the service mode switch is not on.
I may re-write this as a mala plugin, but that will be later. Plus as it is now it should work with just about any front end that can call a program on exit.
Wish me luck.