Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strict paddle #28

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
Binary file added .assets/j2dip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 24 additions & 8 deletions .assets/wiring.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .assets/wiring_spi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The A2600Nano is a port of the [MiSTer](https://github.com/MiSTer-devel/Atari260
| Board | FPGA | support |Note|
| --- | - | - |-|
| [Tang Nano 9k](https://wiki.sipeed.com/hardware/en/tang/Tang-Nano-9K/Nano-9K.html) | [GW1NR](https://www.gowinsemi.com/en/product/detail/38/) |X |micro SD card [HW modification](TANG_NANO_9K.md#hw-modification) needed|
| [Tang Nano 20k](https://wiki.sipeed.com/nano20k) | [GW2AR](https://www.gowinsemi.com/en/product/detail/38/) | X |- |
| [Tang Nano 20k](https://wiki.sipeed.com/nano20k) | [GW2AR](https://www.gowinsemi.com/en/product/detail/38/) |X |twin Dualshock<br> MiSTeryShield20k spare header + Joy to DIP |
| [Tang Primer 20K Dock ext Board](https://wiki.sipeed.com/hardware/en/tang/tang-primer-20k/primer-20k.html)| [GW2A](https://www.gowinsemi.com/en/product/detail/46/)| X |twin Dualshock |
| [Tang Primer 25K](https://wiki.sipeed.com/hardware/en/tang/tang-primer-25k/primer-25k.html) | [GW5A-25](https://www.gowinsemi.com/en/product/detail/60/) | X |no Dualshock, no retro D9 Joystick |
| [Tang Mega 60k NEO](https://wiki.sipeed.com/hardware/en/tang/tang-mega-60k/mega-60k.html)|[GW5AT-60](https://www.gowinsemi.com/en/product/detail/60/)| X |twin Dualshock |
Expand Down Expand Up @@ -70,17 +70,18 @@ ROM can be loaded via OSD file selection.<br>

LED 1 to 5 are activated as hint in case an unsupported game (mapper) detected<br>

### single Button Joystick
### single / dual Button Joystick
* Button ```Trigger```
* 2nd Button ```Trigger 2```

### four Button Joystick or Gamepad
* Gamepad Button ```Trigger A (DS2 circle)``` Trigger
* Gamepad Button ```Trigger A (DS2 circle)``` 1st Trigger Button

* Gamepad Button ```Trigger B (DS2 cross)``` Paddle Trigger and enable
* Gamepad Button ```Trigger B (DS2 cross)``` 2nd Trigger Button

* Gamepad Button ```Trigger X (DS2 triangle)``` Paddle 2nd Trigger and enable
* Gamepad Button ```Trigger X (DS2 triangle)``` 1st Paddle Trigger and enable

* Gamepad Button ```Trigger Y (DS2 square)``` revert Paddle mode to Joystick mode
* Gamepad Button ```Trigger Y (DS2 square)``` 2nd Paddle Trigger and enable

* Gamepad Button ```START``` as core function **START**<br>

Expand All @@ -89,8 +90,7 @@ LED 1 to 5 are activated as hint in case an unsupported game (mapper) detected<b
### Paddle
* DualShock 2, USB Gamepad or USB Mouse.<br>

Core switches to paddle mode if paddle ```Trigger B``` or ```Trigger X``` is pressed respectively ```left Mouse Button``` or ```right Mouse Button```.<br>
Can be reverted by pressing Gamepad Button ```Trigger Y```.
Core switches to paddle mode if paddle ```Trigger X``` or ```Trigger Y``` is pressed respectively ```left Mouse Button``` or ```right Mouse Button```.<br>

### Keyboard
* Key **F11** as core function ```START``` <br>
Expand Down Expand Up @@ -120,6 +120,7 @@ invoke by F12 keypress<br>
## Gamecontrol support

![controller](\.assets/controller-layout.png)<br>
A 2nd Trigger Button is supported for modified Games.

legacy single D9 Digital Joystick. OSD: **Retro D9**<br>
or<br>
Expand Down Expand Up @@ -147,15 +148,15 @@ or<br> Keyboard Numpad. OSD: **Numpad**<br>

| - | | |
| - |- |- |
|0<br>Trigger|8<br>Up | |
|0<br>Trigger|8<br>Up |.<br>Trigger 2|
|4<br>Left |- |6<br>Right|
|- |2<br>Down|- |

or<br> Mouse. OSD: **Mouse**<br>
```left Mouse Button``` and ```right Mouse Button``` as Trigger for Paddle 1 or 2.<br>

or<br> Dualshock2 Gamepad left stick as Paddle. OSD: **DS #1 Joy** or **DS #2 Joy**<br>
**cross / triangle** Trigger<br>
or<br> Dualshock2 Gamepad left stick as Paddle. OSD: **DS #1 Paddle** or **DS #2 Paddle**<br>
**rectangle (Y) / triangle (X)** Trigger<br>
You have first to set the DS2 Sticks into **analog mode** by pressing the DS2 ANALOG button.<br> Mode indicated by red light indicator.<br>Configure DIGITAL mode (press ANALOG button again) when using the **Joystick** mode again.<br>

## LED UI
Expand Down
146 changes: 146 additions & 0 deletions atari2600.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- A2600 configuration -->
<config name="A2600Nano" version="0">
<actions>
<!-- the init action is being executed immediately -->
<!-- when this file has been loaded -->
<action name="init">
<!-- (try to) load config from sd card -->
<load file="atari2600.ini"/>
<set id="R" value="1"/> <!-- keep machine in reset -->
</action>

<!-- the ready action is being executed once all -->
<!-- initialization has been done -->
<action name="ready">
<set id="R" value="0"/> <!-- release reset -->
</action>

<action name="save">
<!-- save config to sd card -->
<save file="atari2600.ini"/>
</action>

<action name="reset">
<!-- trigger a system reset -->
<set id="R" value="1"/>
<delay ms="10"/>
<set id="R" value="0"/>
</action>

<action name="reset_hide">
<!-- trigger a system reset and hide OSD -->
<link action="reset"/>
<hide/>
</action>

<action name="cold_reset">
<!-- trigger a cold system reset -->
<set id="R" value="3"/>
<delay ms="10"/>
<set id="R" value="0"/>
</action>

<action name="cold_reset_hide">
<!-- trigger a cold reset and hide OSD -->
<link action="cold_reset"/>
<hide/>
</action>
</actions>

<menu label="A2600Nano">
<fileselector label="Cartridge:" ext="BIN;A26;F8;F6;FE;E0;3F;F4;P2;FA;CV;2K;UA;E7;F0;32;AR" index="0"/>
<menu label="System">
<list label="Joyport 1:" id="Q" default="1">
<listentry label="Retro #1 D9" value="0"/>
<listentry label="USB #1 Joyst" value="1"/>
<listentry label="USB #2 Joyst" value="2"/>
<listentry label="NumPad" value="3"/>
<listentry label="DS #1 Joyst" value="4"/>
<listentry label="DS #2 Joyst" value="5"/>
<listentry label="Mouse" value="6"/>
<listentry label="USB #1 Paddl" value="7"/>
<listentry label="USB #2 Paddl" value="8"/>
<listentry label="DS #1 Paddle" value="9"/>
<listentry label="DS #2 Paddle" value="10"/>
<listentry label="Off" value="11"/>
</list>
<list label="Joyport 2:" id="J" default="11">
<listentry label="Retro #1 D9" value="0"/>
<listentry label="USB #1 Joyst" value="1"/>
<listentry label="USB #2 Joyst" value="2"/>
<listentry label="NumPad" value="3"/>
<listentry label="DS #1 Joyst" value="4"/>
<listentry label="DS #2 Joyst" value="5"/>
<listentry label="Mouse" value="6"/>
<listentry label="USB #1 Paddl" value="7"/>
<listentry label="USB #2 Paddl" value="8"/>
<listentry label="DS #1 Paddle" value="9"/>
<listentry label="DS #2 Paddle" value="10"/>
<listentry label="Off" value="11"/>
</list>
<list label="Swap Joyst:" id="&" default="0">
<listentry label="Off" value="0"/>
<listentry label="On" value="1"/>
</list>
<list label="Invert Paddle:" id="V" default="0">
<listentry label="Off" value="0"/>
<listentry label="On" value="1"/>
</list>
<list label="Difficulty P1:" id="X" default="0">
<listentry label="A" value="0"/>
<listentry label="B" value="1"/>
</list>
<list label="Difficulty P2:" id="Y" default="0">
<listentry label="A" value="0"/>
<listentry label="B" value="1"/>
</list>
<list label="De-comb:" id="C" default="0">
<listentry label="Off" value="0"/>
<listentry label="On" value="1"/>
</list>
<list label="VBlank:" id="M" default="0">
<listentry label="Original" value="0"/>
<listentry label="Regenerate" value="1"/>
</list>
<list label="Black&White:" id="O" default="1">
<listentry label="Mono" value="0"/>
<listentry label="Color" value="1"/>
</list>
<list label="SuperChip:" id="U" default="0">
<listentry label="Auto" value="0"/>
<listentry label="Off" value="1"/>
<listentry label="On" value="2"/>
</list>
<list label="Region:" id="E" default="0">
<listentry label="Auto" value="0"/>
<listentry label="NTSC" value="1"/>
<listentry label="PAL" value="2"/>
</list>
<button label="Cold Boot" action="cold_reset_hide"/>
</menu>
<menu label="Storage">
<fileselector label="Cartridge:" ext="BIN;A26;F8;F6;FE;E0;3F;F4;P2;FA;CV;2K;UA;E7;F0;32;AR" index="0" default="a2600crt.bin"/>
</menu>
<menu label="Settings">
<list label="Screen:" id="W" default="0">
<listentry label="Normal" value="0"/>
<listentry label="Wide" value="1"/>
</list>
<list label="Scanlines:" id="S" default="0">
<listentry label="None" value="0"/>
<listentry label="25%" value="1"/>
<listentry label="50%" value="2"/>
<listentry label="75%" value="3"/>
</list>
<list label="Volume:" id="A" default="2">
<listentry label="Mute" value="0"/>
<listentry label="33%" value="1"/>
<listentry label="66%" value="2"/>
<listentry label="100%" value="3"/>
</list>
<button label="Save settings" action="save"/>
</menu>
<button label="Reset" action="reset_hide"/>
</menu>
</config>
Loading