One-Line PET Emulator for Commodore 64

  Рет қаралды 26,650

8-Bit Show And Tell

8-Bit Show And Tell

Күн бұрын

We take a look at a single line of BASIC from Jim Butterfield, published in The Transactor magazine in 1984, that re-configures the Commodore 64 to be able to run some Commodore PET software. We type it in, test it out with a few PET games, and figure out how it works.
To support 8-Bit Show And Tell:
Become a patron: / 8bitshowandtell
One-time donation: paypal.me/8BitShowAndTell
2nd channel: / @8-bitshowandtell247
The Transactor Volume 5 Issue 1: archive.org/details/transacto...
Mapping the Commodore 64 (source of most of the memory map details shown in the top right corner): archive.org/details/Compute_s...
Fixing Dungeon on the PET: • A Pre-Rogue-Like: Fixi...
Growing Up '80s (Robin and Darren's podcast): / gu80s
End credits song is "History (Commodore 64)" by Bedford Level Experiment:
bedfordlevelexperiment.bandca...
Index:
0:00 Intro - The Transactor Volume 5 Issue 1
1:05 Typing it in (with some explanation)
4:00 RUNing and $ weirdness
6:10 Testing Dungeon
9:48 Testing Blackjack
11:56 Testing Everest
15:05 Testing Space Invaders
16:40 How does the "emulator" work?
21:30 Improving - and a challenge
24:10 Testing Yahtzee
25:39 Conclusion & thanks!

Пікірлер: 148
@curiousottman
@curiousottman 2 жыл бұрын
I hung out with Jim Butterfield in the mid 80s. He was a genius. I couldn’t appreciate his work as a teenager but seeing his code and concepts pop up here and there on KZbin 35 years later reminds me of just how smart he was.
@JustWasted3HoursHere
@JustWasted3HoursHere 2 жыл бұрын
Jim is definitely one of the legends of Commodore, for sure. I've read many of his books over the years. His knowledge of the C64 is deep.
@gklinger
@gklinger 2 жыл бұрын
@@JustWasted3HoursHere Was deep. :(
@Renville80
@Renville80 2 жыл бұрын
@@JustWasted3HoursHere Sadly, he’s been gone over a decade.
@briansawyer2543
@briansawyer2543 2 жыл бұрын
I wrote this game way back when. Thanks for keeping it alive !
@8_Bit
@8_Bit 2 жыл бұрын
Thanks Brian, I'm a big fan of your work!
@mikegarland4500
@mikegarland4500 9 ай бұрын
Even as a teen I knew who Jim Butterfield was, at least in name only. I would see his name mentioned in software, manuals, magazines, books, etc. Great episode!
@8_Bit
@8_Bit 9 ай бұрын
Yes, Jim was ever-present in Commodore land during the '80s.
@KoopaMedia64
@KoopaMedia64 2 жыл бұрын
This is just way too cool, I’m gonna have to play around with this sometime on my breadbox C64. Kinda makes one wonder, if done in 2 BASIC lines or in assembly as just a simple load program or driver, could one configure one of those 80 column adapters for the C64 to be able to run 80 column PET software?
@AndyDavis007
@AndyDavis007 2 жыл бұрын
Transacter. I must say I was intrigued when I saw this on the magazine rack of my local Stars and Stripes bookstore. I may have used my VIC 20 and Commodore 64 but when I got my Amiga they went to the side. But it was The Transacter magazine that had me take another look at my older Commodore computers. And that issue was the only one missing a subscription postal card.
@AndyDavis007
@AndyDavis007 2 жыл бұрын
The Transacter magazine program listings where there was no SCREAMING 😆
@mechaform
@mechaform 9 ай бұрын
The PET was a great start to my life with computing. I remember Dungeon and the text-based “Hunt the Wumpus” games, especially.
@GeoffSeeley
@GeoffSeeley 2 жыл бұрын
0:02 Wow! I remember that issue cover! I'm sure I've got a copy of this one squirrelled away someplace.
@curiousottman
@curiousottman 2 жыл бұрын
Same here! In a box somewhere in my basement I have a copy. Just seeing it brought back so much nostalgia!
@ianpun5650
@ianpun5650 2 жыл бұрын
Jim Butterfield hung around a computer store called Batteries Included at the Village by the Grange mall in Toronto. Every Friday, as a Grade 9 student I would visit him and he would show me amazing things on the Commodore PET like a 4 voice music program!
@bbartky
@bbartky Жыл бұрын
Robin, Shortly after buying my C64 I joined a Commodore club that met in a pizza place in San Dimas, California. As a new member I was given two disks full of Basic programs. When I looked at them all of them were converted Pet programs. According to the remarks the first line of the programs made it possible to run on a C64. I also learned about TPUG by reading the remarks. 😃
@realzneo
@realzneo 2 жыл бұрын
Of course you know how to fix the directory listing instantly.. Thank you for being you, and sharing a part of you on KZbin. Happy Christmas Robin!
@jeffreyphipps1507
@jeffreyphipps1507 2 жыл бұрын
It's amazing how much we want to go back to older and older computers... :-)
@StephanHradek
@StephanHradek 2 жыл бұрын
Video RAM starts at $8000. that‘s also where your module resides. So when the module scrolls video memory, it only can take it from the ROM as it has no access to its underlying RAM. That‘s why it shows „garbage“. It‘s the Rom from $8028 onward. Loop
@awilliams1701
@awilliams1701 2 жыл бұрын
I took my C64 to thanksgiving and played some games with my niece. She enjoyed it and so did my sister. Nostalgia for my sister and seeing a bit of history while having fun for my niece.
@0isay
@0isay 2 жыл бұрын
Breaking the 8 Sprite barrier?? *That's MADNESS!!*
@LEGOpachinko
@LEGOpachinko 2 жыл бұрын
kzbin.info/www/bejne/bXSbeqmkgtJ9iqM to see C64 sprite multiplexing
@0isay
@0isay 2 жыл бұрын
@@LEGOpachinko Nice!
@richpickings2845
@richpickings2845 2 жыл бұрын
Interestingly on the C64 wiki this is listed as being able to run C64 programs on a PET/CBM:- C64 programs can be made to run on a PET/CBM computer by running this command: POKE 40,1: POKE 41,8: POKE 8*256,0: NEW
@8_Bit
@8_Bit 2 жыл бұрын
I think that only handles BASIC programs that PRINT everything, while this program also handles POKEs to screen, greatly improving compatibility. (Still cool, though)
@richpickings2845
@richpickings2845 2 жыл бұрын
@@8_Bit Yeah, there was always going to be more compatibility going C64-to-PET.....and obviously good luck in changing that screen to blue :)
@Harveys42
@Harveys42 2 жыл бұрын
There is a shorter way to exact 80 characters to set border & background to black. Only the clear screen is missing: 1A=53272:B=128:Po56576,5:PoA,4:Po648,B:PoB*8,0:Po44,4:Po56,B:PoA+9,0:PoA+8,0:NEW
@RetroAdrianBlack
@RetroAdrianBlack 2 жыл бұрын
Awesome video! What a neat trick.
@rb6725
@rb6725 2 жыл бұрын
My eldest brother just found old photographs of me using my Vic-20 when I was 13 years old back in 1982! I’m now 52 and would like to experience those good times again so I have just ordered a new C-64. I never upgraded to the Commodore 64 later unfortunately, cars and girls were a higher priority I guess…. Really enjoying your channel and keep up the great work.
@BikeArea
@BikeArea 4 ай бұрын
Girls? 😮 BEHAVE! 😉
@tommyovesen
@tommyovesen 2 жыл бұрын
That was fun! I did not know about that possibility
@Bianchi77
@Bianchi77 2 жыл бұрын
Nice video clip, keep it up, thank you :)
@monkey_see_monkey_do
@monkey_see_monkey_do 2 жыл бұрын
Amazing hack! I'm already a fan of Jim Butterfield because of his KIM-1 genies software) A bit strange why they call it "emulator" in the manual while it's rather a re configuring the memory layout to be compatible with PET software, but probably just due to marketing purposes. Since it works like a charm it doesn't matter really) Thanks for sharing!
@bitwize
@bitwize 2 жыл бұрын
It's an emulator the way Wine Is Not an Emulator is.
@Curt_Sampson
@Curt_Sampson Жыл бұрын
"Emulator" simply refers to having one machine (the "host") run software for another machine (the "target") as well as the target machine itself could run that software. Note that an emulator does not have to run _all_ software that the target machine can run, just that _some_ software can be run on the host and appear, for practical purposes, indistinguishable from running it on the target. Even today we have many emulators for much older and slower systems that can correctly run most, but not all, software for the target system. (Typically the failure is due to insufficient emulation of what most people would consider bugs in the target system.) The word was coined by IBM in 1963. Up to that point they had written many simulators for their newer machines that would run software from their older machines to give some form of backward compatibility. These simulators ran the old software slower than the original machines, however, which was sometimes (perhaps often) a problem. With the IBM 360 line they added some hardware support for these simulators that could let them run at the full speed of the older machines, and this was a significant enough improvement that they coined the term "emulator" to distinguish these full-speed simulators from the older ones that couldn't run software at the same speed as the target. In this case, the word "emulator" certainly applies because, for those programs that the emulator is capable of running correctly, it runs them at full speed (or close enough that the user won't see the difference). There are still other minor differences; for example the character glyphs on the C64 are different from the PET, and, in the examples given here, even the foreground and background colours of the text screen are different. Which characteristics can be different while still calling the process "emulation" is obviously somewhat dependent on the feelings of the end user.
@JosipRetroBits
@JosipRetroBits 2 жыл бұрын
This is very cool. Jim was the king!
@d_vibe-swe
@d_vibe-swe 2 жыл бұрын
I love that you sound so surprised when something works and something not works xD
@MegaManNeo
@MegaManNeo 2 жыл бұрын
This is very interesting. I mean the PET was even more before my time but it'd make me wanna try some PET games on the bread bin if I had the chance. Considering the PET was more of a business machine however, how does this emulator stack up with business software?
@wisteela
@wisteela 2 жыл бұрын
Fantastic, and very interesting. Now somebody just needs to make a C64 numeric keypad. I'd imagine they used the inverse S instead of the heart as it was easier to print.
@Kakariki73
@Kakariki73 2 жыл бұрын
Makes me wonder wether that one liner would work on a C128 since that machine has a numeric keypad per default Edit : and perhaps using the 80 columns mode aswel 👍🏻
@SpearM3064
@SpearM3064 2 жыл бұрын
@@Kakariki73 The problem with 80-column mode on the C128 is that you can't directly access screen RAM. Any program that relied on POKEs to screen memory would not work in 80-column mode.
@robertsissco2439
@robertsissco2439 2 жыл бұрын
It would be interesting to see if Dungeon had the Basic error that allowed the diagonal wall phasing glitch that it did on Basic 4 on the PET's when running on the C64
@The-Great-Gonzo
@The-Great-Gonzo 2 жыл бұрын
That emulator is worth it just to play dungeon. Simple graphics but looks like a lot of fun.
@UnknownIdaho
@UnknownIdaho 2 жыл бұрын
Great seeing all these old PET programs! We modified Dungeon to Dungeons of Half Moon Bay High School with monsters the names of teachers, then we modified the multiplier so they had massive hit points and would kill any student that came near! I added an intro of a warning from Detrix the dungeon master. Pretty sure I still have the cassette around somewhere… Oh the days of simple coding!
@ShaunBebbington
@ShaunBebbington 2 жыл бұрын
This should also be possible with the Commodore C128, but would a more accurate emulator be possible on the C128 that does 40 and 80 columns PET software (at least that uses the Kernal)?
@ShaunBebbington
@ShaunBebbington 2 жыл бұрын
Actually, thinking about it, POKEing to the screen on the 80-columns display won't work. Only PRINTing to it will. I think.
@JohnGuillorykf5qeo
@JohnGuillorykf5qeo 2 жыл бұрын
No, because the 128's 80-col mode is not directly accessible via the cpu.
@ShaunBebbington
@ShaunBebbington 2 жыл бұрын
@@JohnGuillorykf5qeo Yes, I replied to my own comment, but doesn't the $ffd2 or C128 equivalent work? i.e., you can still PRINT to the 80 columns screen, right?
@ShaunBebbington
@ShaunBebbington 2 жыл бұрын
@@JohnGuillorykf5qeo In any case, a 40 columns emulator on the C128 would be somewhat better because the C128 has a number pad similar to the PET. So some 40 columns games that use the number pad would be easier to play.
@Curt_Sampson
@Curt_Sampson Жыл бұрын
@@JohnGuillorykf5qeo Hm. It occurs to me, though, that you could mirror the 80-column screen RAM in main RAM, change the KERNAL character output routines to print to both, and have the timer interrupt that does things like keyboard scanning (60 times per second or so) also check the main RAM copy for changes and copy those to the C128's 80-column frame buffer, right?
@GeoffSeeley
@GeoffSeeley 2 жыл бұрын
@4:12 LMS Tech programmers using absolute vs. relative references in their fast scrolling function?
@jeffreyphipps1507
@jeffreyphipps1507 2 жыл бұрын
I need to save that one-liner!
@MrMaxeemum
@MrMaxeemum 2 жыл бұрын
My first introduction to computers was a PET 2001 with chicklet keys in school and although you can run PET games on the C64 it's not the same. This is why emulation doesn't float my boat. I need a green screen (not a TV screen), I need the keys, I need the tape deck, I need the size of the beast for my nostalgic juices to start flowing. I wish I could afford one now.
@JustWasted3HoursHere
@JustWasted3HoursHere 2 жыл бұрын
Yeah, real ones are expensive (around $1000 and up on ebay) but have you seen this PET project that uses all real hardware components (no emulation or FPGA)? kzbin.info/www/bejne/sHmkeqh7aqeEjc0 Then all you have to do is find yourself an old green monochrome monitor and you're halfway there! [edit: The kit even includes a PET-like keyboard!]
@robsku1
@robsku1 2 жыл бұрын
I can relate... Although my first computer was bought in '91 and it was a PC - IBM PS/1 with 286 CPU and 1MB of RAM, VGA video, some weird audio card (no PCM) that I wish I had known how to program it. The machine can be emulated with IBMulator, but I truly miss my original system that I've lost during time - and I know it's unlikely that I'll ever find one that's the same model or even just close and for a price that I can afford. Saddens me, and it was in full working condition the last time I saw it. The last time I used it for was as a terminal, connected to my Linux workstation with null modem cable I used it to access IRC from my bed :D The IBMulator is very good emulator, I like it - I wouldn't say it doesn't float my boat, but I can't pretend the experience to ever be the same.
@thorbjrnhellehaven5766
@thorbjrnhellehaven5766 2 жыл бұрын
7:38 what about having option for PET, but support a standard USB-keyboard mapped like a PET keyboard as far as possible.
@robsku1
@robsku1 2 жыл бұрын
I really should read more carefully - I thought the title was "Online PET Emulator for Commodore 64" and was full on WTF? :D Made more sense when I started watching the video ;) P.S. I have lately become so addicted to podcasts I rarely listen to music when walking outdoors any more - I've included a number of vintage computer podcasts, but I've also found Growing Up 80's and I love it! Just one day I listened the episode about corner stores, and there was a ton of stuff there that was much similar to other stuff here in Finland (we're also two-language country - Finnish and Swedish) so there's that too. Some things were just so damn _same,_ although naturally there were differences as well.
@8_Bit
@8_Bit 2 жыл бұрын
I'm glad you're enjoying GU80s, kiitos! Our city of Thunder Bay has a large Finnish population, and still have a few shops where Finnish is regularly spoken. One pair of my great-grandparents were born there, and my grandmother grew up speaking Finnish at home and stayed fluent throughout her life.
@robsku1
@robsku1 2 жыл бұрын
@@8_Bit Wow, now that's a coincidence if I ever saw one =) GU80s is definitely one of my feel good podcasts, listening it takes me back to my own childhood in the 80's and makes me feel all kinds of warm and fuzzy (even when it doesn't necessarily match up), so the kiitokset belong all to you ;) Both of you :) Thanks for the reply - it's a small world sometimes! I wonder... Do you know if you've ever tasted this Finnish candy we call salmiakki? It's not the brand, it's just the substance it's made of and my understanding is that it's not used as candy anywhere else in the world - it's a weird taste, not salty nor sweet (although the candy made of it can have salt or sugar in it), not really anything I know to compare with? I guess that's not a much of a description and I guess I'll have to hope that you would know it if you know it ;D I wouldn't be that surprised if such candy would have been available somewhere with large Finnish population :)
@8_Bit
@8_Bit 2 жыл бұрын
@@robsku1 Yes, we do have that here though most often now I see the Dutch version because my mom-in-law was born there, they call it dubbelzoute drop I think. I think it's nearly the same as salmiakki, probably a somewhat different mixture and of course shape, but overall similar. A Swedish friend also likes something similar.
@Curt_Sampson
@Curt_Sampson Жыл бұрын
@@robsku1 I think it may have been available throughout Canada. From looking at Wikipedia, salmiakki seems to be what we in western Canada called "double-salted liquorice."
@thorbjrnhellehaven5766
@thorbjrnhellehaven5766 2 жыл бұрын
Is it possible to make a PET game loader for each compatible game? I understand it would break the 1 liner restriction, but it would be nice and user friendly. Initialize the emulator Load specific game Autorun game.
@SpearM3064
@SpearM3064 2 жыл бұрын
Yes, it is possible. Something like the following code would do it: 1 POKE 56576,5:POKE 53272,4:POKE 646,128:POKE 1024,0:POKE 44,4:POKE 56,128 2 PRINT "{CLR}LOAD";CHR$(34);"program name";CHR$(34);",8{HOME}"; 3 POKE 198,1:POKE 631,131:NEW Note that the NEW command has been moved from line 1 to line 3. Line 2 prints LOAD"program",8 at the top of the screen and leaves the cursor in the top-left corner of the screen (over the letter L in LOAD). Line 3 POKEs the code for SHIFT-RUN/STOP into the keyboard buffer (so that the C64 will type "LOAD" and then "RUN" automatically.)
@victokra
@victokra 2 жыл бұрын
I kind of fitted the emulator with black screen and green cursor into one line, but only for direct-mode with abbreviations and without line-number, with line-number I still come one character short: POKE56576,5:POKE53272,4:POKE53280,0:POKE53281,0:POKE648,128:POKE642,4:POKE644,128:PRINT"{Green}":SYS64767 Using POKEs to 642 and 644 combined with SYS64767 saves you the POKE to 1024 and the Clear-Screen (kind of). Using A=53272 actually does not save anything. It takes up 8 characters (including the following ":" ) and saves 4 bytes once (53272) and 2 bytes twice (53280,53281) = 8 bytes as well
@8_Bit
@8_Bit 2 жыл бұрын
Nice, and since the original program NEWs itself, a direct-mode-only version seems somewhat valid. The only reason to make it a program, really, is so it's possible to SAVE and LOAD it.
@Okurka.
@Okurka. 2 жыл бұрын
0:33 The one in green is clearly smoking something.
@CubicleNate
@CubicleNate 2 жыл бұрын
This makes me wonder. Could I get PET compatibility with my "TheC64" machine? I was trying to test this with VICE but the Left CTRL doesn't seem to trigger the CBM key. I'll have to figure it out but I do wonder if a very basic PET emulator would work on TheC64. I know it is missing the number pad but USB number pads are a dime a dozen. It makes me think...
@8_Bit
@8_Bit 2 жыл бұрын
This PET emulator or the somewhat more advanced one Commodore made should work fine on TheC64. But an actual VICE-quality PET emulator would require Retro Games to actually implement it, or I suppose some very enthusiastic and skilled hacker could do it. And yeah, the missing number pad would be a problem. I'm not sure if TheC64 firmware would support a stand-alone number pad and even if it did, it wouldn't necessarily automatically map the keys right. But it might work!
@erkl797
@erkl797 2 жыл бұрын
I have a C64 sales pamphlet from Commodore, it shows a Pet Emulator cartridge. I've never seen one. I guess it was not released?
@8_Bit
@8_Bit 2 жыл бұрын
I've never seen a PET Emulator cartridge either - though Commodore did release one on cassette. I haven't tried it yet to know if it's much better than this simple one.
@flatfingertuning727
@flatfingertuning727 2 жыл бұрын
@@8_Bit A revised kernel and BASIC ROM could probably allow for compatibility with many programs that expect to make direct calls into the PET's ROM. If the interrupt service routine switched banking properly, BASIC could even sit at $C000-$DFFF as it would on a PET or VIC-20.
@LeftoverBeefcake
@LeftoverBeefcake 2 жыл бұрын
@@8_Bit Same here, have never seen a cartridge version from Commodore, just the disk version that emulates the PET 2001. I can make a .D64 version available on my Google Drive if y'all want to check it out. (The last time I checked, the disk still worked...)
@WarhavenSC
@WarhavenSC 2 жыл бұрын
$8000? That's an expensive screen.
@Curt_Sampson
@Curt_Sampson Жыл бұрын
Microcomputer hardware was expensive in the early days! Fortunately it came down to $400 by the time of the C64.
@EdwinNoorlander
@EdwinNoorlander 2 жыл бұрын
Can you make a video about programming scrolling text and wiggling text and border lines like C64 demo’s
@SpearM3064
@SpearM3064 2 жыл бұрын
That would be a long video. In text mode, there's two types of horizontal scroll: A coarse scroll and a smooth scroll. A coarse scroll is easy enough that even BASIC can do it. A smooth scroll is only possible from BASIC if you set the _entire screen_ to 38 columns. (Most demos use a raster interrupt to set only the bottom line to 38 columns.) If you want wiggling text and border lines, you're going to need machine language.
@Renville80
@Renville80 2 жыл бұрын
Bets! Where can one get a copy of that disk??? I haven’t seen that game in ages!!
@Okurka.
@Okurka. 2 жыл бұрын
The disk shown in this video is called "PET Games Disk 01 (19xx)(-).d64"
@gile849
@gile849 2 жыл бұрын
I love Robin ;)
@richardhead8264
@richardhead8264 2 жыл бұрын
_Will it run the PET version of PETSCII Robots?_
@Okurka.
@Okurka. 2 жыл бұрын
No.
@TheSulross
@TheSulross 2 жыл бұрын
but could Attack of the PETSCII Robots run?
@belstar1128
@belstar1128 2 жыл бұрын
I think one of the reasons commodore and other 8 bit micro companies did not survive past the 90s is because their computers did not have decent backwards compatibility compared to the pc and mac.
@thesuperdog
@thesuperdog 2 жыл бұрын
There were many factors but mostly it was bad management at Commodore. Amiga had more custom chips which made it better but more expensive to produce than other competing computers. You will find the information on KZbin if you search for it. It is a real shame that the Amiga never reached its potential because of stupidity. It was the C64 that helped keep Commodore alive for so long
@belstar1128
@belstar1128 2 жыл бұрын
@@thesuperdog Yea but i wonder if the amiga could be more successful if it could run c64 software and maybe even vic 20 and pet i know a lot of people loved the ibm pc because all the pcs where compatible with each other and you could run a program from the early 80s on a high end pc in the 90s (but not on a modern pc without dos box). but of course like you said the company had a lot more problems but thats another advantage the pc had it was a more open platform 3d parties could make pcs and if ibm messed up someone else would just make a better pc but if you tried to make a better amiga you would get sued.
@CptJistuce
@CptJistuce 2 жыл бұрын
It is funny you say that, because the Macintosh's lack of back-compatibility with the existing Apple 2 line was considered a huge issue for several years. The IIgs is really the computer Apple should've thrown all their weight behind, but they were certain the 2 line was dead even before the original Macintosh launched, and it became a self-fulfilling prophecy.
@haroldlane4647
@haroldlane4647 2 жыл бұрын
@@belstar1128 The C-128 had that backwards-compatibility with the 64 as well as CP/M compatibility, but it still wasn't enough to save Commodore. I can't remember if Butterfield ever programmed any "Frankenstein" applications using both sides of the 128, but other near geniuses did, and it was amazing to me. Customers just didn't seem to like the 128 as well as the 64. Commodore tried to move on and catch that lightning in a bottle again with the planned 264 and/or C65, but other internal issues brought them to their knees.
@BikeArea
@BikeArea 4 ай бұрын
​@@haroldlane4647Can you elaborate a bit on this interestingly sounding Frankenstein topic? 😮
@tenminutetokyo2643
@tenminutetokyo2643 2 жыл бұрын
Maybe retro games will make a complete mini PET.
@gklinger
@gklinger 2 жыл бұрын
WIth all due respect to my old friend, may he rest in peace, this program really needed: "POKE53280,0:POKE53281,0:POKE646,5.
@8_Bit
@8_Bit 2 жыл бұрын
I did try that at the end, but only squeezed the background and character colours into the single line; border wouldn't fit. Of course, the one-line limit is totally arbitrary, but it's part of what makes things fun for me.
@flatfingertuning727
@flatfingertuning727 2 жыл бұрын
@@8_Bit Different versions of the Kernel handled character color three different ways, and compatibility with screen pokes would depend upon which Kernel version one was using. When using the middle version, code which poked characters onto the screen wouldn't be able to show anything after a screen clear, since character cell colors would all be set to match the background.
@KoopaMedia64
@KoopaMedia64 2 жыл бұрын
@@flatfingertuning727 That probably rules out my C64 then, it’s got the middle kernal version. What would the different screen poke look like?
@flatfingertuning727
@flatfingertuning727 2 жыл бұрын
@@KoopaMedia64 In middle-ROM versions, clearing the screen sets all color attributes to match the background color, so characters poked into screen memory would be invisible until code "prints" to those spots on the screen.
@SpearM3064
@SpearM3064 2 жыл бұрын
@@KoopaMedia64 Probably the best Kernal was the last version. Instead of setting colors to match the background, they were set to match the current cursor color. So one way to tell the difference between Kernel versions is the following line: POKE 646,0:PRINT CHR$(147):POKE 1024,160 This line clears the screen and pokes a solid square into the top left corner. If it's got the original Kernal, the square will be white. If it's got the first revision (as yours does), the square will be invisible because it'll be set to the background color to hide the 'sparkle' problem that the original C64 had. On the last revision, it'll be black, because you're first changing the cursor color to black and _then_ clearing the screen. In regards to the 'sparkle', here's some more information: A lot of people blamed the VIC-II chip, but the _actual_ problem was a ROM chip of which 3 million were in service with no problems in other systems, including the video game Asteroids. The ROM, which had been designed years earlier, had a special precharging circuit to make it run faster, but the circuit made it sensitive to spurious signals. The video circuitry and the 6510 microprocessor alternated in controlling the system bus, and when control passed from one to the other, voltage spikes were sometimes generated. It just happened that these voltage spikes hit the exact timing. If the spike had been a few nanoseconds shorter or longer, it wouldn't have been a problem. The spike was just wide enough that the ROM saw it as a valid address. It would ignore the next address request and give the video chip wrong data. Since the ROM contained the C64 character set, the screen display would be littered with random slices of characters. The sprite-to-background collision registers would read this as a collision.
@logiciananimal
@logiciananimal 2 жыл бұрын
Sounds like it might be better to call it a PET *BASIC* emulator, no?
@Kwstr42
@Kwstr42 2 жыл бұрын
even if the keyboard isnt compatible, i think im gonna make a d64 file with the pet code on it to have some fun with it on my TheC64 anyways, if i cared about convenience of use, i wouldnt be using old computers lol
@SimonEllwood
@SimonEllwood 2 жыл бұрын
You say they worked to make it compatible. I would say the used if it ain't broke principle instead!
@derekchristenson5711
@derekchristenson5711 Жыл бұрын
Impressive! Not perfect, but still impressive. 🙂
@MrGoatflakes
@MrGoatflakes 2 жыл бұрын
Nice. But we need to see how to rotate sprites and have more than 8 of them 😹
@CC-ke5np
@CC-ke5np 2 жыл бұрын
Also a way to LOAD"$",8,1 :D
@alexanderwingeskog758
@alexanderwingeskog758 Жыл бұрын
Have totally lost all my C64 basic skills a long time ago... but you can't make a for next loop with read data "address,value,address,value" and so on? then just poke address,data;next?
@jan-erikkarlsson7875
@jan-erikkarlsson7875 2 жыл бұрын
I wonder about dungeon, the start part where it counts down 60 seconds ... is that really what it does isn't it a simple counter, since whe i run it on my 48MHz U64e it still takes the same amount of time, i don't think it actually does anything... or? Those quite awful 3d programs Driller for examle is way too fast at 48MHz, but a simple basic program crawl exactly like at 1MHz.
@robsku1
@robsku1 2 жыл бұрын
I don't have an answer for why it wouldn't go faster, but it wouldn't make much sense to me for it to be just a simple counter for it's own sake, if it wasn't making some preparations during that time... A valid question though, I'd like to know as well :)
@SpearM3064
@SpearM3064 2 жыл бұрын
It depends on how the game implements the timer. Remember, the Commodore computers (except perhaps for the Amiga) all implement a "Jiffy Clock" that updates 50 or 60 times per second, depending on if it's a PAL or NTSC system. So a very simple code segment might look like this: 10 TI$="000000":REM reset the jiffy timer to 0 20 IF TI$>"000059" GOTO 50:REM skip the next line after the timer reaches 1 minute 30 PRINT CHR$(19);"Time Remaining: ";60-VAL(RIGHT$(TI$,2));CHR$(157);" seconds" 40 GOTO 20 50 REM rest of the program begins here As long as the emulator correctly implements the jiffy clock, the code segment above will _always_ count exactly 60 seconds, regardless of how fast the emulator is running.
@LordRenegrade
@LordRenegrade 2 жыл бұрын
@@SpearM3064 - Amigas have a JiffyClock. Two, in fact. It's actually improved as reading the MSB latches the whole thing so it won't change during read - it's still the same three-byte affair that the C64/128 version is. The clock continues counting in the background during the latch, but the values shown to the program are fixed until the LSB is read. One difference is that it's driven by VBLANK rather than a fixed crystal, so it's 50Hz in PAL screen modes and such, regardless of if the machine itself is PAL or NTSC. It's actually called the "TOD clock" (time of day - it's related to the C64 TOD stuff, but not the exact same). They're driven by the 8520 CIAs of course. Here's an interesting thing: ZX Spectrums and bunches of other 8-bit machines ALSO have a three-byte TOD/JiffyClock-style affair, often driven through the VBLANK....BBC Micros, through, have a 100hz fixed-rate clock that spans like 5 bytes.
@davidgray6502
@davidgray6502 2 жыл бұрын
Why don't you just use the CLS command instead of print to clear the screen?
@TDGalea
@TDGalea 2 жыл бұрын
There is no "cls" in Commodore BASIC.
@davidgray6502
@davidgray6502 2 жыл бұрын
@@TDGalea D'oh! 30+ years ago I would have remembered this myself. Thanks.
@therealbluedragon
@therealbluedragon 2 жыл бұрын
It’s less of an emulator and more of a compatibility mode.
@8_Bit
@8_Bit 2 жыл бұрын
Yes, though in back in 1982 they had a looser definition of what an emulator was. If it allowed a computer to run software from another computer, it was an emulator.
@csbruce
@csbruce 2 жыл бұрын
2:41 '128' would be one PAST the highest address used by BASIC. 3:48 I don't think just a CLR will handle changing the ★start★ of BASIC. 4:00 Maybe you should SAVE a program that has a NEW in it, before RUNing it. 4:42 Does the Super Snapshot assert itself into processor memory at $8000 while doing stuff? If so, screen-scrolling reads would read its ROM instead of screen RAM. 5:35 You were able to configure the start/end of BASIC on the PET, so that's always been around. The VIC-20 included the ability to redirect the screen editor to a new area as a matter of necessity considering its various RAM-expansion options, and the VIC had no hope of easily emulating a PET. So, it seems more like a coincidence that the C64 can configure its memory to be similar to the PET. Also, it has RAM available everywhere in the address space. 6:53 That last second lingers for a while! 10:56 Will it take a negative bet? Has anyone tried that on "Jeopardy!"? 21:50 You could always just make the program a "two-liner"! 22:29 1 SYS2063:REM{66 bytes of carefully chosen machine code}. 23:57 Is there a brighter green?
@8_Bit
@8_Bit 2 жыл бұрын
re: $8000 and the Snapshot, ah yes, that's probably what is happening. The C64's "light green" looks so mint (?) coloured to me that I don't think it would be better, but I agree the regular green looks too dark on my video capture. I brightened it up "in post" for the end credits. Maybe I should have done that for the last few minutes of the main video too.
@JustWasted3HoursHere
@JustWasted3HoursHere 2 жыл бұрын
"1 SYS2063:REM{66 bytes of carefully chosen machine code}." Ha! Cheating! But I think you're on to something there. Actually could do quite a bit in 66 bytes.
@csbruce
@csbruce 2 жыл бұрын
@@JustWasted3HoursHere: You have to choose instruction bytes that can be entered from the keyboard.
@JustWasted3HoursHere
@JustWasted3HoursHere 2 жыл бұрын
@@csbruce That's fair.
@Curt_Sampson
@Curt_Sampson Жыл бұрын
While we're adding quibbles: at 20:57 the low byte of TXTTAB is already __1,__ not 0.
@AussieAmigan
@AussieAmigan 2 жыл бұрын
It doesn't feel authentic without the background and border in black and the characters in.....green. ;-)
@byteforever7829
@byteforever7829 2 жыл бұрын
Great video is the way i wish/want my videos to turn out
@byteforever7829
@byteforever7829 2 жыл бұрын
Everest and dungeon look great i will try them out thanks again
@tomyyoung2624
@tomyyoung2624 2 жыл бұрын
Yes Linux!
@muffenme
@muffenme 2 жыл бұрын
I'll write it as follow; 10 poke 56576, 5 20 poke 53272, 4 30 poke 648, 128 40 poke 1024, 0 50 poke 44, 4 60 poke 56, 128 70 poke 53281, 0 80 poke 53280, 0 90 print chr$(147); chr$(30) 100 new
@jpcompton
@jpcompton 2 жыл бұрын
26:57 grrr
@gklinger
@gklinger 2 жыл бұрын
No love for the TS-1000?
@jpcompton
@jpcompton 2 жыл бұрын
Short answer: no. Long answer: I am in a long-running feud with Robin's cross-media storytelling habits about his early and deeply regrettable computer purchases. (Also "no.")
@gklinger
@gklinger 2 жыл бұрын
@@jpcompton So I shouldn't post one ASAP as a Christmas gift?
@jpcompton
@jpcompton 2 жыл бұрын
@@gklinger Oh, you could and I wouldn’t kick it out of bed for eating electrons. But neither would I answer questions like “what’s your favorite gift from Golan?” by saying “well it all started when I thought about great gifts from Golan but I instead asked him to give me a terrible computer. A computer which is terribly known for its terribleness. And it was terrible. So it was terrible for a while and *then*-“
@gklinger
@gklinger 2 жыл бұрын
@@jpcompton At the risk of this getting weird, I miss you.
@comedyflu
@comedyflu 2 жыл бұрын
You need to work on your Blackjack skills. Pro Tip: 16 you always hit.
@comedyflu
@comedyflu 2 жыл бұрын
The is because a loss would still be a loss
@AiOinc1
@AiOinc1 2 жыл бұрын
Would this not be a virtual machine rather than an emulator
@8_Bit
@8_Bit 2 жыл бұрын
I think we've ended up with a stricter meaning of "emulator" over the last 20-30 years than existed back in the early '80s. It's an emulator in the loose sense that it allows a C64 to run software for another platform, the PET, but it's far from comprehensive, and even if we didn't have the tiny one-line limit, we could only further improve compatibility somewhat.
@Curt_Sampson
@Curt_Sampson Жыл бұрын
No; software in a virtual machine does not directly access the hardware of the host machine, as the programs here do. (Or at least does not do so entirely unmediated.) Virtual machines can be (or be used to build) emulators, but there are plenty of emulators out there that choose to emulate a system well enough to properly run only a subset of programs for the target machine, and this is one of those. (In fact, most emulators don't run _every_ conceivable program for their target systems. Even VICE will still not properly run some C64 demos, and earlier versions of emulators for popular 8-bit systems often did not correctly run quite a number of the more "clever" programs available for the platform.) See my reply to the top-level comment from Code Monkey King for more on where the term "emulator" originated and its meaning.
@muffenme
@muffenme 2 жыл бұрын
Don't write it in one line. Use multiple lines. This is ugly coding.
@gklinger
@gklinger 2 жыл бұрын
You must be fun at parties.
@MrMaxeemum
@MrMaxeemum 2 жыл бұрын
NOOoooo...... the challenge is a single line of code. If you need 2 lines then you may as well use 10 or 100 lines. It's like the game you used to play as a kid "don't step on the cracks in the pavement / sidewalk" it's not important if you do step on a crack but the game is not to. I still play that game and I'm 50 now.
@rotordave81
@rotordave81 2 жыл бұрын
He also didn't instantiate a PetEmulatorFactory() nor a PokeValueDependencyInjector(), what is he thinking?!
@muffenme
@muffenme 2 жыл бұрын
@@MrMaxeemum I wouldn't never code this way.
@muffenme
@muffenme 2 жыл бұрын
@@MrMaxeemum So, real code don't program on one line. Some features like the : in basic is bad.
Ten Great Commodore 128 BASIC Improvements Over The C64
45:43
8-Bit Show And Tell
Рет қаралды 39 М.
КИРПИЧ ОБ ГОЛОВУ #shorts
00:24
Паша Осадчий
Рет қаралды 6 МЛН
Ауылға қайт! | АСАУ | 2 серия
33:16
Qarapaıym Qanal
Рет қаралды 1 МЛН
Can You Draw The PERFECT Circle?
00:57
Stokes Twins
Рет қаралды 64 МЛН
Commodore 64: Opening The Borders (Type-In From Zzap!64 Magazine)
28:13
8-Bit Show And Tell
Рет қаралды 31 М.
All the Commodore 64 KERNAL Revisions: Bugs, Fixes, and More!
29:39
8-Bit Show And Tell
Рет қаралды 45 М.
Integrate REAL Camera Data in Your 3D Scenes!
3:49:41
pwnisher
Рет қаралды 757 М.
Over 3 Hours of Portal Lore
3:43:56
Skyrionn
Рет қаралды 1,5 МЛН
Printing Binary in BASIC and Assembly on Commodore 64
39:08
8-Bit Show And Tell
Рет қаралды 21 М.
Commodore Magic Voice Software Prototype and Easter Eggs
38:20
8-Bit Show And Tell
Рет қаралды 29 М.
Commodore DAC-612 from 1969: Inside and Out
27:06
8-Bit Show And Tell
Рет қаралды 57 М.
The VIC-10 & VIC-30: Commodore UK's Cancelled Computers
19:42
8-Bit Show And Tell
Рет қаралды 43 М.
Пленка или защитное стекло: что лучше?
0:52
Слава 100пудово!
Рет қаралды 1,8 МЛН
Samsung vs Apple Vision Pro🤯
0:31
FilmBytes
Рет қаралды 113 М.
Распаковка айфона в воде😱 #shorts
0:25
Mevaza
Рет қаралды 1,4 МЛН
Apple Event - May 7
38:32
Apple
Рет қаралды 6 МЛН