Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Al_Nafuur

#1
here is a small schematics how to connect.



I have only tested with a PAL system. I can post the binary, if someone is interested to test with a NTSC system.

Caution: the schematics is "from" the 2600, so pin 1 and 2 are PA0 and PA1. Pin 7 is +5V and is used as pull-up via the 10K resistor for PA0
#2
just because we can 8) , or maybe we can use this to flash a Arduino based board like the KeyPortari?


; NTSC 1.190.476 Hz ≈ 0,840 µs per CPU cycle
; PAL 1.179.000 Hz ≈ 0,849 µs per CPU cycle
; 115.200 baud is ~8,68056μs per bit (=10,225 PAL CPU cycles or 10,334 NTSC CPU cycles )

    lda #%00000001 ; Set our TX to output
    sta SWACNT
    lda #$ff
    sta SWCHA

    sta WSYNC

    ldx #0
    ldy #1

byte_loop
    lda #0          ; 2
    sta SWCHA       ; 4 @00 : Start-bit (low))
;    ldy #7          ; 2
    lda data_uart,x ; 4

;bit_loop
;    sta SWCHA       ; 4 @10 : Bit 0-7
;    ror             ; 2
;    dey             ; 2
;    bpl bit_loop    ; 2/3

;bit_loop enrolled!
    SLEEP 2         ; 2
    sta SWCHA       ; 4 @10 : Bit 0 (@ 10,225)

    SLEEP 4         ; 4
    ror             ; 2
    sta SWCHA       ; 4 @20 : Bit 1 (@ 20,45)

    SLEEP 5         ; 5
    ror             ; 2
    sta SWCHA       ; 4 @31 : Bit 2 (@ 30,675)

    SLEEP 4         ; 4
    ror             ; 2
    sta SWCHA       ; 4 @41 : Bit 3 (@ 40,9)

    SLEEP 4         ; 4
    ror             ; 2
    sta SWCHA       ; 4 @51 : Bit 4 (@ 51,125)

    SLEEP 4         ; 4
    ror             ; 2
    sta SWCHA       ; 4 @61 : Bit 5 (@ 61,35)

    SLEEP 5         ; 5
    ror             ; 2
    sta SWCHA       ; 4 @72 : Bit 6 (@ 71,575)

    SLEEP 4         ; 4
    ror             ; 2
    sta SWCHA       ; 4 @82 : Bit 7 (@ 81,8)

    SLEEP 6         ; 6
; end of enrolled bit_loop!

    sty SWCHA       ; 4 @92 : Stop-bit high (@ 92,025) (y=0xff)

    ; idle (TX high) time can be longer than 10 cycles
    SLEEP 2

    inx
    bne byte_loop

    ALIGN 256
data_uart
    .byte "Hello UART World"
    .byte 13, "Hello World 002"
    .byte 13, "Hello World 003"
    .byte 13, "Hello World 004"
    .byte 13, "Hello World 005"
    .byte 13, "Hello World 006"
    .byte 13, "Hello World 007"
    .byte 13, "Hello World 008"
    .byte 13, "Hello World 009"
    .byte 13, "Hello World 00A"
    .byte 13, "Hello World 00B"
    .byte 13, "Hello World 00C"
    .byte 13, "Hello World 00D"
    .byte 13, "Hello World 00E"
    .byte 13, "Hello World 00F"
    .byte 13, "Hello World 010"

result on the PC Serial-Monitor


 
#3
KeyPortari – First Prototype PCBs Now in Production! 

I'm happy to share that the first prototype run of my project KeyPortari is now officially in production! 🎉
Thanks to generous support from JLCPCB, we've produced 15 partially assembled test boards, which will be ready for hands-on testing in about 2 to 3 weeks.

📦 GitHub repository (code, schematics, layout, etc.):
🔗 https://github.com/Al-Nafuur/Keyboard-2600

💡 Looking for testers and developers!
If you're interested in experimenting, writing code, or helping test the hardware, feel free to reach out to me directly. I'd be happy to provide you with a test board - while supplies last!

Excited to see what we can build together.
#4
Routing is done. The current state of the KiCad (8.0) project is pushed to the Git repository
https://github.com/Al-Nafuur/Keyboard-2600

#5
On the other hand..

I just checked the size of the Raspberry Pi 4/5 and accidental my current board is nearly the same size..

There are a lot of Pi cases out there, but I am not sure we can make them fit with our connectors..

#6
Quote from: Andrew Davie on 16 Apr 2025, 02:24 PMA nice 3D case would be pretty cool!  Top work!
Initial I also thought of an 3D case as they only option to encase the device. But as I started finishing the routing and positioning of the parts it occurred to me that a when I switch to a "standard" size for the PCB, people can also use standard cases for enclosing.


6*8 cm would be the next bigger size to choose. But it would need some rearrangments of the parts for the mounting holes.

#7
3D render of the PCB:
#9
i'm not good at formulating texts in either german or english. That's why i've been using AI for that lately. But what I don't like about AI is it's tendency to repeat things. This can also be seen in the two chapters you have posted..
#10
I'm thrilled to introduce a new project I've been working on: an Atari 2600 Keyboard and Joystick Interface! This project aims to bring keyboard input to the Atari 2600 while allowing parallel connection of joysticks and other input devices, opening up exciting possibilities for games, utilities, and creative experiments. I've already discussed the idea with Thomas Jentzsch, who has been incredibly helpful in getting this project off the ground by contributing some great ideas for the protocol. Now, I'm looking for testers, developers, and feedback to help bring this project to life.
Project Overview
The goal is to create a hardware interface that allows a PS/2 or USB keyboard and other input devices like joysticks and paddles to be connected to the Atari 2600 in parallel. This interface will enable developers to create games and applications that use both keyboard and joystick input simultaneously. Here are some key features:
  • Keyboard Support: The board will include a PS/2 and a USB connector, but only USB keyboards that support the PS/2 protocol over USB will work (most keyboards should do, but I haven't tested).
  • Parallel Connection of Input Devices: You can connect joysticks, paddles and keypads in parallel with the keyboard, allowing for versatile input options.
  • No PlusCart Required: This project is designed to work with a normal ROM cartridge, so you don't need a PlusCart to use it.
  • Free Test Boards: Thanks to a JLCPCB sponsorship, we will have some free boards available for testers and developers involved in the project!
One Limitation
  • SaveKey and AtariVox Compatibility: Unfortunately, the SaveKey and AtariVox and other devices that need the RIOT in output mode will most likely not work with this interface due to hardware and protocol conflicts. This is something to keep in mind for developers and users.
How It Works
The project is built around an ATmega328P microcontroller that manages communication between the joysticks, keyboard, and the Atari 2600's RIOT (6532) chip. Here's a breakdown of the system:
  • ATmega328P and Bus Transceiver:
    • The ATmega328P controls the communication between the joysticks and the RIOT via an 8-bit bus transceiver (SN74LVC245AN).
    • The SN74LVC245AN acts as a bidirectional buffer, allowing the ATmega328P to selectively "block" or "enable" the joysticks and keyboard.
  • Direct TIA Connections:
    • The TIA connections on the Atari 2600 joystick ports (e.g., trigger buttons and paddle potentiometers) are wired directly to the joystick ports of the device. These connections are not controlled by the ATmega328P and remain active at all times.
  • Keyboard Input Handling:
    • When a key on the keyboard is pressed, the ATmega328P:
      • Blocks the joysticks by disabling their communication with the RIOT.
      • Sets the RIOT's data bus to the corresponding keycode value (8-bit, allowing for 255 different keys; $ff represents "no key pressed").
    • When the key is released, the ATmega328P:
      • Disconnects itself from the data bus.
      • Re-enables the joysticks, allowing them to communicate with the RIOT again.
  • Reading Keycodes on the 2600:
    • On the Atari 2600 side, reading the keycode is as simple as reading the RIOT's SWCHA register.
    • Here's an example of the code used to handle key presses in my demo:
   lda SWCHA         ; Load the value from SWCHA (keyboard input)
   cmp #$ff          ; Compare to $FF (no key pressed)
   beq skipNewChar   ; If no key is pressed, skip
   cmp last_char     ; Compare to the last key pressed
   beq skipNewChar   ; If the key hasn't changed, skip
   ldx ActiveChar    ; Load the index for the active character
   sta w000,x        ; Store the keycode in memory
   inx               ; Increment the index
   stx ActiveChar    ; Store the updated index
skipNewChar
   sta last_char     ; Store the current keycode as the last key pressed



 
  • In this example, the keycode sent by the ATmega328P directly corresponds to the value needed by the 24-character display kernel I'm using. This simplifies the process of displaying characters on the screen.
  • Future Protocol Improvements:
    • The current implementation uses a simple keycode system, but we're open to exploring other protocols in the future, such as:
      • ASCII: For better compatibility with text-based applications.
      • Real PS/2 Keycodes: To support a wider range of keyboards and key combinations.
      • Custom Protocol: To allow simultaneous use of keyboard and joystick inputs (e.g., using arrow keys as joystick directions).
Things to Discuss and To-Do
There are still some open questions and decisions to make, and I'd love your input:
Protocol
  • Should we use ASCII, keycodes, or a custom protocol to allow simultaneous use of the keyboard and joystick in the same kernel?
    • For example, could we use the arrow keys as a joystick? (Diagonals are still unclear.)
    • We'll need to decide which ASCII codes to omit to avoid conflicts with joystick inputs.
Hardware
  • Keyboard Layout Selection: Should this be done via DIP switches on the board or configured in the 2600 software?
  • Power Supply: Should the keyboard have a separate power supply, or can it share power with the Atari 2600?
  • Capacitors: Do we need additional capacitors for the SN74LVC245AN buffer to ensure stable operation?
Miscellaneous
  • Project Name: We need a cool name for the project/board! Any suggestions?
 
How You Can Help
  • Testers: If you're interested in testing the hardware and providing feedback, let me know!
  • Developers: If you're a developer interested in creating software (games, utilities, etc.) for this interface, your input will be invaluable.
  • Feedback: Share your thoughts on the protocol, hardware design, and any other ideas you have.
 
Next Steps
  • I'll be finalizing the hardware design and ordering test boards soon.
  • Once the boards are ready, I'll distribute them to testers and developers.
  • We'll work together to refine the design and create some awesome software for the Atari 2600!
 
 
YouTube Videos




#11
Is there example code for a ChronoColour/Interleaved Playfield?

I found this here:
https://www.randomterrain.com/atari-2600-memories-tutorial-andrew-davie-20.html 

but I am not sure if it is single or multi colour
#12
General Discussion / Re: Sony PVM-4300
09 Jan 2025, 09:39 AM
First time I heard of CRT Cataracts was on Adrian Black's channel. He has a really worse case of this:
#13
Quote from: alex_79 on 02 Dec 2024, 02:48 AMBTW, anyone has any great gameplay idea that makes use this new "rotary" controller? ;D
maybe with your dc26 kernel. The 2600 gives a Number to reach, but also selects for you the digit sequence (most digits twice or three times) to enter. You always have to add 1-10 to the selected digit.
#14
General Discussion / Re: Retiring
08 Nov 2024, 02:27 AM
Hi Andrew,

I just wanted to take a moment to thank you deeply for the invaluable contributions you made to the PlusCart project. Your expertise and creativity truly elevated the project, and I am grateful to have had the chance to work alongside you. The optimized text display in the menu and the stunning 3D case design you created are testaments to your skill and dedication to the Atari 2600 platform.

I am a regular visitor to your forum and noticed that, while you were still around, you hadn't been posting over the past months. I had a feeling that this day might come, but it's still bittersweet to hear of your decision to step back. While I fully respect and understand your reasons, it's hard to imagine the Atari scene without you. Your passion and generosity in sharing your knowledge have been an inspiration to so many, myself included. You've made an impact on this platform and on everyone who's had the pleasure of learning from or working with you.

Thank you again for everything, Andrew. I wish you all the best in whatever comes next and hope our paths might cross again in the future.

Regards,
Wolfgang
#15
Here's the video of my talk about the PlusCart.