-
Hack Chat Transcript, Page 1
04/03/2024 at 20:44 • 0 commentsAnders Nielsen 3:00 PMThanks Dan! Hello everyone! Super excited to answer any questions. Really been itching to jump in ahead of time By day, I'm the MacAdmin at Aalborg University, Denmark, handling about 1000 Macs. In my free time I like to play with old and new IC's and to get as much as possible out of as little as possible - most fun per transistor or most fun pr $ are favorites of mine. I've played with electronics since 2014.. or since early childhood if disassembling anything with a battery counts.. I made my first 6502 computer in 2021, followed it up with an entry for the 2022 Hackaday Prize, and was super happy the to see that go to the semifinals. Since then I've made the 65uino, which is a lot easier to manufacture and put together, but has it's own limitations - like the 8K address space and 128 bytes of RAM. Like an Atari 2600. And I almost have a PCB ready for a super super cheap (E(E))PROM programmer.Anders Nielsen 3:00 PMOh - and I have a small Youtube channel where I try to explain most of the things I make, so it's easier for other people to replicate.Anders Nielsen 3:01 PMBut ask away - I'm not an expert on any of it though.. Except my day job.Dan Maloney 3:02 PMWas the 6502 a nostalgia play for you? IOW, did the chip feature in any of the machines of your younger days?Anders Nielsen 3:03 PMAbsolutely. When I was a kid in the 90s I had a C64 but I didn't have any of the knowledge to actually use it for anything but games.wheagy 3:03 PMDo you ultimately expect this to be a drop-in replacement in machines like the Apple II?Anders Nielsen 3:04 PMThe Apple II should accept mostly any old NMOS 6502 I believe?Andy Geppert 3:06 PMThe 65uino is awesome and very inspiring. Thanks for imagining and making it available! I think 65uino Mega is a good name for a future version which adds more memory, a full 6502 maybe some ADCs… ;) and a cartridge slot…Anders Nielsen 3:06 PMThe waste stream I refer to is slightly abstract. Millions of Atari 2600's have already been recycled and I have a feeling there's still piles of boards in a container somewhere. If we buy those from the usual markets, we encourage the scrappers to save the chips instead of just melting them down.Anders Nielsen 3:06 PM@Andy Geppert Someone on Twit.. I mean X.. Suggested a 68Kuino :DAndy Geppert 3:07 PMOh, and thanks for making the bootloader and dev work flow to go with it!Andy Geppert 3:07 PMOh yes, 68Kuino needs to be done too!Dan Maloney 3:08 PMOne vote for the 1802uino too. Probably the only one :-(Eric Hertz 3:08 PMWhat language do you most-use for 6502 programming?jdanen 3:09 PM@Eric Hertz - cool site, but there's an ocean in the way, shipping might get expensive :p @Anders Nielsen - ah, so basically picking the chips out by the invisible hand of the market, not a half bad ideaAnders Nielsen 3:09 PMI try to explain most pieces of tech and code I use in my videos - but lemme tell you.. Editing video of 6502 assembly code and making it interesting is tough.Anders Nielsen 3:10 PM@Eric Hertz I'm slightly interested in that "phone" too :DAnders Nielsen 3:10 PMI mostly just go with 6502 assembly - cc65 does a decent job with C i head, but I haven't played with it much.Jacob Christ 3:11 PMIt so easy to assemble by hand, why do you even use an assembler?Eric Hertz 3:12 PMLOL use toggle switches!Mitsuru Yamada 3:12 PMIn my case, it is my homebrew floating point interpreter (7kB) or hand assembly.Anders Nielsen 3:12 PM@Jacob - almost getting there :) Actually want to build one like @Mitsuru's - but RAM only :D I have something to show you @Dan Maloney ...Andy Geppert 3:13 PM@Jacob Christ LOL. Reminds me of graph paper and a mechanical pencil to organize the bytes.. Ah, memories. I’m anxious to get back into 6502 assembly.Jacob Christ 3:14 PM@Mitsuru Yamada Nice builds!Mitsuru Yamada 3:14 PMI think 6502 is suitable for easy to creating machine language programs because of its small number of instructions.Xark 3:14 PMllvm-mos is an interesting C/C++ (and even Rust) compiler for 6602 also, but 6502 is a bit "resistant" to higher level code. 🙂 https://github.com/llvm-mos/llvm-mos-sdkAnders Nielsen 3:15 PMMitsuru Yamada 3:16 PMI used to run a C compiler on APPLE2, but I had to change floppies many times to compile it.Anders Nielsen 3:16 PM@Dan Maloney I'm not sure if I'll get to it before or after or in parallel with the 8051 - but I'm getting thereDan Maloney 3:16 PM:heart emoji:Dan Maloney 3:18 PMI'd honestly love to build a replica of the COSMAC VIP I had way back when. No idea where it went. Must have cost my parents a fortuneDrG 3:18 PMAnders / Mitsura - do either of you have any stories or experiences with the 6501 [six five zero one]?Anders Nielsen 3:18 PMOh how I wish I had an Apple II to be frustrated with floppies aboutAnders Nielsen 3:19 PM@DrG As far as I know it barely existed. MOS created it as a gimmick to show it could be done cheaper but everyone was supposed to want the 6502 for the builtin oscillator driverAnders Nielsen 3:20 PMYou'll notice the programming manual is actually called the MSC6500 Family Programming manualXark 3:20 PMI read it never actually shipped.Xark 3:21 PM6507! 😅Anders Nielsen 3:21 PMFrom what I've head they did bring it to WESCON but after that, not so much.CJ Keithley 3:21 PMI quite enjoyed the Rockwell R6501Q… quip (quad in-line package)Anders Nielsen 3:22 PMI wish the 6504 was easier to get my hands on. It should also be compatible with the #65uino if you have one of those.CJ Keithley 3:23 PMRockwell also made a 68000 quip… they must have sold hundreds of those! :-)Xark 3:23 PM6501Q....cool, I have not heard of those before.Mitsuru Yamada 3:24 PMIn my experiments, the built-in oscillator did not have a good duty cycle.Pete Willard 3:24 PMQuad Inline is such an odd bird... and kind of a nightmareCJ Keithley 3:24 PMThe R6501Q had (in a single chip) a 6502 variant, (a little bit of) RAM, parallel IO, and a serial port.Pete Willard 3:24 PMMC6800 also has some weird clock requirements, for comparison.Jacob Christ 3:26 PMSo when I was learning 6502 assembly on an Apple II there was program that let you visualize an assembly program running that ran on an Apple II. It would show data moving from memory into registers and the registers feeding the ALU and to the accumulator then back to memory again. It was a great visualization tool. I'm wondering if others have seen it, knows what its called and know if there is a web page based equivalent that exists?CJ Keithley 3:26 PMhttps://web.archive.org/web/20221102041722if_/http://archive.6502.org/datasheets/rockwell_r6501q.pdfAnders Nielsen 3:26 PM@Mitsuru Yamada Exactly. It's there but everyone is better off generating the clock elsewhere.Andy Geppert 3:27 PM@Anders Nielsen What tricks have stood out to you as you use 6502 assembly to do fast pulses/timing stuff? I know some of them are in your video about driving serially addressable LEDs. Curious where you bump into timing limitations between 6502 and the modern area, and what tricks you use to bridge to more modern ‘tronics.Xark 3:27 PM@Jacob Christ Perhaps https://www.youtube.com/watch?v=aZvss4XnceU ?Anders Nielsen 3:27 PM@Pete Willard The big difference was the 6800 required you to input both phase clocks yourselfDrG 3:28 PMDrG 3:28 PMMy first computer - still have it and it still works (it is a rev b)Pete Willard 3:28 PMYup, it did... and therefore... excess glue logic outside the CPUXark 3:28 PMNice!Anders Nielsen 3:29 PM@Andy Geppert I lean a lot on cool people like George Foot, Garth Wilson and good folks over at forum.6502.orgAndy Geppert 3:29 PM@DrG That is SOOO on my shopping list.Jacob Christ 3:29 PM@Xark That's exactly the program!Andy Geppert 3:30 PMOh, I recognize the Garth Wilson name - he has shared so many great resources.Pete Willard 3:30 PMCool. Mine was an MEK6800... Still have it.Anders Nielsen 3:30 PMTiming can usually be fixed with a 74'74 and a gate if it's that bad - usually I try to avoid the edge cases. Driving ws2812's was one of those XDAnders Nielsen 3:30 PM@DrG Wow. Hang on to that one!Mitsuru Yamada 3:32 PMAs for the difficulty with the 6800 clock, I solved it with the 6802, which can generate a stable clock using only an external crystal.Andy Geppert 3:33 PMI recently learned of, and purchased, and EMMA II which is a 6502 microprocessor trainer. Very similar to the KIM, but not a KIM. Anyone else here know about the EMMA II or have experience with one? I’m a 6502 enthusiast and I was surprised to learn about it recently. Apparently more popular in Europe, and I’m in the US.Anders Nielsen 3:34 PM@Mitsuru Yamada I see it was released in '76.. Wasn't that the reason MOS counter sued Motorola? :DPete Willard 3:35 PMWhile the 6802 got a lot of things right, it still could not touch a 6502 in terms of price...Xark 3:35 PMI never heard of EMMA II, but pic from 6502.org (looks pretty nice). http://forum.6502.org/download/file.php?id=288&sid=30b5fe24dca784d18184aa56102bde21&mode=viewAnders Nielsen 3:36 PM@Andy Geppert Hans Otten to the rescue: http://retro.hansotten.nl/6502-sbc/emma-by-l-j-technical-systems/Andy Geppert 3:36 PMIt was sold with several mechatronic accessories and training manuals, originally, intended for tech/trade school use. From my understanding.Anders Nielsen 3:36 PM@Andy Geppert So someone made a remake?Andy Geppert 3:37 PMNo, it’s an original. I purchased at a VCF. Costed much less than a KIM!DrG 3:37 PMDrG 3:37 PM+1 on the importance of 6502 price.Andy Geppert 3:38 PMThanks for the Hans link.Anders Nielsen 3:38 PMWe have way too few VCF's in Denmark :DAndy Geppert 3:41 PMWell, VCF is growing in the US right now and there are some people that would happy to help enable growth in Denmark with their experience! VCF does an amazing job of filling the niche. -
Hack Chat Transcript, Page 2
04/03/2024 at 20:44 • 0 commentsAnders Nielsen 3:42 PMPot stirring time. The 65C02. I might sound like I have strong opinions about it sometimes... But.. I just feel it came around at a point where it was just "another micro".Anders Nielsen 3:43 PMAm I right the Rockwell C02's are pin compatible but the WDC's are not?Mitsuru Yamada 3:45 PMThe 65C02 surprised me at the time with its low power consumption.J.B. Langston 3:45 PMyeah, the wdc is not pin compatible but can be made so with a few simple mods https://kerosmacmods.fc2.net/blog-entry-12.htmlAnders Nielsen 3:45 PMFor my "bigger" #ABN6502 SBC R1, I had to add jumpers for the WDC but I believe a lot of relabelled ones that turned out to be C02's actually works without the jumpering.J.B. Langston 3:46 PMi have put one in my apple IIe that came with an original 6502 and it worked, though i later purchased an enhancement kit from reactive micro which came with a rockwell 65c and the updated romsXark 3:47 PMFrom my understanding PIN 1 is slightly different in WDC 65C02 (it is an input and output so needs a resistor or similar). 🤔Anders Nielsen 3:47 PM@Mitsuru Yamada I have a USB cable that changes color with current - I spot a lot of "fake" 6502's from the unexpected power usage. Could also be bad silicon of course. It's fun when a 65C02 is labelled MOS6502A in super clear paint.Pete Willard 3:48 PMI've not imagined that there would be a benefit to updating the 6502 in my IICAnders Nielsen 3:48 PM@Xark Pin 1 is GND so a resistor won't do :)J.B. Langston 3:48 PMsome later software only worked with enhanced IIe... i think the IIc already came with the cmos chipXark 3:48 PMOkay, never mind me, but some info here: https://www.westerndesigncenter.com/wdc/AN-002_W65C02S_Replacements.phpJ.B. Langston 3:49 PMyeah you have to clip pin 1 off and tie bus enable highAnders Nielsen 3:49 PMAnders Nielsen 3:49 PMGood chart!Pete Willard 3:49 PMBTW JB, thanks for the TMS9918 board for the RC2014...J.B. Langston 3:50 PMoh, my reputation preceeds me ;)Mitsuru Yamada 3:50 PMRegarding the subtle differences between the 6502 and 65C02, in my experiments, when I replaced the 6502 and 65C02 on my own computer board, the number of clocks from reset to the first instruction execution seemed to be different.DrG 3:51 PMDid all those C varieties maintain the bugs in the 6502?Xark 3:51 PMYes, clock timing is indeed different on 65c02. It has an extra cycle on some instructions, e.g.J.B. Langston 3:51 PMno the C got rid of all the undocumented instructions and replaced them with NOPsPete Willard 3:51 PMGeez. I never knew thatJ.B. Langston 3:52 PMalso added a few other instructionsAnders Nielsen 3:52 PMOr "new and interesting" instructions. Like STX, STY,J.B. Langston 3:52 PMthere's a load zero iirc nowAnders Nielsen 3:52 PMI mean PHXXark 3:52 PMYes, fixed (most of) the bugs. In fact one of the extra cycles added was to correct JMP ($xxFF) bug.Xark 3:53 PMSeveral very welcome new opcodes and some semi-useful new addressing modes.Xark 3:54 PMMost useful IMHO are as mentioned PHY/PLY/PHX/PLX, but also INC and DEC of A is handy, along with BIT #$XX and the new ($XX) addressing mode can sometimes be handy to not need to load Y with 0.Anders Nielsen 3:56 PMI always find it interesting to check the ones I get. You'd be surprised.. Well you might not.. Some might be surprised to find how many 6502's "fail" the BRA test.Xark 3:56 PMNice rundown of the improvements (and examples of use): http://www.6502.org/tutorials/65c02opcodes.htmlJ.B. Langston 3:56 PMi admit ignorance on most of the new opcodes... most of my interest in the 6502 is in the c64 demoscene so there's no C in that 6502 code :)J.B. Langston 3:57 PMand also, i've since gone to the dark side and i'm a much better Z80 programmer than I ever was at 6502Mitsuru Yamada 3:57 PMWhat I think is wrong with the 6502 in terms of readability is the lack of BRA, but with the 65C02, it is there.J.B. Langston 3:58 PMyeah people would just do clc, bcc, or if they were very clever they'd rely on a flag already being set or cleared by the previous instruction and use the appropriate branch when they wanted relative jumpsXark 3:58 PM@Mitsuru Yamada Yes, BRA is super welcome too.DrG 3:59 PMI personally remember stepping through code and being stymied by "An indirect JMP (xxFF) will fail because the MSB will be fetched from address xx00 instead of page xx+1. " It made my brain hurt. Then some *real* programmers told me, "oh yeah, that's a 6502 bug". ugh...good timesXark 4:00 PMI remember using it in "copy protection" (along with other tricks) to try to obfuscate the trail (but it was fairly well known).DrG 4:00 PMlol sweetAnders Nielsen 4:01 PMIf I tell people to go out and buy a 65C02 and it turns out they get the "wrong" 65C02, things get frustrating fast. I have to admit I sometimes CLC, BCC but usually I have a flag available.Xark 4:03 PMWDC65C02 is nice because it is still made and available from suppliers (and ~14MHz).J.B. Langston 4:04 PMsupermon64 used a very clever method to get relocatable code with regular jumps: https://github.com/jblang/supermon64J.B. Langston 4:04 PMdiscussed in the paragraphs right above the usage instructionsJ.B. Langston 4:05 PMthere is a quote from jim butterfield explaining how it workedAnders Nielsen 4:05 PMThere are plenty of cases where you need a factory new with warranty chip so I certainly appreciate it exists.asciimo 4:05 PMWhat's a reliable source for real 6502s?Anders Nielsen 4:05 PMTruth: AliexpressDrG 4:06 PM@J.B. Langston I remember going through KIM cassette format and thinking - wow, neat. Then I read Butterfield's hypertape and went - WoWXark 4:06 PMApparently not too difficult to find pulls and such. Beware remarked parts...(e.g., 2+MHz may not really be...).Anders Nielsen 4:07 PMThe 6507's I sell with the 65uino kits, I painfully have to test each and every one of them. And it seems they are rebadged to say whatever I order - but otherwise come from the same pile. Especially the 6532's.J.B. Langston 4:07 PMi have had decent luck buying used chips on ebay, but it's been a few yearsJ.B. Langston 4:08 PMall of the TMS9918, SN76489, and YM2149 chips I bought turned out to be genuine. have never tried to get a 6502Anders Nielsen 4:08 PMUsually I can tell the actual manufacturer from the markings on the bottom.Dan Maloney 4:09 PMOK, sorry to break up the party but our time is up. I want to thank Anders for his time today and all of you for the excellent discussion. And everyone needs to start collecting those chips!asciimo 4:09 PMAwesome chat. Thanks!DrG 4:09 PMThanks Anders and thanks Dan for hostingXark 4:10 PMhttps://linuxjedi.co.uk/2023/12/01/fake-chips-i-got-stung/ might be usefulAnders Nielsen 4:10 PMA lot of people assume that relabelled == fake, but that's obviously not the case. Worst case it's a different chip, but usually it's just to make the labelling uniform :D Oh - and at the end: Read ALL Don Lancaster's books. Thanks for having me!Xark 4:10 PMThanks! 🙏Anders Nielsen 4:10 PM@Dan Maloney Thanks for the invite!Dan Maloney 4:10 PMMy pleasure! Transcript coming up. Thanks all!Mitsuru Yamada 4:11 PMThanks! from Mitsuru Yamada in Japan.DrG 4:14 PMI confess that chats like these make me wonder where all the excitement of the times went....It's weird being the same age as old people :)