ares-openbsd/nall/range.hpp

82 行
2.4 KiB
C++
Raw 通常表示 履歴

#pragma once
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
Update to ares v120r15 release. - TLCS900H: refactored instruction decoder and disassembler using range-case - TLCS900H: improved emulation of (PC+d16) addressing mode (LDAR) - TMS9918, V9938, SMS VDP: corrected sprite zoom emulation [Jonas Quinn] - Neo Geo Pocket: added new debugging modules (flash ROM, I/O accesses, system calls) - Neo Geo Pocket: improved CPU interrupt logger (prints name of interrupt now) - Neo Geo Pocket: fixed a critical issue with interrupt priority levels; fixes many games - Neo Geo Pocket: added stubs for all remaining TMP95C061F I/O registers (not emulated yet) - Neo Geo Pocket: set CPU I/O port $b1.d2 reads to return 1 (fixes SNK Gals' Fighter) - Neo Geo Pocket: added stubs for undocumented CPU I/O ports $b6 and $b7 - Super Famicom: PPU code restructuring - Super Famicom: added widescreen (16:9 and 21:9) support to the scanline renderer - WonderSwan: refactored I/O handlers to use switch/case instead of if tests - WonderSwan: rewrote PPU renderer to modularize each component (screen1, screen2, sprite, dac, etc) - WonderSwan: corrected timers to count down instead of up; fixes timing in many games [FPGAzumSpass] - WonderSwan: improved screen two window emulation [FPGAzumSpass] - hiro: TableView::onContext() is now TableView::onContext(TableViewCell) (not supported for Cocoa or Qt yet) - lucia: merged code to handle input assignment overlays and controller polling for each emulation core - lucia: added virtual mouse emulation and added mouse capture support - lucia: added support to change devices connected to controller ports - Neo Geo Pocket: added database workaround for underdumped Prize Game: PP-AA01 Pusher Program (Japan) - Neo Geo Pocket: fixed fast boot mode for Neo Cherry Pocket - nall/range: added new within() templates
2021-06-14 17:07:00 +09:00
#include <nall/maybe.hpp>
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
namespace nall {
template<typename T = s64>
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
struct range_t {
struct iterator {
iterator(T position, T step = 0) : position(position), step(step) {}
auto operator*() const -> T { return position; }
auto operator!=(const iterator& source) const -> bool { return step > 0 ? position < source.position : position > source.position; }
auto operator++() -> iterator& { position += step; return *this; }
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
private:
T position;
const T step;
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
};
Update to v106r47 release. byuu says: This is probably the largest code-change diff I've done in years. I spent four days working 10-16 hours a day reworking layouts in hiro completely. The result is we now have TableLayout, which will allow for better horizontal+vertical combined alignment. Windows, GTK2, and now GTK3 are fully supported. Windows is getting the initial window geometry wrong by a bit. GTK2 and GTK3 work perfectly. I basically abandoned trying to detect resize signals, and instead keep a list of all hiro windows that are allocated, and every time the main loop runs, it will query all of them to see if they've been resized. I'm disgusted that I have to do this, but after fighting with GTK for years, I'm about sick of it. GTK was doing this crazy thing where it would trigger another size-allocate inside of a previous size-allocate, and so my layouts would be halfway through resizing all the widgets, and then the size-allocate would kick off another one. That would end up leaving the rest of the first layout loop with bad widget sizes. And if I detected a second re-entry and blocked it, then the entire window would end up with the older geometry. I started trying to build a message queue system to allow the second layout resize to occur after the first one completed, but this was just too much madness, so I went with the simpler solution. Qt4 has some geometry problems, and doesn't show tab frame layouts properly yet. Qt5 causes an ICE error and tanks my entire Xorg display server, so ... something is seriously wrong there, and it's not hiro's fault. Creating a dummy Qt5 application without even using hiro, just int main() { TestObject object; } with object performing a dynamic\_cast to a derived type segfaults. Memory is getting corrupted where GCC allocates the vtables for classes, just by linking in Qt. Could be somehow related to the -fPIC requirement that only Qt5 has ... could just be that FreeBSD 10.1 has a buggy implementation of Qt5. I don't know. It's beyond my ability to debug, so this one's going to stay broken. The Cocoa port is busted. I'll fix it up to compile again, but that's about all I'm going to do. Many optimizations mean bsnes and higan open faster. GTK2 and GTK3 both resize windows very quickly now. higan crashes when you load a game, so that's not good. bsnes works though. bsnes also has the start of a localization engine now. Still a long way to go. The makefiles received a rather substantial restructuring. Including the ruby and hiro makefiles will add the necessary compilation rules for you, which also means that moc will run for the qt4 and qt5 targets, and windres will run for the Windows targets.
2018-07-14 12:59:29 +09:00
struct reverse_iterator {
reverse_iterator(T position, T step = 0) : position(position), step(step) {}
auto operator*() const -> T { return position; }
Update to v106r47 release. byuu says: This is probably the largest code-change diff I've done in years. I spent four days working 10-16 hours a day reworking layouts in hiro completely. The result is we now have TableLayout, which will allow for better horizontal+vertical combined alignment. Windows, GTK2, and now GTK3 are fully supported. Windows is getting the initial window geometry wrong by a bit. GTK2 and GTK3 work perfectly. I basically abandoned trying to detect resize signals, and instead keep a list of all hiro windows that are allocated, and every time the main loop runs, it will query all of them to see if they've been resized. I'm disgusted that I have to do this, but after fighting with GTK for years, I'm about sick of it. GTK was doing this crazy thing where it would trigger another size-allocate inside of a previous size-allocate, and so my layouts would be halfway through resizing all the widgets, and then the size-allocate would kick off another one. That would end up leaving the rest of the first layout loop with bad widget sizes. And if I detected a second re-entry and blocked it, then the entire window would end up with the older geometry. I started trying to build a message queue system to allow the second layout resize to occur after the first one completed, but this was just too much madness, so I went with the simpler solution. Qt4 has some geometry problems, and doesn't show tab frame layouts properly yet. Qt5 causes an ICE error and tanks my entire Xorg display server, so ... something is seriously wrong there, and it's not hiro's fault. Creating a dummy Qt5 application without even using hiro, just int main() { TestObject object; } with object performing a dynamic\_cast to a derived type segfaults. Memory is getting corrupted where GCC allocates the vtables for classes, just by linking in Qt. Could be somehow related to the -fPIC requirement that only Qt5 has ... could just be that FreeBSD 10.1 has a buggy implementation of Qt5. I don't know. It's beyond my ability to debug, so this one's going to stay broken. The Cocoa port is busted. I'll fix it up to compile again, but that's about all I'm going to do. Many optimizations mean bsnes and higan open faster. GTK2 and GTK3 both resize windows very quickly now. higan crashes when you load a game, so that's not good. bsnes works though. bsnes also has the start of a localization engine now. Still a long way to go. The makefiles received a rather substantial restructuring. Including the ruby and hiro makefiles will add the necessary compilation rules for you, which also means that moc will run for the qt4 and qt5 targets, and windres will run for the Windows targets.
2018-07-14 12:59:29 +09:00
auto operator!=(const reverse_iterator& source) const -> bool { return step > 0 ? position > source.position : position < source.position; }
auto operator++() -> reverse_iterator& { position -= step; return *this; }
private:
T position;
const T step;
Update to v106r47 release. byuu says: This is probably the largest code-change diff I've done in years. I spent four days working 10-16 hours a day reworking layouts in hiro completely. The result is we now have TableLayout, which will allow for better horizontal+vertical combined alignment. Windows, GTK2, and now GTK3 are fully supported. Windows is getting the initial window geometry wrong by a bit. GTK2 and GTK3 work perfectly. I basically abandoned trying to detect resize signals, and instead keep a list of all hiro windows that are allocated, and every time the main loop runs, it will query all of them to see if they've been resized. I'm disgusted that I have to do this, but after fighting with GTK for years, I'm about sick of it. GTK was doing this crazy thing where it would trigger another size-allocate inside of a previous size-allocate, and so my layouts would be halfway through resizing all the widgets, and then the size-allocate would kick off another one. That would end up leaving the rest of the first layout loop with bad widget sizes. And if I detected a second re-entry and blocked it, then the entire window would end up with the older geometry. I started trying to build a message queue system to allow the second layout resize to occur after the first one completed, but this was just too much madness, so I went with the simpler solution. Qt4 has some geometry problems, and doesn't show tab frame layouts properly yet. Qt5 causes an ICE error and tanks my entire Xorg display server, so ... something is seriously wrong there, and it's not hiro's fault. Creating a dummy Qt5 application without even using hiro, just int main() { TestObject object; } with object performing a dynamic\_cast to a derived type segfaults. Memory is getting corrupted where GCC allocates the vtables for classes, just by linking in Qt. Could be somehow related to the -fPIC requirement that only Qt5 has ... could just be that FreeBSD 10.1 has a buggy implementation of Qt5. I don't know. It's beyond my ability to debug, so this one's going to stay broken. The Cocoa port is busted. I'll fix it up to compile again, but that's about all I'm going to do. Many optimizations mean bsnes and higan open faster. GTK2 and GTK3 both resize windows very quickly now. higan crashes when you load a game, so that's not good. bsnes works though. bsnes also has the start of a localization engine now. Still a long way to go. The makefiles received a rather substantial restructuring. Including the ruby and hiro makefiles will add the necessary compilation rules for you, which also means that moc will run for the qt4 and qt5 targets, and windres will run for the Windows targets.
2018-07-14 12:59:29 +09:00
};
auto begin() const -> iterator { return {origin, stride}; }
auto end() const -> iterator { return {target}; }
auto rbegin() const -> reverse_iterator { return {target - stride, stride}; }
auto rend() const -> reverse_iterator { return {origin - stride}; }
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
T origin;
T target;
T stride;
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
};
template<typename T = s64>
inline auto range(s64 size) {
return range_t<T>{0, size, 1};
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
}
template<typename T = s64>
inline auto range(s64 offset, s64 size) {
return range_t<T>{offset, size, 1};
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
}
template<typename T = s64>
inline auto range(s64 offset, s64 size, s64 step) {
return range_t<T>{offset, size, step};
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
}
Update to ares v120r15 release. - TLCS900H: refactored instruction decoder and disassembler using range-case - TLCS900H: improved emulation of (PC+d16) addressing mode (LDAR) - TMS9918, V9938, SMS VDP: corrected sprite zoom emulation [Jonas Quinn] - Neo Geo Pocket: added new debugging modules (flash ROM, I/O accesses, system calls) - Neo Geo Pocket: improved CPU interrupt logger (prints name of interrupt now) - Neo Geo Pocket: fixed a critical issue with interrupt priority levels; fixes many games - Neo Geo Pocket: added stubs for all remaining TMP95C061F I/O registers (not emulated yet) - Neo Geo Pocket: set CPU I/O port $b1.d2 reads to return 1 (fixes SNK Gals' Fighter) - Neo Geo Pocket: added stubs for undocumented CPU I/O ports $b6 and $b7 - Super Famicom: PPU code restructuring - Super Famicom: added widescreen (16:9 and 21:9) support to the scanline renderer - WonderSwan: refactored I/O handlers to use switch/case instead of if tests - WonderSwan: rewrote PPU renderer to modularize each component (screen1, screen2, sprite, dac, etc) - WonderSwan: corrected timers to count down instead of up; fixes timing in many games [FPGAzumSpass] - WonderSwan: improved screen two window emulation [FPGAzumSpass] - hiro: TableView::onContext() is now TableView::onContext(TableViewCell) (not supported for Cocoa or Qt yet) - lucia: merged code to handle input assignment overlays and controller polling for each emulation core - lucia: added virtual mouse emulation and added mouse capture support - lucia: added support to change devices connected to controller ports - Neo Geo Pocket: added database workaround for underdumped Prize Game: PP-AA01 Pusher Program (Japan) - Neo Geo Pocket: fixed fast boot mode for Neo Cherry Pocket - nall/range: added new within() templates
2021-06-14 17:07:00 +09:00
//returns true if {offset ... offset+length-1} is within {min ... max} in range {lo ... hi}
template<s64 lo, s64 hi>
inline auto within(s64 offset, s64 length, s64 min, s64 max) -> bool {
static_assert(lo <= hi);
static constexpr s64 range = hi - lo + 1;
s64 lhs = (offset - lo) % range;
s64 rhs = (lhs + length - 1) % range;
Update to ares v120r15 release. - TLCS900H: refactored instruction decoder and disassembler using range-case - TLCS900H: improved emulation of (PC+d16) addressing mode (LDAR) - TMS9918, V9938, SMS VDP: corrected sprite zoom emulation [Jonas Quinn] - Neo Geo Pocket: added new debugging modules (flash ROM, I/O accesses, system calls) - Neo Geo Pocket: improved CPU interrupt logger (prints name of interrupt now) - Neo Geo Pocket: fixed a critical issue with interrupt priority levels; fixes many games - Neo Geo Pocket: added stubs for all remaining TMP95C061F I/O registers (not emulated yet) - Neo Geo Pocket: set CPU I/O port $b1.d2 reads to return 1 (fixes SNK Gals' Fighter) - Neo Geo Pocket: added stubs for undocumented CPU I/O ports $b6 and $b7 - Super Famicom: PPU code restructuring - Super Famicom: added widescreen (16:9 and 21:9) support to the scanline renderer - WonderSwan: refactored I/O handlers to use switch/case instead of if tests - WonderSwan: rewrote PPU renderer to modularize each component (screen1, screen2, sprite, dac, etc) - WonderSwan: corrected timers to count down instead of up; fixes timing in many games [FPGAzumSpass] - WonderSwan: improved screen two window emulation [FPGAzumSpass] - hiro: TableView::onContext() is now TableView::onContext(TableViewCell) (not supported for Cocoa or Qt yet) - lucia: merged code to handle input assignment overlays and controller polling for each emulation core - lucia: added virtual mouse emulation and added mouse capture support - lucia: added support to change devices connected to controller ports - Neo Geo Pocket: added database workaround for underdumped Prize Game: PP-AA01 Pusher Program (Japan) - Neo Geo Pocket: fixed fast boot mode for Neo Cherry Pocket - nall/range: added new within() templates
2021-06-14 17:07:00 +09:00
min = (min - lo) % range;
max = (max - lo) % range;
return lhs >= min && lhs <= max || rhs >= min && rhs <= max;
Update to ares v120r15 release. - TLCS900H: refactored instruction decoder and disassembler using range-case - TLCS900H: improved emulation of (PC+d16) addressing mode (LDAR) - TMS9918, V9938, SMS VDP: corrected sprite zoom emulation [Jonas Quinn] - Neo Geo Pocket: added new debugging modules (flash ROM, I/O accesses, system calls) - Neo Geo Pocket: improved CPU interrupt logger (prints name of interrupt now) - Neo Geo Pocket: fixed a critical issue with interrupt priority levels; fixes many games - Neo Geo Pocket: added stubs for all remaining TMP95C061F I/O registers (not emulated yet) - Neo Geo Pocket: set CPU I/O port $b1.d2 reads to return 1 (fixes SNK Gals' Fighter) - Neo Geo Pocket: added stubs for undocumented CPU I/O ports $b6 and $b7 - Super Famicom: PPU code restructuring - Super Famicom: added widescreen (16:9 and 21:9) support to the scanline renderer - WonderSwan: refactored I/O handlers to use switch/case instead of if tests - WonderSwan: rewrote PPU renderer to modularize each component (screen1, screen2, sprite, dac, etc) - WonderSwan: corrected timers to count down instead of up; fixes timing in many games [FPGAzumSpass] - WonderSwan: improved screen two window emulation [FPGAzumSpass] - hiro: TableView::onContext() is now TableView::onContext(TableViewCell) (not supported for Cocoa or Qt yet) - lucia: merged code to handle input assignment overlays and controller polling for each emulation core - lucia: added virtual mouse emulation and added mouse capture support - lucia: added support to change devices connected to controller ports - Neo Geo Pocket: added database workaround for underdumped Prize Game: PP-AA01 Pusher Program (Japan) - Neo Geo Pocket: fixed fast boot mode for Neo Cherry Pocket - nall/range: added new within() templates
2021-06-14 17:07:00 +09:00
}
//returns index of target within {offset ... offset+length-1} in range {lo ... hi}
template<s64 lo, s64 hi>
inline auto within(s64 offset, s64 length, s64 target) -> maybe<u64> {
static_assert(lo <= hi);
static constexpr s64 range = hi - lo + 1;
s64 start = (offset - lo) % range;
s64 index = (target - lo) % range - start;
if(index < 0) index += range;
if(index < length) return index;
return {};
}
Update to v094r09 release. byuu says: This will easily be the biggest diff in the history of higan. And not in a good way. * target-higan and target-loki have been blown away completely * nall and ruby massively updated * phoenix replaced with hiro (pretty near a total rewrite) * target-higan restarted using hiro (just a window for now) * all emulation cores updated to compile again * installation changed to not require root privileges (installs locally) For the foreseeable future (maybe even permanently?), the new higan UI will only build under Linux/BSD with GTK+ 2.20+. Probably the most likely route for Windows/OS X will be to try and figure out how to build hiro/GTK on those platforms, as awful as that would be. The other alternative would be to produce new UIs for those platforms ... which would actually be a good opportunity to make something much more user friendly. Being that I just started on this a few hours ago, that means that for at least a few weeks, don't expect to be able to actually play any games. Right now, you can pretty much just compile the binary and that's it. It's quite possible that some nall changes didn't produce compilation errors, but will produce runtime errors. So until the UI can actually load games, we won't know if anything is broken. But we should mostly be okay. It was mostly just trim<1> -> trim changes, moving to Hash::SHA256 (much cleaner), and patching some reckless memory copy functions enough to compile. Progress isn't going to be like it was before: I'm now dividing my time much thinner between studying and other hobbies. My aim this time is not to produce a binary for everyone to play games on. Rather, it's to keep the emulator alive. I want to be able to apply critical patches again. And I would also like the base of the emulator to live on, for use in other emulator frontends that utilize higan.
2015-02-26 19:10:46 +09:00
}