65816 Assembly Coding Series

Updated: Apr 28

As I'm learning and implementing assembly code for my 65816 PC, I'll post periodic updates here. I'm doing OK with the assembly so far, and I have plenty to learn! If you see errors that I'm making, or have suggestions for improvement, please drop me a note! Thanks!


As I become comfortable with different modules of the code, I will post code to rehsd/PC-65816: PC based on 65816 (github.com).


#01: Keyboard input and drawing screen text

In this video, I am testing my PS/2 input and outputting text to both the LCD add-in card and my video card (320x240).

Two issues that I have identified as part of this video:

  1. I see an out-of-place pixel in the far upper-left corner of the screen. My guess is that it's due to a coding issue.

  2. When I first power on the system, it is somehow retaining the last character I typed prior to turning off the system. Weird, but I need to dig into it.

#02: Mouse input, drawing lines, and filling rectangles

In this video, I am testing my USB mouse add-in card and outputting free-form lines and filled rectangles.

The primary issue for me to work on from the video above is improving the interpretation of the mouse data to have it feel "smoother." You'll notice the mouse gravitates to moving in diagonal paths. I believe I can adjust this. I will also implement code so that the left button toggles drawing on/off.


Also, on reset I draw a pixel in the center of the screen; that one is supposed to be there. After I reset in the video, I notice a stray pixel (down and left of the center pixel). This is likely from dual-port RAM concurrent access.


#03: Mouse cursor, drawing, and start of "start" menu

The left mouse button now toggles drawing. I have a single-point mouse cursor. I have also started a "start" menu.

#04: VIA tester

Using my VIA tester add-in card, I put together a 65816 program to perform automated testing of VIAs.



More to come!



Running Issues List

  1. Pixel in upper-left corner.

  2. Ghost key input on cold boot.

  3. ...

101 views0 comments