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: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron  (Read 11385 times)

0 Members and 1 Guest are viewing this topic.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9269
  • Last login:July 01, 2025, 07:12:10 am
  • ...
More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« on: October 10, 2010, 10:42:03 am »
I've been wanting to work on this for a while.

Makaron T12-5 build added the ability to resize the Naomi PVR window.
I thought this could be useful for vertical shmups: http://forum.arcadecontrols.com/index.php?topic=105109.0
(see that thread for info on sizing the window)

Anyways, finally got around to writing a script to rotate the screen and launch the game (and rotate back on exit).
irotate must be installed.

Credit for making the background black and covering up the emulator window as it launches should go to TAG,
as I lifted that part from this thread: http://forum.arcadecontrols.com/index.php?topic=105956.0

On my test computer which runs vista, I unchecked "Keep Taskbar on Top Other Windows" under properties.
I haven't tried it on my arcade setup yet (it runs XP)

The way I did it requires a script for each game, but there aren't many.
I was having trouble getting the game to launch when I tried to run the script seperate,
so for the sake of getting it done, I made launching the game part of the script.
There is probably a better way, but it depends on which front end you are using.
This way, it shouldn't matter, just point the front end at the ahk script.

Anyways, here 'tis if anyone else wants to play around with it.
(MButton is my exit key, the sleep is so long because blacking out the window frame wouldn't work consistently without it being that long, moving the mouse seemed easier than hiding the cursor)

EDIT: I should also add that since the options in the service menu have to be set correctly for the game to launch, I have multiple copies of Makaron installed..i.e. 2P Horizontal, 1P Vertical, 2P Vertical.  In this case my Makaron4 folder is a copy of Makaron with the settings for 2P Vertical.  Again, there may be an easier way, but it's a tangled web we weave, when of multiple emulators we conceive.

Code: [Select]
Send, {CTRLDOWN}{ALTDOWN}{Left}{ALTUP}{CTRLUP}

Gui -Caption +ToolWindow                                        
Gui, Color, 0                                                                                
Gui, Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%, HSHIDE    

Gui, 2: +AlwaysOnTop -Caption +ToolWindow                                        
Gui, 2: Color, 0                                                                                
Gui, 2: Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%, HSHIDE  

MouseMove, 1439, 100

Run, C:\Emulators\Programs\Makaron4\NAOMI.exe ikaruga.dat

sleep, 1200
WinSet, Style, ^0xC00000, NAOMI - PVR

WinActivate, NAOMI - PVR

Gui, 2:Destroy

MButton::
Process, Close, NAOMI.exe
Gui, Destroy
Send, {CTRLDOWN}{ALTDOWN}{Up}{ALTUP}{CTRLUP}
ExitAPP
return

The transition is really clean, makes me want to go back and refine some other emulators.

Here is the result (there's a cluttered desktop behind there)


EDIT:The script worked on my arcade setup, but not as smooth.  It would draw the black screen before rotating,
so the window ended up not being wide enough to cover everything.  You could see the toolbar and 1/4 of the Naomi window while it was starting.
Changing: Gui, Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%, HSHIDE
To:           Gui, Show, x0 y0 h%A_ScreenWidth% w%A_ScreenWidth%, HSHIDE
made it so it's covered either way.  I could probably have put another sleep in there to give it time to rotate first,
but it already seems to launch slower on that computer.

Funny how the same script will run differently on a different computer.

EDIT AGAIN!:
Here's a breakdown by service menu settings:

Vertical/1P Games:
  Psyvar2
  Karous
  Radirgy
  Monomoro
  Triggerheart Exelica

Vertical/2P Games:
  Trizeal
  Ikaruga
  Shikigam No Shiro
  Under Defeat
  Shooting Love 2007 (Exzeal)

Horizontal/1P Games:
  Chaos Field

Horizontal/2P Games:
  Radirgy Noa
  GigaWing 2
  Border Down

« Last Edit: June 02, 2011, 04:08:17 pm by BadMouth »

TAG

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 276
  • Last login:May 23, 2014, 05:52:05 pm
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #1 on: October 10, 2010, 06:50:49 pm »
Credit for making the background black and covering up the emulator window as it launches should go to TAG,
as I lifted that part from this thread: http://forum.arcadecontrols.com/index.php?topic=105956.0

I believe I got that particular part of the code from loaders written by brian hoffman awhile back.
I may not have gone where I intended to go, but I think I have ended up where I needed to be.

-- Dirk Gently

nickynooch

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:August 29, 2020, 02:54:00 am
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #2 on: October 12, 2010, 12:18:20 pm »
Good work.  I know I want to do this at some point.  Right now I only have horizontal games in my naomi setup.  I'll add it to my things to do on my cab list!

ptinolv

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 97
  • Last login:January 20, 2024, 01:37:18 am
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #3 on: October 12, 2010, 02:36:52 pm »
Does this work fullscreen or windowed ?

I personnally play ikaruga on demul 0.5.6 because it can rotate the screen automatically (the fullscreen doesn't work well on widescreen though). Is there any good vertical games makaron can play that demul cannot ?

« Last Edit: October 12, 2010, 02:42:24 pm by ptinolv »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9269
  • Last login:July 01, 2025, 07:12:10 am
  • ...
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #4 on: October 12, 2010, 04:46:32 pm »
Does this work fullscreen or windowed ?

I personnally play ikaruga on demul 0.5.6 because it can rotate the screen automatically (the fullscreen doesn't work well on widescreen though). Is there any good vertical games makaron can play that demul cannot ?

It's running windowed with the window frame blacked out, with the entire desktop rotated.

I didn't know that about Demul.  I gave it a try for fighting games, but liked Makaron better (not sure I even remember why).
I don't know what vertical games Demul supports but there are only around 8 vertical NAOMI games to begin with (if you don't count the japanese quiz games).
With Makaron:
The controls don't work properly in Trigger Heart Exelica.
Trizeal has some graphics glitches, but is still playable.
That leaves:
Ikaruga, Psyvar2, Karous, Radirgy, Shikigam No Shiro, & Under Defeat.

Illvelo, Radirgy Noa, & Exzeal also work in Makaron, but aren't in the mame romset yet.
« Last Edit: October 12, 2010, 06:45:53 pm by BadMouth »

ptinolv

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 97
  • Last login:January 20, 2024, 01:37:18 am
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #5 on: October 12, 2010, 05:07:29 pm »
I will have to check some of the games you mentionned. I am not sure if demul can run them all though.

I also think the emulation in makaron is better (I have sound issues for MvsC2 in demul for instance). What i like about demul is the screen rotation, a better vertical sync in fullscreen and different NVram files per game.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9269
  • Last login:July 01, 2025, 07:12:10 am
  • ...
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #6 on: October 12, 2010, 10:03:47 pm »
It wasn't working as consistently on the mame machine, so I tweaked it a bit.
Odd how it can work perfect one time and only work halfway the next.

The main issue was that I'd see a glimpse of my front end sideways just before the script rotated the screen back.
Easy enough fix....don't kill the black background until AFTER everything has been rotated back.
Not sure why, but that still didn't get it every time, so I put a short sleep in there.  It isn't noticeable, but got rid of the issue.
Just for good measure, I moved the creation of the blackout window before the initial screen rotation.

Code: [Select]
Gui -Caption +ToolWindow                                       
Gui, Color, 0                                                                               
Gui, Show, x0 y0 h%A_ScreenWidth% w%A_ScreenWidth%, HSHIDE   

Gui, 2: +AlwaysOnTop -Caption +ToolWindow                                       
Gui, 2: Color, 0                                                                                 
Gui, 2: Show, x0 y0 h%A_ScreenWidth% w%A_ScreenWidth%, HSHIDE   

Send, {CTRLDOWN}{ALTDOWN}{Left}{ALTUP}{CTRLUP}

MouseMove, 1439, 100

Run, C:\Emulators\Programs\Makaron4\NAOMI.exe ikaruga.dat

sleep, 1200
WinSet, Style, ^0xC00000, NAOMI - PVR

WinActivate, NAOMI - PVR

Gui, 2:Destroy

MButton::
Process, Close, NAOMI.exe
Send, {CTRLDOWN}{ALTDOWN}{Up}{ALTUP}{CTRLUP}
Gui, Destroy
ExitAPP
return

ptinolv

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 97
  • Last login:January 20, 2024, 01:37:18 am
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #7 on: October 14, 2010, 05:48:34 pm »
I tried and the method doesn't work for me for resolutions under 800x600 (makaron just crashes). It works with higher resolutions but it feels laggy (has probably something to do with my nvidia drivers).

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9269
  • Last login:July 01, 2025, 07:12:10 am
  • ...
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #8 on: October 14, 2010, 08:12:54 pm »
Hmmm have mine set to 768x576 and it works (screen resolution at 1024x768)
I'm using an Nvidia 8600GT on both computers.
You might try different scaling modes.
Make sure the width is set to 600 and height is set to 450 in makaron if your screen resolution is set to 800x600
I'm sure you know, but make sure to remove the # in front of the settings or makaron will ignore them.
For some reason, it was laggy on my mame computer even though it is newer and faster.
Changing the scaling mode helped.

Here are the settings in Makaron:

[Settings]
region = 0
fullscreen = 0
video_mode = 768x576
scaling_mode = 3  (might have left it on 2, I'm not sure)

[AICA]
volume = 100

[PVR2]
multithreaded = 1
pixelcenter = -0.33
forcetrilinear = 1
anisotropy = 4
« Last Edit: October 14, 2010, 08:18:22 pm by BadMouth »

ptinolv

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 97
  • Last login:January 20, 2024, 01:37:18 am
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #9 on: October 15, 2010, 02:55:12 pm »
Worked for me too in 1024x768. But for 800x600, it ends up being a resolution of 600x450 to keep a 4:3 ratio, but then makaron doesn't like it and cannot run.

Also, i managed to run Radirgy Noa, Exzeal, mamonoro and shooting love in demul. For those who want to try, you need to click "load decrypted dump" and having a bios selected (if the option "select bios automatically" is ticked the games won't load).

Yarg

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:December 14, 2010, 02:39:05 pm
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #10 on: December 06, 2010, 10:26:02 pm »
Hope reviving this thread after two months isn't bad form, but I just joined the board and happened upon it.
First, thanks a lot for writing something like this and sharing it. I've been slamming my head against the wall trying to figure something out.
However, I am having a problem and am wondering if it is one that anyone else is experiencing.

When I run your script, I get an error that says:

<Open error> (-1012) in module NAOMI: WinMain -
NAOMI.GlownaPetla -> NAOMI.Unruchom -> MMAP.WczytajBIOS
(C:\Arcade\Makaron\ROM\ROM\NAOMI_BIOS_JP.bin)

This is the same error I get if I try to run a game by double-clicking the .dat file instead of running Makaron first and then opening the game in it. I'm certain that this is something I'm doing wrong, but I can't seem to figure it out.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9269
  • Last login:July 01, 2025, 07:12:10 am
  • ...
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #11 on: December 06, 2010, 11:16:34 pm »
Try placing the roms in the same folder as Naomi.exe, not in a subfolder.
Not sure if I put the bios there too. Won't hurt to have it both places.
The hard drive went down on my mame pc, so I can't check right now.  :'(
(I have a backup image so it ain't so bad)
« Last Edit: December 06, 2010, 11:28:55 pm by BadMouth »

Yarg

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 3
  • Last login:December 14, 2010, 02:39:05 pm
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #12 on: December 07, 2010, 05:12:55 pm »
Hey, it worked! I've got some more messing with it to do with it, but in the meantime you can rest assured knowing that you are, in fact, the man.  :notworthy:
My only question is if there is a way to run this with Makaron in fullscreen mode. Every time I try, it crashes.
« Last Edit: December 07, 2010, 05:57:56 pm by Yarg »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9269
  • Last login:July 01, 2025, 07:12:10 am
  • ...
Re: More AutoHotKey Fun: Vertical Naomi Shmups in Makaron
« Reply #13 on: December 07, 2010, 06:43:10 pm »
My only question is if there is a way to run this with Makaron in fullscreen mode. Every time I try, it crashes.

Nope.  Doesn't work in fullscreen mode.  You can make another copy your Makaron folder just for vertical games and turn fullscreen off in that version.
I have 4 different Makaron folders for the various types of games (2P Horizontal, 1P Horizontal, 2P Vert, 1P Vert)
It will probably be pointless in a future release(as will the script), but that's the only way to do it right now.