Jump to content

Search the Community

Showing results for tags 'keyboard'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Commander X16 Forums
    • Introductions
    • X16 Discussion Lounge
    • X16 Help & Support Lounge
    • Off-topic Lounge

Categories

  • Official Software
  • Official Docs
  • Community Downloads
    • Games
    • Productivity Apps
    • Graphics Apps
    • Audio Apps
    • Demos
    • Networking Apps
    • Dev Tools
    • Tutorial Apps
    • Misc Apps

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 9 results

  1. Falling Snake (C) View File Simon Snake has fallen down a hole, you must rescue him, by avoiding obstacles on his way down. Controls: Cursor Keys, for left and right. Space to start or continue the game. Falling snake was a game that I wrote on the C64 in Basic, but now converted to KickC, because I want to add more features to it, and was running on the limits of what I wanted to squeeze into Basic. All graphics, except player sprite are Petscii. "Cut Scenes", are in "Lores Double Petscii". The Basic version you can also find below as a tutorial "How to create a simple game in basic on the X16" This time the game is written in Kickc, allowing more features to be added. Current status: 90% of all Basic features have been converted to C. Extra features have been added that were easier to add in C, like "cut scenes". Sound and more game play elements are to be added still. Video below. (music added in post production) Submitter CursorKeys Submitted 05/22/21 Category Games  
  2. Version 0.8

    38 downloads

    Simon Snake has fallen down a hole, you must rescue him, by avoiding obstacles on his way down. Controls: Cursor Keys, for left and right. Space to start or continue the game. Falling snake was a game that I wrote on the C64 in Basic, but now converted to KickC, because I want to add more features to it, and was running on the limits of what I wanted to squeeze into Basic. All graphics, except player sprite are Petscii. "Cut Scenes", are in "Lores Double Petscii". The Basic version you can also find below as a tutorial "How to create a simple game in basic on the X16" This time the game is written in Kickc, allowing more features to be added. Current status: 90% of all Basic features have been converted to C. Extra features have been added that were easier to add in C, like "cut scenes". Sound and more game play elements are to be added still. Video below. (music added in post production)
  3. Tiny PCM Synth View File I wanted to explore the possibilities with the PCM output. This tiny synth generates a sweet tone from three sine waves, coated in a thin shiny silver layer of aliasing. To spice it up, I also added a delay effect. You can play it with your keyboard. Use Z and X to switch octaves. I do not plan to follow this route any further, because the possibilities are quite limited with the X16. I am sure one could do better than I did, but the X16 doesn't have enough power to provide a whole lot of flexibility in the sound generation (at least with PCM). Find the source here: https://github.com/biermanncarl/cx16-tiny-pcmsynth Feel free to reuse the code for your own projects! Submitter kliepatsch Submitted 10/18/20 Category Audio Apps  
  4. Hi everyone. I don't know where to post my thoughts, so I'll do that here. I guess guys, you have overestimated the 6502 capability to handle two PS/2 channels. The performance penalty for 6502 will be so huge that almost no other action will be possible. Additional microcontroller would be necessary to keep 6502 free from handling of 2 streams of PS/2 interrupts. PS/2 devices like keyboards and mouse are almost gone on the market ... only USB are available. So if additionally microcontroller seems to be necessary, why not to use it to handle USB keyboard/mouse ?? I'm a constructor of a new USB device called mouSTer. The website is not ready for now: http://jil.guru/mouSTer/ some information is also here: https://retrohax.net/the-mouster-project-is-here/ Getting back to the main lead ... I offer my help to integrate a reasonable USB interface for mouse/keyboard, likely based on the mouSTer adapter. I have also some comments on the layout of the prototype. If you are interested in the USB interface, please contact me. Regards willy.
  5. I created this image for converting a classic mechanical PC keyboard into an X16 keyboard. You can print it on inkjet-printable sticker paper, and cut out the stickers. It works with the "print then cut" mode on my wife's Cricut cutting plotter. BTW, Although the graphics are obviously inspired by Commodore's work, I created this image from scratch by hand-editing a PostScript file in a text editor, so there shouldn't be any copyright concerns. Edit: The image should be printed at 600dpi, with a size of 6.5" x 3.125"
  6. Hello everyone, I am in search for an easy method in assembly language to scan if a key is pressed on the X16 keyboard. I've been peering into the emulator source code and also I've been looking into the C64 best practices. I have found out that it's not so easy to get this method answered through self research and discovery/dedection. So, I've decided to ask here the forum ... Let's start with my main question! What is the main chip that is connected to the keyboard and detects the keyboard presses? I see in the ROM two methods implemented! The old C64 method and a new PS/2 keyboard method! Method 1: Is it the old C64 type of keyboard driver using the CIA chipset on ports $dc00 or ... Method 2: Is it through the new PS/2 keyboard through VIA chipset on the X16 using the via # 2 on ports $9f70, $9f71, $9f72 ... I've tried both methods, and non of them seem to work ... Let me explain each method that I tried to apply ... Note that the code is not optimal, it's trial and error code trying to figure our things ... Method 1 explanation: // Return true if there's a key waiting, return false if not unsigned char kbhit(void) { // CIA#1 Port A: keyboard matrix columns and joystick #2 char* const CIA1_PORT_A = 0xdc00; // CIA#1 Port B: keyboard matrix rows and joystick #1. char* const CIA1_PORT_B = 0xdc01; *CIA1_PORT_A = 0; return ~*CIA1_PORT_B; } Method 2 explanation: This code I've taken from the X16 emulator ROM kernal code, and I've reworked it to a kickc / kickasm source code. This code uses the VIA#2 chip of the X16 as documented, at the addresses, and this logic should fill ps2byte with the scan... Unfortunately, this does not seem to work and I really don't understand why not... char ps2byte = 0; while(!ps2byte) { kickasm(uses ps2byte) {{ jsr ps2_init jmp continue1 .var via2 =$9f70 //VIA 6522 #2 .var d2prb =via2+0 .var d2pra =via2+1 .var d2ddrb =via2+2 .var d2ddra =via2+3 .var port_ddr =d2ddrb .var port_data =d2prb .var bit_data=1 // 6522 IO port data bit mask (PA0/PB0) .var bit_clk =2 // 6522 IO port clock bit mask (PA1/PB1) // inhibit PS/2 communication on both ports ps2_init: ldx #1 // PA: keyboard jsr ps2dis dex // PB: mouse ps2dis: lda port_ddr,x ora #bit_clk+bit_data sta port_ddr,x // set CLK and DATA as output lda port_data,x and #$ff - bit_clk // CLK=0 ora #bit_data // DATA=1 sta port_data,x rts continue1: nop }} kickasm(uses ps2byte) {{ jsr ps2_receive_byte jmp continue2 //**************************************** // RECEIVE BYTE // out: A: byte (0 = none) // Z: byte available // 0: yes // 1: no // C: 0: parity OK // 1: parity error //**************************************** ps2_receive_byte: // set input, bus idle lda port_ddr,x // set CLK and DATA as input and #$ff-bit_clk-bit_data sta port_ddr,x // -> bus is idle, keyboard can start sending lda #bit_clk+bit_data //ldy #10 * mhz ldy #10 * 8 // : dey loop: dey beq lc08c bit port_data,x // bne :- // wait for CLK=0 and DATA=0 (start bit) bne loop // wait for CLK=0 and DATA=0 (start bit) lda #bit_clk lc044: bit port_data,x // wait for CLK=1 (not ready) beq lc044 ldy #9 // 9 bits including parity lc04a: bit port_data,x bne lc04a // wait for CLK=0 (ready) lda port_data,x and #bit_data cmp #bit_data ror ps2byte // save bit lda #bit_clk lc058: bit port_data,x beq lc058 // wait for CLK=1 (not ready) dey bne lc04a rol ps2byte // get parity bit into C lc061: bit port_data,x bne lc061 // wait for CLK=0 (ready) lc065: bit port_data,x beq lc065 // wait for CLK=1 (not ready) lc069: jsr ps2dis lda ps2byte php // save parity //lc07c: lsr a // calculate parity lc07c: lsr // calculate parity bcc lc080 iny lc080: cmp #0 bne lc07c tya plp // transmitted parity adc #1 // lsr a // C=0: parity OK lsr // C=0: parity OK lda ps2byte ldy #1 // Z=0 rts lc08c: jsr ps2dis clc lda #0 // Z=1 rts continue2: nop }} printf( "ps2byte = %x\n", ps2byte ); } Who can help here? Sven
  7. Version 1.0.0

    31 downloads

    I wanted to explore the possibilities with the PCM output. This tiny synth generates a sweet tone from three sine waves, coated in a thin shiny silver layer of aliasing. To spice it up, I also added a delay effect. You can play it with your keyboard. Use Z and X to switch octaves. I do not plan to follow this route any further, because the possibilities are quite limited with the X16. I am sure one could do better than I did, but the X16 doesn't have enough power to provide a whole lot of flexibility in the sound generation (at least with PCM). Find the source here: https://github.com/biermanncarl/cx16-tiny-pcmsynth Feel free to reuse the code for your own projects!
  8. Hi everyone, in my current project, I would like to detect key releases, or at the very least if any keys are pressed, at all. The usual GETIN only returns a nonzero value one single time during a key press (except the repeated ones when the key is held down for a longer time). It doesn't provide any precise information on HOW LONG the key is held down. Are you aware of any possibilities to get more precise (and possibly more low-level) data from the keyboard? Thanks in advance. Edit I've found this thread where they mention, that keyboard input is handled by the NMI handler. Since both the ISR vector, and the routine itself are in ROM, there is no way to get the actual data from the keyboard (without modifying the ROM). I really think that the X16 would greatly benefit from a more exposed keyboard interface.
  9. Just a thought I've had: I'm currently developing on Windows 10, and if I were either a contributor to a github project or using modern tools, I'd benefit from access to the X16's PETSCII Keyboard plugged into the computer while coding or developing. Would this be possible under the current design? Would it require special drivers or application? I believe a lot of hardship can be eliminated by allowing the keyboard to work on modern systems in any case. And with less hardship, more software. Example: Plug in the X16's Keyboard into my W10 System <Punch The Keys, For Gods' Sake!> Get PETSCII Characters just like I would natively.
×
×
  • Create New...

Important Information

Please review our Terms of Use