2010-08-09 13:28:56 +00:00
|
|
|
# Makefile
|
|
|
|
# author: byuu
|
|
|
|
# license: public domain
|
|
|
|
|
|
|
|
[A-Z] = A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
|
|
|
[a-z] = a b c d e f g h i j k l m n o p q r s t u v w x y z
|
|
|
|
[0-9] = 0 1 2 3 4 5 6 7 8 9
|
|
|
|
[markup] = ` ~ ! @ \# $$ % ^ & * ( ) - _ = + [ { ] } \ | ; : ' " , < . > / ?
|
|
|
|
[all] = $([A-Z]) $([a-z]) $([0-9]) $([markup])
|
|
|
|
[space] :=
|
|
|
|
[space] +=
|
|
|
|
|
|
|
|
#####
|
|
|
|
# platform detection
|
|
|
|
#####
|
|
|
|
|
|
|
|
ifeq ($(platform),)
|
|
|
|
uname := $(shell uname -a)
|
|
|
|
ifeq ($(uname),)
|
|
|
|
platform := win
|
|
|
|
delete = del $(subst /,\,$1)
|
2012-08-07 13:28:00 +00:00
|
|
|
else ifneq ($(findstring Windows,$(uname)),)
|
|
|
|
platform := win
|
|
|
|
delete = del $(subst /,\,$1)
|
2011-10-16 09:44:48 +00:00
|
|
|
else ifneq ($(findstring CYGWIN,$(uname)),)
|
|
|
|
platform := win
|
|
|
|
delete = del $(subst /,\,$1)
|
2010-08-09 13:28:56 +00:00
|
|
|
else ifneq ($(findstring Darwin,$(uname)),)
|
|
|
|
platform := osx
|
|
|
|
delete = rm -f $1
|
|
|
|
else
|
|
|
|
platform := x
|
|
|
|
delete = rm -f $1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(compiler),)
|
Update to v068r18 release.
byuu says:
This WIP fixes the Mode7 repeat issue in the accuracy core.
More importantly, it's the first build to include phoenix. There is
a stub GUI that does basically nothing right now. It will give you
a window, a command to close the emulator, and an FPS meter so you can
tell how fast it is. To load a ROM, you have to drag the ROM on top of
the binary. I don't know if it will work if the filename+path has spaces
in it or not, so avoid that to be safe.
[...]
For some reason, the 64-bit binary sometimes crashes on start, maybe 1:6
times. So just keep trying. I don't know what's up with that, I'd
appreciate if someone here wanted to debug that for me though :D
One really good bit of news, there was that old hiro bug where keyboard
input would cause the main window to beep. I spied on the main event
loop and, as suspected, the status bar was getting focus and rejecting
key presses. What. The. Fuck. Why would a status bar ever need focus? So
I set WM_DISABLED on it, which luckily leaves the font color alone.
I also had to use WM_DISABLED on the Viewport widget that I use for
video output. These two combined let me have my main window with no
keyboard beeping AND allow tab+shift-tab to work as you'd expect on
other windows, so hooray.
Now, at the moment there's no Manifest included, because Microsoft for
some reason includes the processorArcitecture in the file. So I can't
use the same manifest for 32-bit and 64-bit mode, or the binary will
crash on one or the other. Fuck. So the status bar may look old-school
or something, whatever, it's only temporary.
Next up, my goal is to avoid the hiro icon corruption bullshit by making
phoenix itself try and use an internal resource icon. So just compile
your app with that resource icon and voila, perfect icon. Not in there
yet so you get the white box.
Input is hard-coded, up/down/left/right/z/x/a/s/d/c/apostrophe/return.
Lastly, compilation is ... in a serious state of flux. The code is set
to compile bsnes/phoenix-gtk right now. Try it at your own risk. Give me
a few WIPs to get everything nice and refined. Ubuntu users will need
gcc-4.5, which you can get by adding the Maverick Meerkat repository,
updating apt, installing the gcc-4.5 + g++-4.5 packages, and then
removing and re-updating your apt/sources.list file so you don't end up
fucking your whole system when you run apt again in the future.
For anyone who can work with all of that, great! Please post a framerate
comparison between 32-bit and 64-bit builds. Any game, any screen, so
long as the FPS is not fluctuating when you measure it (eg don't do it
during an attract sequence.)
If anyone complains about the 64-bit binary not working and it turns out
they are on 32-bit Windows, they are going to be removed from this WIP
forum :P
2010-10-20 11:47:14 +00:00
|
|
|
ifeq ($(platform),win)
|
2013-01-21 12:27:15 +00:00
|
|
|
compiler := g++
|
Update to v068r18 release.
byuu says:
This WIP fixes the Mode7 repeat issue in the accuracy core.
More importantly, it's the first build to include phoenix. There is
a stub GUI that does basically nothing right now. It will give you
a window, a command to close the emulator, and an FPS meter so you can
tell how fast it is. To load a ROM, you have to drag the ROM on top of
the binary. I don't know if it will work if the filename+path has spaces
in it or not, so avoid that to be safe.
[...]
For some reason, the 64-bit binary sometimes crashes on start, maybe 1:6
times. So just keep trying. I don't know what's up with that, I'd
appreciate if someone here wanted to debug that for me though :D
One really good bit of news, there was that old hiro bug where keyboard
input would cause the main window to beep. I spied on the main event
loop and, as suspected, the status bar was getting focus and rejecting
key presses. What. The. Fuck. Why would a status bar ever need focus? So
I set WM_DISABLED on it, which luckily leaves the font color alone.
I also had to use WM_DISABLED on the Viewport widget that I use for
video output. These two combined let me have my main window with no
keyboard beeping AND allow tab+shift-tab to work as you'd expect on
other windows, so hooray.
Now, at the moment there's no Manifest included, because Microsoft for
some reason includes the processorArcitecture in the file. So I can't
use the same manifest for 32-bit and 64-bit mode, or the binary will
crash on one or the other. Fuck. So the status bar may look old-school
or something, whatever, it's only temporary.
Next up, my goal is to avoid the hiro icon corruption bullshit by making
phoenix itself try and use an internal resource icon. So just compile
your app with that resource icon and voila, perfect icon. Not in there
yet so you get the white box.
Input is hard-coded, up/down/left/right/z/x/a/s/d/c/apostrophe/return.
Lastly, compilation is ... in a serious state of flux. The code is set
to compile bsnes/phoenix-gtk right now. Try it at your own risk. Give me
a few WIPs to get everything nice and refined. Ubuntu users will need
gcc-4.5, which you can get by adding the Maverick Meerkat repository,
updating apt, installing the gcc-4.5 + g++-4.5 packages, and then
removing and re-updating your apt/sources.list file so you don't end up
fucking your whole system when you run apt again in the future.
For anyone who can work with all of that, great! Please post a framerate
comparison between 32-bit and 64-bit builds. Any game, any screen, so
long as the FPS is not fluctuating when you measure it (eg don't do it
during an attract sequence.)
If anyone complains about the 64-bit binary not working and it turns out
they are on 32-bit Windows, they are going to be removed from this WIP
forum :P
2010-10-20 11:47:14 +00:00
|
|
|
else ifeq ($(platform),osx)
|
2013-03-15 13:11:33 +00:00
|
|
|
compiler := clang
|
Update to v068r18 release.
byuu says:
This WIP fixes the Mode7 repeat issue in the accuracy core.
More importantly, it's the first build to include phoenix. There is
a stub GUI that does basically nothing right now. It will give you
a window, a command to close the emulator, and an FPS meter so you can
tell how fast it is. To load a ROM, you have to drag the ROM on top of
the binary. I don't know if it will work if the filename+path has spaces
in it or not, so avoid that to be safe.
[...]
For some reason, the 64-bit binary sometimes crashes on start, maybe 1:6
times. So just keep trying. I don't know what's up with that, I'd
appreciate if someone here wanted to debug that for me though :D
One really good bit of news, there was that old hiro bug where keyboard
input would cause the main window to beep. I spied on the main event
loop and, as suspected, the status bar was getting focus and rejecting
key presses. What. The. Fuck. Why would a status bar ever need focus? So
I set WM_DISABLED on it, which luckily leaves the font color alone.
I also had to use WM_DISABLED on the Viewport widget that I use for
video output. These two combined let me have my main window with no
keyboard beeping AND allow tab+shift-tab to work as you'd expect on
other windows, so hooray.
Now, at the moment there's no Manifest included, because Microsoft for
some reason includes the processorArcitecture in the file. So I can't
use the same manifest for 32-bit and 64-bit mode, or the binary will
crash on one or the other. Fuck. So the status bar may look old-school
or something, whatever, it's only temporary.
Next up, my goal is to avoid the hiro icon corruption bullshit by making
phoenix itself try and use an internal resource icon. So just compile
your app with that resource icon and voila, perfect icon. Not in there
yet so you get the white box.
Input is hard-coded, up/down/left/right/z/x/a/s/d/c/apostrophe/return.
Lastly, compilation is ... in a serious state of flux. The code is set
to compile bsnes/phoenix-gtk right now. Try it at your own risk. Give me
a few WIPs to get everything nice and refined. Ubuntu users will need
gcc-4.5, which you can get by adding the Maverick Meerkat repository,
updating apt, installing the gcc-4.5 + g++-4.5 packages, and then
removing and re-updating your apt/sources.list file so you don't end up
fucking your whole system when you run apt again in the future.
For anyone who can work with all of that, great! Please post a framerate
comparison between 32-bit and 64-bit builds. Any game, any screen, so
long as the FPS is not fluctuating when you measure it (eg don't do it
during an attract sequence.)
If anyone complains about the 64-bit binary not working and it turns out
they are on 32-bit Windows, they are going to be removed from this WIP
forum :P
2010-10-20 11:47:14 +00:00
|
|
|
else
|
2013-01-21 12:27:15 +00:00
|
|
|
compiler := g++-4.7
|
2010-08-09 13:28:56 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-01-21 12:27:15 +00:00
|
|
|
c := $(compiler) -x c -std=gnu99
|
|
|
|
cpp := $(compiler) -std=gnu++11
|
|
|
|
|
|
|
|
ifeq ($(arch),x86)
|
|
|
|
c := $(c) -m32
|
|
|
|
cpp := $(cpp) -m32
|
|
|
|
endif
|
Update to v084r05 release.
(note: before the post announcing this release, there had been
a discussion of a performance optimisation that made the Super Scope
emulation a lot faster, but caused problems for the Justifier perpheral)
byuu says:
Spent a good two hours trying things to no avail.
I was trying to allow the CPU to run ahead, and sync on accesses to
$4016/4017/4201/4213, but that doesn't work because the controllers have
access to strobe IObit at will.
The codebase is really starting to get difficult to work with. I am
guessing because the days of massive development are long over, and the
code is starting to age.
Jonas' fix works 98% of the time, but there's still a few missed shots
here and there. So that's not going to work either.
So ... I give up. I've disabled the speed hack, so that it works 100% of
the time.
Did the same for the Super Scope: it may not have the same problem, but
I like consistency and don't feel like taking the chance.
This doesn't affect the mouse, since the mouse does not latch the
counters to indicate its X/Y position.
Speed hit is 92->82fps (accuracy profile), but only for Super Scope and
Justifier games.
But ... at least it works now. Slow and working is better than fast and
broken.
I appreciate the help in researching the issue, Jonas and krom.
Also pulled in phoenix/Makefile, which simplifies ui/Makefile.
Linux port defaults to GTK+ now. I can't get QGtkStyle to look good on
Debian.
2011-12-18 03:19:45 +00:00
|
|
|
|
2010-08-09 13:28:56 +00:00
|
|
|
ifeq ($(prefix),)
|
|
|
|
prefix := /usr/local
|
|
|
|
endif
|
|
|
|
|
|
|
|
#####
|
|
|
|
# function rwildcard(directory, pattern)
|
|
|
|
#####
|
|
|
|
rwildcard = \
|
|
|
|
$(strip \
|
|
|
|
$(filter $(if $2,$2,%), \
|
|
|
|
$(foreach f, \
|
|
|
|
$(wildcard $1*), \
|
|
|
|
$(eval t = $(call rwildcard,$f/)) \
|
|
|
|
$(if $t,$t,$f) \
|
|
|
|
) \
|
|
|
|
) \
|
|
|
|
)
|
|
|
|
|
|
|
|
#####
|
|
|
|
# function strtr(source, from, to)
|
|
|
|
#####
|
|
|
|
strtr = \
|
|
|
|
$(eval __temp := $1) \
|
|
|
|
$(strip \
|
|
|
|
$(foreach c, \
|
|
|
|
$(join $(addsuffix :,$2),$3), \
|
|
|
|
$(eval __temp := \
|
|
|
|
$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),$(__temp)) \
|
|
|
|
) \
|
|
|
|
) \
|
|
|
|
$(__temp) \
|
|
|
|
)
|
|
|
|
|
|
|
|
#####
|
|
|
|
# function strupper(source)
|
|
|
|
#####
|
|
|
|
strupper = $(call strtr,$1,$([a-z]),$([A-Z]))
|
|
|
|
|
|
|
|
#####
|
|
|
|
# function strlower(source)
|
|
|
|
#####
|
|
|
|
strlower = $(call strtr,$1,$([A-Z]),$([a-z]))
|
|
|
|
|
|
|
|
#####
|
|
|
|
# function strlen(source)
|
|
|
|
#####
|
|
|
|
strlen = \
|
|
|
|
$(eval __temp := $(subst $([space]),_,$1)) \
|
|
|
|
$(words \
|
|
|
|
$(strip \
|
|
|
|
$(foreach c, \
|
|
|
|
$([all]), \
|
|
|
|
$(eval __temp := \
|
|
|
|
$(subst $c,$c ,$(__temp)) \
|
|
|
|
) \
|
|
|
|
) \
|
|
|
|
$(__temp) \
|
|
|
|
) \
|
|
|
|
)
|
|
|
|
|
|
|
|
#####
|
|
|
|
# function streq(source)
|
|
|
|
#####
|
|
|
|
streq = $(if $(filter-out xx,x$(subst $1,,$2)$(subst $2,,$1)x),,1)
|
|
|
|
|
|
|
|
#####
|
|
|
|
# function strne(source)
|
|
|
|
#####
|
|
|
|
strne = $(if $(filter-out xx,x$(subst $1,,$2)$(subst $2,,$1)x),1,)
|