MEmu = Magic Engine
MEmuV = v1.1.3
MURL =
www.magicengine.com/MAuthor = djvj
MVersion = 2.0
MCRC = 821018BC
iCRC = 7930CF86
MID = 635038268901782138
MSystem = "NEC PC Engine","NEC PC Engine-CD","NEC PC-FX","NEC SuperGrafx","NEC TurboGrafx-16","NEC TurboGrafx-CD"
;----------------------------------------------------------------------------
; Notes:
; Download and extract nomousy to the folder with this module from
www.autohotkey.com/forum/viewtopic.php?t=2197 (it makes the cursor transparent, so clicks will still register)
; This is used to prevent the mouse cursor from appearing in the middle of your screen when you run Magic Engine
; xPadder/joy2key don't work, the emu reads raw inputs. If you use gamepads, make sure you set your keys in Config->Gamepad
; Set your desired Video settings below.
;
; NEC PC-FX:
; Tested with emulator Magic Engine FX v1.0.1
; This is not the same emu as Magic Engine. It only emulates a PC-FX, but module script is almost the same.
;
; CD systems:
; Make sure your DAEMON_Tools_Path in Settings\Global HyperLaunch.ini is correct
; Make sure you have the syscard3.pce rom in your emu dir. You can find the file here:
www.fantasyanime.com/emuhelp/syscards.zip;----------------------------------------------------------------------------
StartModule()
FadeInStart()
settingsFile := modulePath . "\" . moduleName . ".ini"
Windowed := IniReadCheck(settingsFile, "Settings", "Windowed","y",,1) ; y=Simulated Fullscreen mode, n=Normal Fullscreen mode - Simulated Fullscreen mode is preferred, it still looks fullscreen
WideScreenMode := IniReadCheck(settingsFile, "Settings", "WideScreenMode","y",,1) ; y=enable, n=disable
DesktopMode := IniReadCheck(settingsFile, "Settings", "DesktopMode","y",,1) ; y=enable, n=disable - This is basically what sets fullscreen mode. Set to n to show emu in a small window
FullscreenStretch := IniReadCheck(settingsFile, "Settings", "FullscreenStretch","y",,1) ; y=enable, n=disable - This stretches the game screen while keeping the aspect ratio
HighResMode := IniReadCheck(settingsFile, "Settings", "HighResMode","n",,1) ; y=enable, n=disable
Filter := IniReadCheck(settingsFile, "Settings", "Filter","1",,1) ; 1=bilinear filtering , 0=disable
TripleBuffer := IniReadCheck(settingsFile, "Settings", "TripleBuffer","y",,1) ; y=enable, n=disable (DirectX only)
Zoom := IniReadCheck(settingsFile, "Settings", "Zoom","2",,1) ; 4=zoom max , 0=no zoom, use any value between 0 and 4
scanlines := IniReadCheck(settingsFile, "Settings", "scanlines","0",,1) ; 0=none, 40=black, use any value in between 0 and 40
vSync := IniReadCheck(settingsFile, "Settings", "vSync","1",,1) ; 0=disable, 1=enable, 2=vsync + timer (special vsync for windowed mode)
vDriver := IniReadCheck(settingsFile, "Settings", "vDriver","1",,1) ; 0=DirectX, 1=OpenGL
xRes := IniReadCheck(settingsFile, "Settings", "xRes","640",,1)
yRes := IniReadCheck(settingsFile, "Settings", "yRes","480",,1)
bitDepth := IniReadCheck(settingsFile, "Settings", "bitDepth","32",,1)
DisplayRes := IniReadCheck(settingsFile, "Settings", "DisplayRes","n",,1) ; Display screen resolution for troubleshooting
UseNoMousy := IniReadCheck(settingsFile, "Settings", "UseNoMousy","true",,1) ; Use NoMousy tool to hide the mouse. If false, will move mouse off the screen instead
If systemName contains pcfx,pc-fx
meini = pcfx.ini
Else
meini = pce.ini
MEINI := CheckFile(emuPath . "\" . meini,"Could not find " . emuPath . "\" . meini . "`nPlease run Magic Engine manually first so it is created for you.")
If UseNoMousy = true
noMousyFile := CheckFile(moduleExtensionsPath . "\nomousy.exe","You have UseNoMousy enabled in the module, but could not find " . moduleExtensionsPath . "\nomousy.exe")
If systemName contains CD,pcfx,pc-fx
{
CheckFile(emuPath . "\SYSCARD3.PCE","Cannot find " . emuPath . "\SYSCARD3.PCE`nThis file is required for CD systems when using Magic Engine.")
If dtEnabled = true
DaemonTools("get") ; populates the dtDriveLetter variable with the drive letter to your scsi or dt virtual drive
Else
ScriptError("You are running a CD-based system with Magic Engine but do not have Daemon Tools enabled. Please enable DT `, it is required to run CD systems with this module.")
}
If InStr(systemName,"CD")?"":" -cd"
; Now let's update all our keys if they differ in the ini
iniLookup =
( ltrim c
video, windowed, %Windowed%
video, wide, %WideScreenMode%
video, desktop, %DesktopMode%
video, fullscreen, %FullscreenStretch%
video, high_res, %HighResMode%
video, filter, %Filter%
video, triple_buffer, %TripleBuffer%
video, Zoom, %Zoom%
video, scanlines, %scanlines%
video, vsync, %vSync%
video, driver, %vDriver%
video, screen_width, %xRes%
video, screen_height, %yRes%
video, screen_depth, %bitDepth%
cdrom, drive_letter, %dtDriveLetter%:
misc, screen_resolution, %DisplayRes%
)
Loop, Parse, iniLookup, `n
{
StringSplit, split, A_LoopField, `,, %A_Space%%A_Tab%
IniRead, tempVar, %MEINI%, %split1%, %split2%
If ( tempVar != split3 )
IniWrite, % split3, %MEINI%, %split1%, %split2%
}
7z(romPath, romName, romExtension, 7zExtractPath)
If systemName contains CD,pcfx,pc-fx ; your system name must have "CD" in it's name
{
DaemonTools("mount",romPath . "\" . romName . romExtension)
Run, % executable . " syscard3.pce" . (If InStr(systemName,"CD")?"g":" -cd"), %emuPath%
}Else
Run, %executable% "%romPath%\%romName%%romExtension%", %emuPath%
WinWait("MagicEngine ahk_class MagicEngineWindowClass")
WinWaitActive("MagicEngine ahk_class MagicEngineWindowClass")
If UseNoMousy = true
Run, %noMousyFile% /hide ; hide cursor
Else
MouseMove %A_ScreenWidth%,%A_ScreenHeight%
FadeInExit()
Process("WaitClose", executable)
If systemName contains CD,pcfx,pc-fx
DaemonTools("unmount")
If UseNoMousy = true
Run, %noMousyFile% ; unhide cursor
7zCleanUp()
FadeOutExit()
ExitModule()
CloseProcess:
FadeOutStart()
WinClose("MagicEngine ahk_class MagicEngineWindowClass")
Return
Esc::Return ; this prevents the quick flash of Hyperspin when exiting with fade on. You can still exit with Esc.
este seria el modulo y ahora pongo el ini del emu
# ----
# setup settings
# ----
#
[setup]
;
; setup window
; --
; y -> show [default]
; n -> hide
;
show=n
# ----
# keyboard settings
# ----
#
[keyboard]
;
; keyboard configuration
; --
; 0 -> config 1 [default]
; 1 -> config 2
; 2 -> HotRod
; 3 -> HotRod SE
; 4 -> X-Arcade 1P
; 5 -> X-Arcade 2P
;
config=0
# ----
# gamepad settings
# ----
#
[gamepad]
;
; gamepad configuration
; --
; 0 -> config 1 [default]
;
config=
;
; auto calibration control
; --
; 5 .. 95 [default = 50]
;
; the first option is for the left and up directions,
; the second is for right and down directions.
; if a direction doesn't respond lower the value,
; if a direction respond too well (without you touching it
; increase the value.
;
auto_calibration_1=50
auto_calibration_2=50
# ----
# cd-rom settings
# ----
#
[cdrom]
;
; CD-ROM driver
; --
; 0 -> auto-detect [default]
; 1 -> SPTI (WinNT)
; 2 -> ASPI
;
driver=
;
; CD-ROM drive
; --
; 1 -> first CD-ROM drive [default]
; 2 -> second CD-ROM drive
; ...
;
drive=
;
; CD-ROM drive letter
; --
; (Windows 2000/XP only)
;
; D:
; E:
; ...
;
drive_letter=
;
; CD-ROM disk speed
; --
; 1 (min) .. 99 (max) [default = 8]
;
speed=
;
; CD-ROM cache
; --
; y -> enable [default]
; n -> disable
;
cache=
;
; CD-ROM cache size
; --
; 0 .. 8192 KB [default = 512]
;
cache_size=
# ----
# cdda settings
# ----
#
[cdda]
;
; number of cdda buffers
; --
; 4 .. 75 [default = 5]
;
buffers=
;
; size of a cdda buffer (in sectors)
; --
; 1 .. 25 [default = 4]
;
buffer_size=
;
; cdda buffer queue delay
; --
; 2 .. (buffers - 1) [default = 4]
;
delay=
# ----
# video settings
# ----
#
[video]
;
; driver
; --
; 0 -> DirectX [default]
; 1 -> OpenGL
;
driver=1
;
; windowed mode
; --
;
; y -> windowed [default]
; n -> fullscreen
;
windowed=n
;
; screen resolution
; --
;
screen_width=640
screen_height=480
screen_depth=32
;
; triple buffering (DirectX only)
; --
;
; y -> enable
; n -> disable [default]
;
triple_buffer=y
;
; screen aspect ratio
; --
; 0 -> none
; 1 -> 4/3 (298 x 224) [default]
; 2 -> 3/2 (336 x 224)
;
screen_ratio=2,2
;
; desktop mode
; --
;
; y -> enable
; n -> disable [default]
;
desktop=n
;
; video sync
; --
; 0 -> disable [default]
; 1 -> enable
; 2 -> vsync + timer
; (special mode to use when the screen refresh rate is higher
; than 60 fps or when running the emulator in windowed
; mode)
;
vsync=1,1
;
; frame skip
; --
; 0 -> disabled [default]
; 1 -> skip 1 frame
; 2 -> skip 2 frames
; ..
;
frameskip=
;
; fullscreen stretch
; --
;
; 1 -> enable
; 0 -> disable [default]
;
fullscreen=1,1
;
; zoom
; --
; 0 (x1).. 5 (x6)
;
zoom=2,2
;
; high res mode
; --
; 1 -> enable
; 0 -> disable [default]
;
high_res=0,0
;
; filtering mode
; --
;
; 0 -> disable [default]
; 1 -> bilinear filtering
;
filter=1,1
;
; scanlines:
; --
; 0 (no scanlines) .. 40 (black scanlines)
;
scanlines=0,0
;
; scanline patterns:
; --
;
scanlines_pattern_2=0,255
scanlines_pattern_3=0,0,255
scanlines_pattern_4=0,0,255,255
scanlines_pattern_5=0,0,0,255,255
scanlines_pattern_6=0,0,0,255,255,255
;
; gamma correction:
; --
; adjust gamma level (0 .. 40)
;
gamma=20,20
;
; contrast control:
; --
; adjust contrast (0 .. 40)
;
contrast=20,20
;
; saturation control:
; --
; adjust color saturation (0 .. 40)
;
saturation=20,20
;
; brightness control:
; --
; adjust brightness (0 .. 40)
;
brightness=20,20
;
; screen resolution filter
; --
; max width (640 .. 2560)
; max height (480 .. 1600)
;
res_max_width=
res_max_height=
;
; screen bit depth filter
; --
;
; y -> enable [default]
; n -> disable
;
res_16bit=
res_32bit=
;
; custom screen resolutions
; --
; custom screen resolutions to be used for the different
; PC-Engine video modes (256x224, 336x224, and 512x224)
; and for the GUI
;
; y -> enable
; n -> disable [default]
;
; custom_resolution=y
; res_256=256,224
; res_320=320,224
; ...
; res_gui=640,480
;
;
custom_resolution=
res_256=
res_320=
res_336=
res_352=
res_512=
res_gui=
;
; screen resolution lock
; --
; enable/disable screen resolution locking
;
; y -> auto lock
; n -> no resolution lock [default]
;
res_lock=
wide=1,1
# ----
# audio settings
# ----
#
[audio]
;
; interpolation mode
; --
; 0 -> disable
; 1 -> oversampling (x4) [default]
; 2 -> linear
; 3 -> cubic
;
interpolation_mode=
;
; interpolation level
; --
; 0 .. 9 [default = 2]
;
linear_interpolation_level=
cubic_interpolation_level=
;
; master audio volume
; --
; 0 .. 31
;
master_audio_volume=
;
; psg audio volume
; --
; 0 .. 31
;
psg_audio_volume=
;
; adpcm audio volume
; --
; 0 .. 31
;
adpcm_audio_volume=
;
; cd audio volume
; --
; 0 .. 31
;
cd_audio_volume=
;
; noise level
; --
; 0 (rough) .. 4 (soft)
;
noise_level=
;
; noise volume
; --
; 0 .. 9 [default = 4]
;
noise_volume=
;
; noise filtering level
; --
; 0 .. 9
;
noise_filter=
# ----
# load menu settings
# ----
[load_menu]
;
; games list
; --
; uses ROMs file name instead of games title
;
; y -> enable
; n -> disable [default]
;
use_rom_file_name=
;
; file name extension
; --
; hide file name extension
;
; y -> hide [default]
; n -> show
;
hide_file_name_extension=
;
; small font
; --
; y -> enable
; n -> disable [default]
;
small_font=
;
; font case
; --
; 0 -> no change
; 1 -> lower case
; 2 -> upper case [default]
;
font_case=
;
; preview slideshow
; --
; slideshow speed in 1/2 second unit
;
; 0 (disable) .. 20 (10 seconds) [default = 5]
;
slideshow=
;
; preview image max size
; --
; maximun size of the preview image [default = 512x256]
;
preview_width=
preview_height=
# ----
# misc. settings
# ----
[misc]
;
; gui language
; --
; 0 -> english [default]
; 1 -> french
; 2 -> japanese
;
language=
;
; fps counter (on screen display, top-left corner)
; --
; y -> enable
; n -> disable [default]
;
fps_counter=n
;
; screen resolution (on screen display, top-left corner)
; --
; display the current screen resolution of the PCE
;
; y -> enable
; n -> disable [default]
;
screen_resolution=n
;
; psg volume meter (on screen display, bottom-right corner)
; --
; y -> enable
; n -> disable [default]
;
psg_vu_meter=n
;
; MagicEngine logo scrolling
; --
; y -> enable [default]
; n -> disable
;
background_scrolling=
;
; 'ESC' key mode
; --
; 0 -> automatic mode: [default]
; --------------
; when the emulator is started from a shell or from a front-end
; program, pressing 'ESC' will exit the emulator, but when
; the emulator is started by double-clicking on its icon
; pressing 'ESC' will open the menu screen
;
; 1 -> GUI mode:
; --------
; pressing 'ESC' will always open the menu screen
;
; 2 -> exit mode:
; ---------
; pressing 'ESC' will always exit the emulator
;
esc_key_mode=2
;
; backup ram format
; --
; 0 -> old format (backup.ram)
; 1 -> new format (backup.dat, backup.idx) [default]
;
backup_ram=
;
; state file compression
; --
; y -> enable [default]
; n -> disable
;
compress_state_file=
# ----
# emulation settings
# ----
[emulation]
;
; frame delay
; --
; adjust video frame delay (15000-18000 µs)
;
; 16393 -> 61 Hz
; 16667 -> 60 Hz
; 16712 -> 59.84 Hz [default]
; 16949 -> 59 Hz
;
frame_delay=
;
; default system card for CD-ROM emulation
; --
; 0 -> automatic [default]
; 1 -> System Card v1.0
; 2 -> System Card v2.x
; 3 -> System Card v3.0
; 4 -> Game Express System Card
; 5 -> Magic System v1.0
; 6 -> Magic System v2.0
; 7 -> Magic System v3.0
;
default_system_card=
# ----
# PCE emulation settings
# ----
[pce]
;
; CPU clock frequency in MHz (7 - 35)
; --
; 7 -> 100% speed [default]
; 14 -> 200% speed
; ..
; 35 -> 500% speed
;
cpu_clock=
;
; extended horizontal resolutions (320/352)
; --
; y -> enable [default]
; n -> disable
;
extended_video_modes=
;
; vertical overscan
; --
; top 0 .. 41 [default=17]
; bottom 232 .. 262 [default=255]
;
; standard overscan 224 lines (top=25, bottom=248)
; extended overscan 239 lines (top=17, bottom=255)
; maximun overscan 242 lines (top=14, bottom=255)
;
overscan_top=
overscan_bottom=
overscan_centered=
;
; supergrafx hardware
; --
; 0 -> auto [default]
; 1 -> enable
; 2 -> disable
;
supergrafx=
;
; arcade card hardware
; --
; 0 -> auto [default]
; 1 -> enable
; 2 -> disable
;
arcade_card=
;
; input port
; --
; 0 -> auto [default]
; 1 -> 2-button pad
; 2 -> 6-button pad
;
input_port=
# ----
# path settings
# ----
[path]
;
; system card paths
; --
;
system_card_1=
system_card_2=
system_card_3=
system_card_4=
;
; config path
; --
; (pce.cfg,
; backup.dat, backup.idx,
; games.idx,
; time.dat)
;
config=
;
; patches path (*.PPF/*.IPS)
; --
;
patches=
;
; cheats path
; --
;
cheats="cheats\"
;
; preview screenshots path
; --
;
previews=
;
; screenshots path
; --
;
screenshots="screenshots\"
;
; saved games path
; --
;
saved_games="states\"
;
; roms path
; --
;
roms="C:\Hyperspin\Emulators\\NEC PC Engine-CD\roms\@0,5"