Update to ananke v00r02 release.
byuu says:
This should be basically final now.
Works with all media types (nes, sfc, gb, gbc, gba, bs, st), strips
headers, can use internal or external firmware, imports saves on first
run.
Added a custom file dialog. It seems both GTK+ and Windows XP have
(un)intelligent file sorting, which puts eg "ActRaiser 2 (NA)" before
"ActRaiser (NA)". So, screw 'em.
2012-12-24 05:48:23 +00:00
|
|
|
struct FileDialog : Window {
|
|
|
|
VerticalLayout layout;
|
|
|
|
HorizontalLayout pathLayout;
|
|
|
|
LineEdit pathEdit;
|
|
|
|
Button homeButton;
|
|
|
|
Button upButton;
|
|
|
|
ListView fileList;
|
|
|
|
HorizontalLayout controlLayout;
|
Update to higan v091r14 and ananke v00r03 releases.
byuu says:
higan changelog:
- generates title displayed in emulator window by asking the core
- core builds title solely from "information/title" ... if it's not
there, you don't get a title at all
- sub-system load menu is gone ... since there are multiple revisions of
the SGB, this never really worked well anyway
- to load an SGB, BS-X or ST cartridge, load the base cartridge first
- "File->Load Game" moved to "Load->Import Game" ... may cause a bit of
confusion to new users, but I don't like having a single-item menu,
we'll just have to explain it to new users
- browser window redone to look like ananke
- home button here goes to ~/Emulation rather than just ~ like ananke,
since this is the home of game folders
- game folder icon is now the executable icon for the Tango theme
(orange diamond), meant to represent a complete game rather than
a game file or archive
ananke changelog:
- outputs GBC games to "Game Boy Color/" instead of "Game Boy/"
- adds the file basename to "information/title"
Known issues:
- using ananke to load a GB game trips the Super Famicom SGB mode and
fails (need to make the full-path auto-detection ignore non-bootable
systems)
- need to dump and test some BS-X media before releasing
- ananke lacks BS-X Satellaview cartridge support
- v092 isn't going to let you retarget the ananke/higan game folder path
of ~/Emulation, you will have to wait for a future version if that
bothers you so greatly
[Later, after the v092 release, byuu posted this additional changelog:
- kill laevateinn
- add title()
- add bootable, remove load
- combine file, library
- combine [][][] paths
- fix SFC subtype handling XML->BML
- update file browser to use buttons
- update file browser keyboard handling
- update system XML->BML
- fix sufami turbo hashing
- remove Cartridge::manifest
]
2012-12-25 05:31:55 +00:00
|
|
|
Label filterLabel;
|
Update to ananke v00r02 release.
byuu says:
This should be basically final now.
Works with all media types (nes, sfc, gb, gbc, gba, bs, st), strips
headers, can use internal or external firmware, imports saves on first
run.
Added a custom file dialog. It seems both GTK+ and Windows XP have
(un)intelligent file sorting, which puts eg "ActRaiser 2 (NA)" before
"ActRaiser (NA)". So, screw 'em.
2012-12-24 05:48:23 +00:00
|
|
|
Button openButton;
|
|
|
|
|
|
|
|
string open() {
|
|
|
|
setVisible();
|
|
|
|
fileList.setFocused();
|
|
|
|
filename = "";
|
|
|
|
|
2013-08-18 03:21:14 +00:00
|
|
|
setModal();
|
Update to ananke v00r02 release.
byuu says:
This should be basically final now.
Works with all media types (nes, sfc, gb, gbc, gba, bs, st), strips
headers, can use internal or external firmware, imports saves on first
run.
Added a custom file dialog. It seems both GTK+ and Windows XP have
(un)intelligent file sorting, which puts eg "ActRaiser 2 (NA)" before
"ActRaiser (NA)". So, screw 'em.
2012-12-24 05:48:23 +00:00
|
|
|
return filename;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setPath(const string &path) {
|
|
|
|
pathname = string{path}.transform("\\", "/");
|
|
|
|
if(pathname.empty()) pathname = userpath();
|
2013-12-07 09:12:37 +00:00
|
|
|
if(pathname.endsWith("/") == false) pathname.append("/");
|
Update to ananke v00r02 release.
byuu says:
This should be basically final now.
Works with all media types (nes, sfc, gb, gbc, gba, bs, st), strips
headers, can use internal or external firmware, imports saves on first
run.
Added a custom file dialog. It seems both GTK+ and Windows XP have
(un)intelligent file sorting, which puts eg "ActRaiser 2 (NA)" before
"ActRaiser (NA)". So, screw 'em.
2012-12-24 05:48:23 +00:00
|
|
|
pathEdit.setText(pathname);
|
|
|
|
|
|
|
|
fileList.reset();
|
|
|
|
filenameList.reset();
|
|
|
|
|
|
|
|
lstring folders = directory::ifolders(pathname);
|
|
|
|
for(auto &folder : folders) {
|
|
|
|
fileList.append(string{folder}.rtrim<1>("/"));
|
|
|
|
fileList.setImage(filenameList.size(), 0, {resource::folder, sizeof resource::folder});
|
|
|
|
filenameList.append({pathname, folder});
|
|
|
|
}
|
|
|
|
|
|
|
|
lstring files = directory::ifiles(pathname);
|
|
|
|
for(auto &file : files) {
|
Update to higan v091r14 and ananke v00r03 releases.
byuu says:
higan changelog:
- generates title displayed in emulator window by asking the core
- core builds title solely from "information/title" ... if it's not
there, you don't get a title at all
- sub-system load menu is gone ... since there are multiple revisions of
the SGB, this never really worked well anyway
- to load an SGB, BS-X or ST cartridge, load the base cartridge first
- "File->Load Game" moved to "Load->Import Game" ... may cause a bit of
confusion to new users, but I don't like having a single-item menu,
we'll just have to explain it to new users
- browser window redone to look like ananke
- home button here goes to ~/Emulation rather than just ~ like ananke,
since this is the home of game folders
- game folder icon is now the executable icon for the Tango theme
(orange diamond), meant to represent a complete game rather than
a game file or archive
ananke changelog:
- outputs GBC games to "Game Boy Color/" instead of "Game Boy/"
- adds the file basename to "information/title"
Known issues:
- using ananke to load a GB game trips the Super Famicom SGB mode and
fails (need to make the full-path auto-detection ignore non-bootable
systems)
- need to dump and test some BS-X media before releasing
- ananke lacks BS-X Satellaview cartridge support
- v092 isn't going to let you retarget the ananke/higan game folder path
of ~/Emulation, you will have to wait for a future version if that
bothers you so greatly
[Later, after the v092 release, byuu posted this additional changelog:
- kill laevateinn
- add title()
- add bootable, remove load
- combine file, library
- combine [][][] paths
- fix SFC subtype handling XML->BML
- update file browser to use buttons
- update file browser keyboard handling
- update system XML->BML
- fix sufami turbo hashing
- remove Cartridge::manifest
]
2012-12-25 05:31:55 +00:00
|
|
|
if(Ananke::supported(file) == false) continue; //ignore unsupported extensions
|
Update to ananke v00r02 release.
byuu says:
This should be basically final now.
Works with all media types (nes, sfc, gb, gbc, gba, bs, st), strips
headers, can use internal or external firmware, imports saves on first
run.
Added a custom file dialog. It seems both GTK+ and Windows XP have
(un)intelligent file sorting, which puts eg "ActRaiser 2 (NA)" before
"ActRaiser (NA)". So, screw 'em.
2012-12-24 05:48:23 +00:00
|
|
|
fileList.append(file);
|
Update to higan v091r14 and ananke v00r03 releases.
byuu says:
higan changelog:
- generates title displayed in emulator window by asking the core
- core builds title solely from "information/title" ... if it's not
there, you don't get a title at all
- sub-system load menu is gone ... since there are multiple revisions of
the SGB, this never really worked well anyway
- to load an SGB, BS-X or ST cartridge, load the base cartridge first
- "File->Load Game" moved to "Load->Import Game" ... may cause a bit of
confusion to new users, but I don't like having a single-item menu,
we'll just have to explain it to new users
- browser window redone to look like ananke
- home button here goes to ~/Emulation rather than just ~ like ananke,
since this is the home of game folders
- game folder icon is now the executable icon for the Tango theme
(orange diamond), meant to represent a complete game rather than
a game file or archive
ananke changelog:
- outputs GBC games to "Game Boy Color/" instead of "Game Boy/"
- adds the file basename to "information/title"
Known issues:
- using ananke to load a GB game trips the Super Famicom SGB mode and
fails (need to make the full-path auto-detection ignore non-bootable
systems)
- need to dump and test some BS-X media before releasing
- ananke lacks BS-X Satellaview cartridge support
- v092 isn't going to let you retarget the ananke/higan game folder path
of ~/Emulation, you will have to wait for a future version if that
bothers you so greatly
[Later, after the v092 release, byuu posted this additional changelog:
- kill laevateinn
- add title()
- add bootable, remove load
- combine file, library
- combine [][][] paths
- fix SFC subtype handling XML->BML
- update file browser to use buttons
- update file browser keyboard handling
- update system XML->BML
- fix sufami turbo hashing
- remove Cartridge::manifest
]
2012-12-25 05:31:55 +00:00
|
|
|
if(extension(file) == "zip") {
|
|
|
|
fileList.setImage(filenameList.size(), 0, {resource::archive, sizeof resource::archive});
|
|
|
|
} else {
|
|
|
|
fileList.setImage(filenameList.size(), 0, {resource::file, sizeof resource::file});
|
|
|
|
}
|
Update to ananke v00r02 release.
byuu says:
This should be basically final now.
Works with all media types (nes, sfc, gb, gbc, gba, bs, st), strips
headers, can use internal or external firmware, imports saves on first
run.
Added a custom file dialog. It seems both GTK+ and Windows XP have
(un)intelligent file sorting, which puts eg "ActRaiser 2 (NA)" before
"ActRaiser (NA)". So, screw 'em.
2012-12-24 05:48:23 +00:00
|
|
|
filenameList.append({pathname, file});
|
|
|
|
}
|
|
|
|
|
|
|
|
fileList.setSelection(0);
|
|
|
|
fileList.setSelected();
|
|
|
|
fileList.setFocused();
|
|
|
|
}
|
|
|
|
|
|
|
|
FileDialog() {
|
|
|
|
setTitle("Load Image");
|
|
|
|
|
|
|
|
layout.setMargin(5);
|
|
|
|
homeButton.setImage({resource::home, sizeof resource::home});
|
|
|
|
upButton.setImage({resource::up, sizeof resource::up});
|
Update to v092 release.
In the release thread, byuu says:
The first official release of higan has been posted. higan is the
new name for bsnes, and it continues with the latter's version
numbering.
Note that as of now, bsnes still exists. It's a module distributed
inside of higan. bsnes is now specific to my SNES emulator.
Due to last minute changes to the emulator interface, and missing
support in ananke, I wasn't able to include Cydrak's Nintendo DS
emulator dasShiny in this build, but I hope to do so in the next
release.
http://code.google.com/p/higan/downloads/list
For both new and experienced users, please read the higan user guide
first:
http://byuu.org/higan/user-guide
In the v091 WIP thread, byuu says:
r15->r16:
- BS-X MaskROM handling (partial ... need to split bsx/flash away
from sfc/chip, restructure code - it requires tagging the base
cart markup for now, but it needs to parse the slotted cart
markup)
- phoenixflags / phoenixlink += -m32
- nall/sort stability
- if(input.poll(scancode[activeScancode]) == false) return;
- MSU1 / USART need to use interface->path(1)
- MSU1 needs to use Markup::Document, not XML::Document
- case-insensitive folder listings
- remove nall/emulation/system.hpp files (move to ananke)
- remove rom/ram id= checks with indexing
X have cores ask for manifest.bml (skipped for v092's release, too
big a change)
- rename compatibility profile to balanced (so people don't assume
it has better compatibility than accuracy)
2013-01-14 12:10:20 +00:00
|
|
|
filterLabel.setText("Filter: *.fc, *.sfc, *.st, *.bs, *.gb, *.gbc, *.gba, *.nes, *.smc, *.zip");
|
Update to ananke v00r02 release.
byuu says:
This should be basically final now.
Works with all media types (nes, sfc, gb, gbc, gba, bs, st), strips
headers, can use internal or external firmware, imports saves on first
run.
Added a custom file dialog. It seems both GTK+ and Windows XP have
(un)intelligent file sorting, which puts eg "ActRaiser 2 (NA)" before
"ActRaiser (NA)". So, screw 'em.
2012-12-24 05:48:23 +00:00
|
|
|
openButton.setText("Open");
|
|
|
|
|
|
|
|
append(layout);
|
|
|
|
layout.append(pathLayout, {~0, 0}, 5);
|
|
|
|
pathLayout.append(pathEdit, {~0, 0}, 5);
|
|
|
|
pathLayout.append(homeButton, {28, 28}, 5);
|
|
|
|
pathLayout.append(upButton, {28, 28});
|
|
|
|
layout.append(fileList, {~0, ~0}, 5);
|
|
|
|
layout.append(controlLayout, {~0, 0});
|
Update to higan v091r14 and ananke v00r03 releases.
byuu says:
higan changelog:
- generates title displayed in emulator window by asking the core
- core builds title solely from "information/title" ... if it's not
there, you don't get a title at all
- sub-system load menu is gone ... since there are multiple revisions of
the SGB, this never really worked well anyway
- to load an SGB, BS-X or ST cartridge, load the base cartridge first
- "File->Load Game" moved to "Load->Import Game" ... may cause a bit of
confusion to new users, but I don't like having a single-item menu,
we'll just have to explain it to new users
- browser window redone to look like ananke
- home button here goes to ~/Emulation rather than just ~ like ananke,
since this is the home of game folders
- game folder icon is now the executable icon for the Tango theme
(orange diamond), meant to represent a complete game rather than
a game file or archive
ananke changelog:
- outputs GBC games to "Game Boy Color/" instead of "Game Boy/"
- adds the file basename to "information/title"
Known issues:
- using ananke to load a GB game trips the Super Famicom SGB mode and
fails (need to make the full-path auto-detection ignore non-bootable
systems)
- need to dump and test some BS-X media before releasing
- ananke lacks BS-X Satellaview cartridge support
- v092 isn't going to let you retarget the ananke/higan game folder path
of ~/Emulation, you will have to wait for a future version if that
bothers you so greatly
[Later, after the v092 release, byuu posted this additional changelog:
- kill laevateinn
- add title()
- add bootable, remove load
- combine file, library
- combine [][][] paths
- fix SFC subtype handling XML->BML
- update file browser to use buttons
- update file browser keyboard handling
- update system XML->BML
- fix sufami turbo hashing
- remove Cartridge::manifest
]
2012-12-25 05:31:55 +00:00
|
|
|
controlLayout.append(filterLabel, {~0, 0}, 5);
|
Update to ananke v00r02 release.
byuu says:
This should be basically final now.
Works with all media types (nes, sfc, gb, gbc, gba, bs, st), strips
headers, can use internal or external firmware, imports saves on first
run.
Added a custom file dialog. It seems both GTK+ and Windows XP have
(un)intelligent file sorting, which puts eg "ActRaiser 2 (NA)" before
"ActRaiser (NA)". So, screw 'em.
2012-12-24 05:48:23 +00:00
|
|
|
controlLayout.append(openButton, {80, 0});
|
|
|
|
|
|
|
|
pathEdit.onActivate = [&] {
|
|
|
|
string path = pathEdit.text();
|
|
|
|
setPath(path);
|
|
|
|
};
|
|
|
|
|
|
|
|
homeButton.onActivate = [&] {
|
|
|
|
setPath(userpath());
|
|
|
|
};
|
|
|
|
|
|
|
|
upButton.onActivate = [&] {
|
|
|
|
setPath(parentdir(pathname));
|
|
|
|
};
|
|
|
|
|
|
|
|
fileList.onActivate = openButton.onActivate = [&] {
|
|
|
|
if(fileList.selected() == false) return;
|
|
|
|
string name = filenameList(fileList.selection());
|
|
|
|
if(name.empty()) return;
|
|
|
|
|
2013-12-07 09:12:37 +00:00
|
|
|
if(name.endsWith("/")) return setPath(name);
|
Update to ananke v00r02 release.
byuu says:
This should be basically final now.
Works with all media types (nes, sfc, gb, gbc, gba, bs, st), strips
headers, can use internal or external firmware, imports saves on first
run.
Added a custom file dialog. It seems both GTK+ and Windows XP have
(un)intelligent file sorting, which puts eg "ActRaiser 2 (NA)" before
"ActRaiser (NA)". So, screw 'em.
2012-12-24 05:48:23 +00:00
|
|
|
filename = name;
|
|
|
|
onClose();
|
|
|
|
};
|
|
|
|
|
|
|
|
onClose = [&] {
|
|
|
|
setModal(false);
|
|
|
|
setVisible(false);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
string pathname;
|
|
|
|
string filename;
|
|
|
|
lstring filenameList;
|
|
|
|
};
|