Update to v103r05 release.
byuu says:
Changelog:
- fc/controller: added ControllerPort class; removed Peripherals class
- md/controller/gamepad: removed X,Y,Z buttons since this isn't a
6-button controller
- ms/controller: added ControllerPort class (not used in Game Gear
mode); removed Peripherals class
- pce/controller: added ControllerPort class; removed Peripherals
class
- processor/spc700: idle(address) is part of SMP class again, contains
flag to detect mov (x)+ edge case
- sfc/controller/super-scope,justifier: use CPU frequency instead of
hard-coding NTSC frequency
- sfc/cpu: move 4x8-bit SMP ports to SMP class
- sfc/smp: move APU RAM to DSP class
- sfc/smp: improved emulation of TEST registers bits 4-7 [information
from nocash]
- d4,d5 is RAM wait states (1,2,5,10)
- d6,d7 is ROM/IO wait states (1,2,5,10)
- sfc/smp: code cleanup to new style (order from lowest to highest
bits; use .bit(s) functions)
- sfc/smp: $00f8,$00f9 are P4/P5 auxiliary ports; named the registers
better
2017-07-01 06:15:27 +00:00
|
|
|
Gamepad::Gamepad(uint port) : Controller(port) {
|
2015-10-10 02:16:12 +00:00
|
|
|
latched = 0;
|
|
|
|
counter = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto Gamepad::data() -> uint2 {
|
2011-06-24 10:43:29 +00:00
|
|
|
if(counter >= 16) return 1;
|
2017-01-13 01:15:45 +00:00
|
|
|
if(latched == 1) return platform->inputPoll(port, ID::Device::Gamepad, B);
|
Update to v090 release.
byuu says:
Most notably, this release adds Nintendo DS emulation. The Nintendo DS
module was written entirely by Cydrak, so please give him all of the
credit for it. I for one am extremely grateful to be allowed to use his
module in bsnes.
The Nintendo DS emulator's standalone name is dasShiny. You will need
the Nintendo DS firmware, which I cannot provide, in order to use it. It
also cannot (currently?) detect the save type used by NDS games. As
such, manifest.xml files must be created manually for this purpose. The
long-term plan is to create a database of save types for each game.
Also, you will need an analog input device for the touch screen for now
(joypad axes work well.)
There have also been a lot of changes from my end: a unified
manifest.xml format across all systems, major improvements to SPC7110
emulation, enhancements to RTC emulation, MSU1 enhancements, icons in
the file browser list, improvements to SNES coprocessor memory mapping,
cleanups and improvements in the libraries used to build bsnes, etc.
I've also included kaijuu (which allows launching game folders directly
with bsnes) and purify (which allows opening images that are compressed,
have copier headers, and have wrong extensions); both of which are fully
GUI-based.
This release only loads game folders, not files. Use purify to load ROM
files in bsnes.
Note that this will likely be the last release for a long time, and that
I will probably rename the emulator for the next release, due to how
many additional systems it now supports.
2012-08-07 14:08:37 +00:00
|
|
|
|
|
|
|
//note: D-pad physically prevents up+down and left+right from being pressed at the same time
|
|
|
|
switch(counter++) {
|
|
|
|
case 0: return b;
|
|
|
|
case 1: return y;
|
|
|
|
case 2: return select;
|
|
|
|
case 3: return start;
|
|
|
|
case 4: return up & !down;
|
|
|
|
case 5: return down & !up;
|
|
|
|
case 6: return left & !right;
|
|
|
|
case 7: return right & !left;
|
|
|
|
case 8: return a;
|
|
|
|
case 9: return x;
|
|
|
|
case 10: return l;
|
|
|
|
case 11: return r;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0; //12-15: signature
|
2011-06-24 10:43:29 +00:00
|
|
|
}
|
|
|
|
|
2015-10-10 02:16:12 +00:00
|
|
|
auto Gamepad::latch(bool data) -> void {
|
2011-06-24 10:43:29 +00:00
|
|
|
if(latched == data) return;
|
|
|
|
latched = data;
|
|
|
|
counter = 0;
|
Update to v090 release.
byuu says:
Most notably, this release adds Nintendo DS emulation. The Nintendo DS
module was written entirely by Cydrak, so please give him all of the
credit for it. I for one am extremely grateful to be allowed to use his
module in bsnes.
The Nintendo DS emulator's standalone name is dasShiny. You will need
the Nintendo DS firmware, which I cannot provide, in order to use it. It
also cannot (currently?) detect the save type used by NDS games. As
such, manifest.xml files must be created manually for this purpose. The
long-term plan is to create a database of save types for each game.
Also, you will need an analog input device for the touch screen for now
(joypad axes work well.)
There have also been a lot of changes from my end: a unified
manifest.xml format across all systems, major improvements to SPC7110
emulation, enhancements to RTC emulation, MSU1 enhancements, icons in
the file browser list, improvements to SNES coprocessor memory mapping,
cleanups and improvements in the libraries used to build bsnes, etc.
I've also included kaijuu (which allows launching game folders directly
with bsnes) and purify (which allows opening images that are compressed,
have copier headers, and have wrong extensions); both of which are fully
GUI-based.
This release only loads game folders, not files. Use purify to load ROM
files in bsnes.
Note that this will likely be the last release for a long time, and that
I will probably rename the emulator for the next release, due to how
many additional systems it now supports.
2012-08-07 14:08:37 +00:00
|
|
|
|
|
|
|
if(latched == 0) {
|
2017-01-13 01:15:45 +00:00
|
|
|
b = platform->inputPoll(port, ID::Device::Gamepad, B);
|
|
|
|
y = platform->inputPoll(port, ID::Device::Gamepad, Y);
|
|
|
|
select = platform->inputPoll(port, ID::Device::Gamepad, Select);
|
|
|
|
start = platform->inputPoll(port, ID::Device::Gamepad, Start);
|
|
|
|
up = platform->inputPoll(port, ID::Device::Gamepad, Up);
|
|
|
|
down = platform->inputPoll(port, ID::Device::Gamepad, Down);
|
|
|
|
left = platform->inputPoll(port, ID::Device::Gamepad, Left);
|
|
|
|
right = platform->inputPoll(port, ID::Device::Gamepad, Right);
|
|
|
|
a = platform->inputPoll(port, ID::Device::Gamepad, A);
|
|
|
|
x = platform->inputPoll(port, ID::Device::Gamepad, X);
|
|
|
|
l = platform->inputPoll(port, ID::Device::Gamepad, L);
|
|
|
|
r = platform->inputPoll(port, ID::Device::Gamepad, R);
|
Update to v090 release.
byuu says:
Most notably, this release adds Nintendo DS emulation. The Nintendo DS
module was written entirely by Cydrak, so please give him all of the
credit for it. I for one am extremely grateful to be allowed to use his
module in bsnes.
The Nintendo DS emulator's standalone name is dasShiny. You will need
the Nintendo DS firmware, which I cannot provide, in order to use it. It
also cannot (currently?) detect the save type used by NDS games. As
such, manifest.xml files must be created manually for this purpose. The
long-term plan is to create a database of save types for each game.
Also, you will need an analog input device for the touch screen for now
(joypad axes work well.)
There have also been a lot of changes from my end: a unified
manifest.xml format across all systems, major improvements to SPC7110
emulation, enhancements to RTC emulation, MSU1 enhancements, icons in
the file browser list, improvements to SNES coprocessor memory mapping,
cleanups and improvements in the libraries used to build bsnes, etc.
I've also included kaijuu (which allows launching game folders directly
with bsnes) and purify (which allows opening images that are compressed,
have copier headers, and have wrong extensions); both of which are fully
GUI-based.
This release only loads game folders, not files. Use purify to load ROM
files in bsnes.
Note that this will likely be the last release for a long time, and that
I will probably rename the emulator for the next release, due to how
many additional systems it now supports.
2012-08-07 14:08:37 +00:00
|
|
|
}
|
2011-06-24 10:43:29 +00:00
|
|
|
}
|