Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ the available modes and difficulty levels for different Atari games:
| Phoenix | [0] | 0 | [0] | 0 |
| Pitfall | [0] | 0 | [0] | 0 |
| Pitfall2 | [0] | 0 | [0] | 0 |
| Pong | [0, 1] | 0 | [0, 1, 2, 3] | 0 |
| Pong | [1, 2] | 1 | [0, 1, 2, 3] | 0 |
| Pooyan | [10, 30, 50, 70] | 10 | [0] | 0 |
| PrivateEye | [0, 1, 2, 3, 4] | 0 | [0, 1, 2, 3] | 0 |
| Qbert | [0] | 0 | [0, 1] | 0 |
Expand All @@ -328,7 +328,7 @@ the available modes and difficulty levels for different Atari games:
| SpaceWar | [6, ..., 17] | 6 | [0] | 0 |
| StarGunner | [0, 1, 2, 3] | 0 | [0] | 0 |
| Superman | [0] | 0 | [0, 1, 2, 3] | 0 |
| Surround | [0, 2] | 0 | [0, 1, 2, 3] | 0 |
| Surround | [2, 4] | 2 | [0, 1, 2, 3] | 0 |
| Tennis | [0, 2] | 0 | [0, 1, 2, 3] | 0 |
| Tetris | [0] | 0 | [0] | 0 |
| TicTacToe3D | [0, ..., 8] | 0 | [0, 2] | 0 |
Expand Down
2 changes: 1 addition & 1 deletion docs/environments/pong.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ along with the default values.

| Available Modes | Default Mode | Available Difficulties | Default Difficulty |
|-------------------|----------------|--------------------------|----------------------|
| `[0, 1]` | `0` | `[0, 1, 2, 3]` | `0` |
| `[1, 2]` | `1` | `[0, 1, 2, 3]` | `0` |

## Version History

Expand Down
2 changes: 1 addition & 1 deletion docs/environments/surround.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ along with the default values.

| Available Modes | Default Mode | Available Difficulties | Default Difficulty |
|-------------------|----------------|--------------------------|----------------------|
| `[0, 2]` | `0` | `[0, 1, 2, 3]` | `0` |
| `[2, 4]` | `2` | `[0, 1, 2, 3]` | `0` |

## Version History

Expand Down
10 changes: 3 additions & 7 deletions src/ale/games/supported/Pong.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,19 @@ void PongSettings::loadState(Deserializer& ser) {

// returns a list of mode that the game can be played in
ModeVect PongSettings::getAvailableModes() {
ModeVect modes(getNumModes());
for (unsigned int i = 0; i < modes.size(); i++) {
modes[i] = i;
}
return modes;
return {1, 2};
}

// set the mode of the game
// the given mode must be one returned by the previous function
void PongSettings::setMode(
game_mode_t m, System& system,
std::unique_ptr<StellaEnvironmentWrapper> environment) {
if (m < getNumModes()) {
if (isModeSupported(m)) {
// read the mode we are currently in
unsigned char mode = readRam(&system, 0x96);
// press select until the correct mode is reached
while (mode != m) {
while (mode != m - 1) {
environment->pressSelect(2);
mode = readRam(&system, 0x96);
}
Expand Down
6 changes: 3 additions & 3 deletions src/ale/games/supported/Surround.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@ DifficultyVect SurroundSettings::getAvailableDifficulties() {
// https://atariage.com/manual_html_page.php?SoftwareLabelID=535
// There are only two single player modes, the second is faster than the first.
ModeVect SurroundSettings::getAvailableModes() {
return {0, 2};
return {2, 4};
}

void SurroundSettings::setMode(
game_mode_t m, System& system,
std::unique_ptr<StellaEnvironmentWrapper> environment) {
if (m == 0 || m == 2) {
if (isModeSupported(m)) {
// Read the game mode from RAM address 0xf9.
unsigned char mode = readRam(&system, 0xf9);
int desired_mode = m + 1;
int desired_mode = m - 1;

// Press select until the correct mode is reached for single player only.
while (mode != desired_mode) {
Expand Down
Loading