Can a 6502 computer control a Raspberry Pi?
HTML-код
- Опубликовано: 20 июл 2024
- In this video we go through the missing parts of our 6502 SSD1306 OLED driver library, how talking to serial terminals work and how to control a Raspberry Pi Zero W using the 65uino.
Come join the free clubhouse on Discord: / discord
Join me on Discord and let's chat about what you like best about old chips, electronics, breadboards and hacking all sorts of things!
You can find the full project description on hackaday.io/project/190260-65...
Source code and hardware files: github.com/AndersBNielsen/65uino
Mentions
en.wikipedia.org/wiki/Control...
en.wikipedia.org/wiki/ANSI_es...
These are my most popular videos:
• A 6502 Based Computer ...
• A 6502 Single Board Co...
• Microsoft BASIC from 1...
Chapters
00:00 Welcome
00:18 Recap
01:41 Intermission
01:57 What's in this video?
02:36 Managing cursor position
03:53 X & Y in a single byte of memory
05:03 Newline handler code
06:58 Setline subroutine
08:48 Testing newline on the hardware
09:43 Uploading code via serial
09:56 Newline vs carriage return demo
11:39 Setting the column
12:33 Semi-automatic code upload - SOH byte
14:04 Debugging character position
16:33 Debugging the setcolumn routine
17:26 Hands free automatic code upload
17:42 Re-hacking some ROMs
18:40 More debugging of setcolumn
21:33 Cursor setting test
21:54 Intercepting serial characters
22:33 The $0A that turned into $0D
23:15 STTY - Set TeleTYpe
23:45 Gone fishing...
24:24 Re-debugging setline
25:27 Debugging i2c
26:15 Does it work?
26:48 Control character codes
28:35 Backspace handler code
31:29 Ctrl+C handler
31:38 Skipping ANSI and VT-100..
32:31 Wait, what's the point of all this?
32:41 Controlling a Raspberry Pi
33:59 Breadboarding
35:22 Booting...
36:43 Removing serial echo
37:51 A better boot
37:58 Writing the login code
39:10 Logging in
39:38 Sending commands
40:23 Permission denied
40:29 $sudo poweroff
41:00 Join the free clubhouse on Discord
41:18 Thanks for watching!
Credits
Video by cottonbro studio: www.pexels.com/video/shallow-... Наука
I don't know whether writing 65duino VT100 escape codes would be harder or easier than to get the linux in the RPi0 to use VT52 codes in its tty, but if you could the RPi0 to use VT52, VT52 escape codes would be a lot easier to program in the 65duino. ESC A ESC B ESC C ESC D for the for cursor directions, ESC H to home to the top left corner, ESC I to reverse linefeed, ESC J to clear to the end of screen, ESC K to clear to the end of line, and ESC Y r c to set the cursor to the "r" row and "c" column.
Sadly it looks like VT100 codes are mostly baked in, in a lot of Linux things by now. I wonder if @Usagielectric's Centurion minicomputer, for instance, has some way of switching between the two. VT52 sure looks a lot more friendly - but the world moved on too soon I guess.
@@AndersNielsenAA It's linux, so they shouldn't be, programs should use ncurses and the defined termcap. Look in /lib/terminfo/ to see if there is a vt52. If there is, TERM=vt52 would shift from the default to VT52.
@@AndersNielsenAA The baked in problem would be more on the Builder side than the OS side, with a lot of people doing things by tinkering not knowing about terminfo and ncurses and hard-coding VT100 (or VT220). But if a VT52 entry is added to the terminfo library, the operating system should talk VT52 just fine.
I’ll have to take a look what’s available in Raspbian. Easier to flip a switch and handle VT52 for sure.
By the look of it it’ll also make VT100 look better than no handling at all.
It didn’t look too carefully but it doesn’t look like the kernel outputs many control codes.. if any.
Nice video, thanks. Clear screen used to use the form feed char (0x0C) on many pre VT100 terminals. It effectively throws a new page so starting again with a clear screen. Ctl C indicates end of transmission (ETX) so not really a good choice as you probably want to read the transmission before clearing it. You could drop the baud rate to 1200 baud or even slower to help with the buffer overruns.
You are absolutely right - I rushed on instead of picking an appropriate character. I'll fix it so CTRL+L(FF) does the clear screen in the future. I would also like to add a way to drop the baud rate on the fly. Dropping it all the way to 1200b might be enough that we can just print the character during the stop bit - which might mean we don't need the buffer.
So what did you think of this video? Post a comment below so I know you came from this video and then join me over on the free Discord server!
Discord invite link: discord.gg/kmhbxAjQc3
I have done the opposite process : A raspberry PI controls an old Atari 2600 :)
That might be slightly more useful too :)
On my Mac, stty -a shows the onlcr setting configured like yours. I've never done anything to change these settings.
Thank you. I think I had myself confused - but not enough to test it out on another Mac or Linux VM.
Watching this you can definitely see how nice it would be to emulate a ROM with a Pico or something until final ROM programming is completed :-) Pins falling off.. lots of swapping.. I've broken a couple of ROMs doing this myself. Looks like a lot of fun playing with these I2C devices
It's absolutely on the to try list :)