Absolutely amazing. Feels like the only thing left now is to build/connect an EEPROM programmer, so you can start building a homebrew CPU, using the JAM-1 to program it 😂
For an EXE format I think the Atari 8 bit method is quite simple and elegent. The exe file is made of 1 or more segments, each segment starts with a 2 byte magic number (0xffff) then has a 2 byte start address and a 2 byte end address followed by the data itself. after loading all segments, the address 0x02e0 is checked by the OS to determine if it has been populated during the load, and if it has then a jump to the address stored there is executed. It allows for such things as loading a splash screen directly into video memory, loading values into harware registers to bank switch RAM, etc, etc, all before the program is executed from an arbitrary address.
Glad you were able to use my video here, I had intended to go dig up my 486 and make it do the directory on an 800MB Conner drive, but I wasn't able to actually physically find it before you needed the clip.
Yeah... it really really is like a "proper computer" now. I love how you new command line BOTH deals with files AND still has all the disassembly and dump stuff in the same interface. Exactly what I really really wanted back in the 8-bit days.
Always fascinating to watch. Now all that is needed is a compiler, or am I jumping the gun here? In any case, I want to wish you a very blessed Christmas James, and thanks for making Christmas day so much more interesting with your video and may the project blaze on into 2025. Now, If you can excuse me, I am going to the kitchen to see about helping the wife with prep for our Christmas feast!!!
That's an awesome milestone! Your custom PC has fascinated me for ages, it's great to see it's software capabilities take a nice big stride. I wonder if I could port the C4 compiler/interpreter/thingy to your architecture, then you'd have a C compiler (I've written a whole toolset for that already, including a multitasking kernel. Just have to update the compiler to output the native assembly.) How hard would it be to make a multitasking kernel I wonder...do you have an interrupt for the RTC, or something else that could be used for pre-emptive multitasking? It may not be too difficult... Still, a lot of the fun is doing all that yourself.
Fantastic work as usual! Clever to tame the monitor's memory usage by putting its functionality in external programs. I know everyone wants to see a C compiler and/or a BASIC interpreter for this computer. But how about CHIP-8 as well? Your computer seems well capable of running a CHIP-8 virtual machine and there are many programs and games already written that you could then run.
You could have saved a couple bytes using the right names like "ls" and "cat" ;) The rom vs disk monitor at the end reminds me of the Apple days, where you might boot into ROM basic instead of ProDOS by mistake, spend hours writing a program, and then realize you can not save it because you have no operating system.
@@weirdboyjim I realized that, but figured I'd leave my dos v unix swipe up anyway. I do think the spirit of this machine is more early pc than early unix, so you chose right. Awesome progress as always!
Lovely! You really capture the flavour of the period. I'm mildly surprised that you didn't add some sort of bank switching, so you could put a lot of the kernel/OS functions into shadow memory and leave more for apps. I once built a Frankenstein monster of a CP/M system that had half a megabyte of memory, with the bottom 32k (except for page 0) swappable. I had a text editor (based on Mince - Mince Is Not Complete Emacs) and a compile-link-go system (based on BDS C) that both had their code partitioned into overlays. They'd have their bank switcher up in the space occupied by the CP/M CCP. 256k of the memory could be configured as a RAM drive or a disk cache. That system got me through my MSEE!
It wouldn’t be that tough to make a bank switcher, but that is usually just a retrofit so I’md rather build a new system with a larger native address bus in the future!
I think this is my favorite video so far. It very well illustrates how powerful and useful an operating system can be. All of those building blocks , code, tools, utilities all brought together under one interface. No longer any need to modify the entire source to change or add one function, simply compile and update the modular executable and drop it on the SD card. Love how the old demos/code came along too!
This is so brilliant. (!). As you say, it feels like a “real computer” more and more - and I think that is demonstrated by the fact you’re “progressing faster” (if that makes sense). Do you intend to implement anything analogous to software interrupts?
Glad you liked it! Do you mean interrupts like the "int xx" instruction that x86 machines use to communicate with system routines? No plans for that (although I could create a "int" macro for accessing the jump table) I do want a cleaner route to this for Jam-2 though.
James, it is truely amazing how for you have taken this project now. Well done. I am wondering how much futher you will drive the hardware in the future. Really stunning how responsive the system is running, even without interrupts. ❤
James! I've been 'away' for some time... I come back and you have an OS! I'd love to see a C Compiler. I'm about to start one for my (more humble) microprocessor - using the text from Frazer and Hanson. Have a good Christmas!
James, this is impressive and it looks to be fast approaching the finish line. How much is really left with this project? I am interest to see your next project will be.
Circuitry is just some extra modules on the vga circuit. Should be getting to them soon. Writing games and demos will take some time but that will overlap with some groundwork on new stuff.
Fantastic James! Congrats. Somebody mentioned BASIC, and I was thinking that MS BASIC source code is actually available on Github, so probably no need to create an implementation from zero, if you wanted that (though I understand not wanting to have BASIC, it’s so impractical nowadays. Just something us old timers like 😆)
Thank you for this Christmas present, including all the colourful lights! What happens when you run a program that doesn't end naturally? How would you go about stopping it without a total reset? As in: ctrl-c, how?
Nice work! While the commands might not be quite complex enough to justify it yet, do you have any plans to introduce an autoexec.bat equivalent and/or aliases? I can see things like aliases being useful for commands like "write" so you can hide addresses behind a friendly name, and it shouldn't cost too much memory if the alias names are encoded in a trie.
Having an OS is a major jump, congrats. Maybe Electric Rabbit and Snak Jams games will hit store shelves soon 😜 Just looking at the overall system footprint is amazing for how small it is. Impressed!
Hm, I noticed that when your BIOS routine was called by `hellorld`, it did so via a jump, not a call. The jump table also just jumps instead of calling. I might be missing something really obvious, but how is execution returned to the resident program? Also, I think it’s extremely impressive how quick something like `cd` or `dir` executes given that they’re being loaded from disk each time. I suppose they’re not very big, but there’s a fair bit of file system code to retrieve the executable.
I wondered if someone would ask about. This is called a “Tail call”, when a function call is the last thing you want to do in a function you use jump rather than call, then the child functions ret instruction return to the parent functions caller. Saves a few bytes and cycles.
If I understood correctly you put the os in ROM. Why not put it in ram? Or is that too small? I cannot remember how much ram your computer has to play with. You could have a very small monitor load the os from SD, basically you would almost never have to update the monitor eeprom again.
@weirdboyjim does boot.bin completely replace the ROM monitor? In other words do you swap the ROM for ram? If so you can eek out more speed with ram generally being faster than ROM.
Very impressive work. You should make a book about all your beautiful work, that could survive doomsday. So one day humans could start from scratch based on "Von Sharman" architecture ;) Btw. Did you consider more Unix like OS or μClinux ? or this is next step ? Merry X-mas !
@@roostertechchan and in Bulgarian window is "прозорец" (prozoretz), but "Jam" is slang for window borrowed from Turkish. The correct transliteration of the word - as we use it in Bulgarian would be "dzham". " WindowDzham" wold be a rather obscure name, with a reference understandable to few, for the hypothetical future windowing system of the hypothetical future computer :-)
Seems to be a common theme... in my own 6502 'OS-ish monitor thingie' the 'help' and 'ls' commands currently just print out 'sorry, you're on your own...' 😬
For the folks following in your steps or that are otherwise inspired by it, are there things that looking back you would have done in a different way? Is it maybe a short talk (for the second channel)?
I did a video a while back called "Design retrospective" ruclips.net/video/QZMcBETdydA/видео.html which covered some stuff. I may do a similar video when it's fully done that covers the whole system.
Nice. Things are coming together. Do you have any plans to open this can of worms called Codepages and Regional Settings? Not that I find it useful, but the engineers of that time were facing such challenges, and so I ask myself if James want to face them as well.
That is the "boring" way - LOL. I was hoping for some broken encoding one day, you know. As it was in the old days ... Sorry for such forbidden thoughts
@@weirdboyjim Feel like moving off RUclips too? The RUclips censorship bot's bottom lip started quivering ... Let's try again... Discord banned my account before I even finished the signup process. Seriously. The home screen hadn't even finished loading. Official Discord client, no funny business. Trust and Safety eventually unlocked it with an "oops our bad", only to ban it again 2 weeks later for no reason. 32 days after filing the appeal T&S finally responded with a "we can't find your account", because locked accounts are automatically deleted after 30 days. Now my mobile number cannot be used for another signup, and a mobile is *required*. It saddens me that so many interesting and open source projects are locking their communities away behind such a rubbish proprietary system that can't be archived for future reference by open systems.
@@weirdboyjim maybe you could put your stuff on ben eater's website. if discord isnt enough. not saying its a good idea. just the first idea i thought of.
Very impressive! This would surely make this feel much more like a standalone computer and less of an embedded platform. I have a long term goal on my list to make my own OS of sorts using the FreeRTOS kernel, so it would end up being a (probably pre-emptive) multitasking OS, with executables compiled as ELF binaries, and have capabilities like TSRs and loadable device drivers (I guess they are very much the same thing in a way). I still have a few things to learn and figure out before then though, like how to make a binary that can be loaded anywhere in memory and still run, but this serves as great inspiration towards such a thing! Thanks 🙂
Sounds like a good project. Relocatable code always used to be accomplished by have an executable file section that lists all the pointers for load time relocation.
@weirdboyjim yep. I've been playing around with .exe's recently, writing C in Turbo C, compiling it, and extracting the executable code to make a ROM image to run on my 286 board. That just has a table of segments and offsets that you need to add a value to. I assume ELF would be similar to a degree, but I haven't looked too much into it yet.
Join us on Discord: discord.gg/jmf6M3z7XS
Follow me on Twitter: twitter.com/WeirdBoyJim
Support the channel on Patreon: www.patreon.com/JamesSharman
Twas the night before Christmas and Mr Sharman dropped a new video!
Hope it didn’t disappoint!
Absolutely amazing. Feels like the only thing left now is to build/connect an EEPROM programmer, so you can start building a homebrew CPU, using the JAM-1 to program it 😂
For an EXE format I think the Atari 8 bit method is quite simple and elegent.
The exe file is made of 1 or more segments, each segment starts with a 2 byte magic number (0xffff) then has a 2 byte start address and a 2 byte end address followed by the data itself. after loading all segments, the address 0x02e0 is checked by the OS to determine if it has been populated during the load, and if it has then a jump to the address stored there is executed.
It allows for such things as loading a splash screen directly into video memory, loading values into harware registers to bank switch RAM, etc, etc, all before the program is executed from an arbitrary address.
Glad you were able to use my video here, I had intended to go dig up my 486 and make it do the directory on an 800MB Conner drive, but I wasn't able to actually physically find it before you needed the clip.
Thanks for helping out!
Thanks James. Fabulous. So cool to see JAM-1 with an OS. It has come together very nicely. Take care.
Glad you enjoyed it! Getting some pressure to add a keyboard to make it stand alone now.
Yeah... it really really is like a "proper computer" now. I love how you new command line BOTH deals with files AND still has all the disassembly and dump stuff in the same interface. Exactly what I really really wanted back in the 8-bit days.
Thanks! Need to write a few more utilities, be nice to have a text editor!
@@weirdboyjim Oh yes... very nice!
Joe is a nice little editor.
YES YES YES! I'm always blown away by the amount of work taht has gone into the project int order to be able to do this kind of things
Glad you are enjoying the project!
3:07 - you say "dir" is a command, yet I'm the muppet who types "ls" into DOS.
It always take me a few minutes to re-adapt when switching between a unix shell and dos!
I used to have that problem too, and then I started using powershell where `dir` and `ls` are both aliases to `List-ChildItem`.
@@PleegWatthis!
I end up making a ls.bat file so I don't need to think about it. 😁
Always fascinating to watch. Now all that is needed is a compiler, or am I jumping the gun here?
In any case, I want to wish you a very blessed Christmas James, and thanks for making Christmas day so much more interesting with your video and may the project blaze on into 2025.
Now, If you can excuse me, I am going to the kitchen to see about helping the wife with prep for our Christmas feast!!!
Dude this project is so cool, you deserve soooo many more views
That's an awesome milestone! Your custom PC has fascinated me for ages, it's great to see it's software capabilities take a nice big stride. I wonder if I could port the C4 compiler/interpreter/thingy to your architecture, then you'd have a C compiler (I've written a whole toolset for that already, including a multitasking kernel. Just have to update the compiler to output the native assembly.)
How hard would it be to make a multitasking kernel I wonder...do you have an interrupt for the RTC, or something else that could be used for pre-emptive multitasking? It may not be too difficult...
Still, a lot of the fun is doing all that yourself.
Someone on discord already has a C compiler up and running, I don’t know much about the C4 toolchain
Fantastic work as usual! Clever to tame the monitor's memory usage by putting its functionality in external programs.
I know everyone wants to see a C compiler and/or a BASIC interpreter for this computer. But how about CHIP-8 as well? Your computer seems well capable of running a CHIP-8 virtual machine and there are many programs and games already written that you could then run.
This is such a great educational project. I love it!
Glad you like it!
DOS shell + mouse would be nice.
Give those gfx a work out.
You could have saved a couple bytes using the right names like "ls" and "cat" ;)
The rom vs disk monitor at the end reminds me of the Apple days, where you might boot into ROM basic instead of ProDOS by mistake, spend hours writing a program, and then realize you can not save it because you have no operating system.
The bytes might be handy one day! But they are file names so I wouldn’t actually be saving anything.
@@weirdboyjim I realized that, but figured I'd leave my dos v unix swipe up anyway. I do think the spirit of this machine is more early pc than early unix, so you chose right. Awesome progress as always!
This is an amazing birthday present! Thank you so so much for making these videos, they always make my day!
Lovely! You really capture the flavour of the period.
I'm mildly surprised that you didn't add some sort of bank switching, so you could put a lot of the kernel/OS functions into shadow memory and leave more for apps.
I once built a Frankenstein monster of a CP/M system that had half a megabyte of memory, with the bottom 32k (except for page 0) swappable. I had a text editor (based on Mince - Mince Is Not Complete Emacs) and a compile-link-go system (based on BDS C) that both had their code partitioned into overlays. They'd have their bank switcher up in the space occupied by the CP/M CCP. 256k of the memory could be configured as a RAM drive or a disk cache. That system got me through my MSEE!
It wouldn’t be that tough to make a bank switcher, but that is usually just a retrofit so I’md rather build a new system with a larger native address bus in the future!
I think this is my favorite video so far. It very well illustrates how powerful and useful an operating system can be. All of those building blocks , code, tools, utilities all brought together under one interface. No longer any need to modify the entire source to change or add one function, simply compile and update the modular executable and drop it on the SD card. Love how the old demos/code came along too!
Hopefully I’ll be able to get all the old demos up and running as executable files.
This is so brilliant. (!). As you say, it feels like a “real computer” more and more - and I think that is demonstrated by the fact you’re “progressing faster” (if that makes sense).
Do you intend to implement anything analogous to software interrupts?
Glad you liked it! Do you mean interrupts like the "int xx" instruction that x86 machines use to communicate with system routines? No plans for that (although I could create a "int" macro for accessing the jump table) I do want a cleaner route to this for Jam-2 though.
@ yeah, something analogous to the int instruction. I’ll look forward to seeing what Jam-2 brings!
James, it is truely amazing how for you have taken this project now. Well done.
I am wondering how much futher you will drive the hardware in the future.
Really stunning how responsive the system is running, even without interrupts.
❤
Glad you are finding it interesting, just finished a new graphical demo I know you’ll like when it releases!
@weirdboyjim 😆
"Jam 1" would soon be ready enough for "Tiny Tapeout". I wonder how many tiles it would fit in.
That’s fantastic progress!
James! I've been 'away' for some time... I come back and you have an OS! I'd love to see a C Compiler. I'm about to start one for my (more humble) microprocessor - using the text from Frazer and Hanson. Have a good Christmas!
The only gift i need for christmas! Great video as always
Really enjoyed this one James! One of my favourite episodes!
Good to hear George!
Best project, got even better. Merry holimass James.
James, this is impressive and it looks to be fast approaching the finish line. How much is really left with this project? I am interest to see your next project will be.
Circuitry is just some extra modules on the vga circuit. Should be getting to them soon. Writing games and demos will take some time but that will overlap with some groundwork on new stuff.
You have so precisely the same accent as Thunderf00t, such that I was very confused what happened to his face, and hair color! 😁
Fantastic James! Congrats. Somebody mentioned BASIC, and I was thinking that MS BASIC source code is actually available on Github, so probably no need to create an implementation from zero, if you wanted that (though I understand not wanting to have BASIC, it’s so impractical nowadays. Just something us old timers like 😆)
I might take a look at that some time, no idea how plausible a port would be.
Thank you for this Christmas present, including all the colourful lights!
What happens when you run a program that doesn't end naturally? How would you go about stopping it without a total reset? As in: ctrl-c, how?
I have a bit of common code that exits on a keystroke, but if I make a mistake I have reach for the reset button!
Nice work! While the commands might not be quite complex enough to justify it yet, do you have any plans to introduce an autoexec.bat equivalent and/or aliases? I can see things like aliases being useful for commands like "write" so you can hide addresses behind a friendly name, and it shouldn't cost too much memory if the alias names are encoded in a trie.
Something like a batch file may not be that tough, I’d need a text editor on the system first or it wouldn’t be very useful.
Having an OS is a major jump, congrats. Maybe Electric Rabbit and Snak Jams games will hit store shelves soon 😜 Just looking at the overall system footprint is amazing for how small it is. Impressed!
Thanks! Glad you are enjoying it!
Hm, I noticed that when your BIOS routine was called by `hellorld`, it did so via a jump, not a call. The jump table also just jumps instead of calling. I might be missing something really obvious, but how is execution returned to the resident program?
Also, I think it’s extremely impressive how quick something like `cd` or `dir` executes given that they’re being loaded from disk each time. I suppose they’re not very big, but there’s a fair bit of file system code to retrieve the executable.
I wondered if someone would ask about. This is called a “Tail call”, when a function call is the last thing you want to do in a function you use jump rather than call, then the child functions ret instruction return to the parent functions caller. Saves a few bytes and cycles.
Ah of course! I don’t think I’ve ever seen an assembly example of a tail call, so that’s pretty neat.
If I understood correctly you put the os in ROM. Why not put it in ram? Or is that too small? I cannot remember how much ram your computer has to play with. You could have a very small monitor load the os from SD, basically you would almost never have to update the monitor eeprom again.
Excellent! It's such a relief to be free of the ROM.
It’s been on a continuous trajectory of needing fewer rom contents changes for a while!
@weirdboyjim does boot.bin completely replace the ROM monitor? In other words do you swap the ROM for ram? If so you can eek out more speed with ram generally being faster than ROM.
@ the rom already gets shadowed, so the whole of memory is ram by the time code is running.
Very impressive work. You should make a book about all your beautiful work, that could survive doomsday.
So one day humans could start from scratch based on "Von Sharman" architecture ;)
Btw. Did you consider more Unix like OS or μClinux ? or this is next step ?
Merry X-mas !
The “OS” will not get very advanced on this hardware, future builds where I have some more ram will have need of more.
Will the GUI be called WindowJAM?
I think GUI may have to wait for a future system. 😅
It's a quite funny coincidence but in Turkish the word for window is 'cam', which is pronounces as 'Jam' 😁
@@roostertechchan and in Bulgarian window is "прозорец" (prozoretz), but "Jam" is slang for window borrowed from Turkish. The correct transliteration of the word - as we use it in Bulgarian would be "dzham".
" WindowDzham" wold be a rather obscure name, with a reference understandable to few, for the hypothetical future windowing system of the hypothetical future computer :-)
I know, but I thought the reference is too far fetched 🤷♂️
Seems to be a common theme... in my own 6502 'OS-ish monitor thingie' the 'help' and 'ls' commands currently just print out 'sorry, you're on your own...' 😬
So I was above the curve having actual help all this time?
@@weirdboyjim definitely! Your CPU build was the main reason for me to start into my current 6502 adventure.
Wow! Than you. You are an inspiration!
Glad to hear you are enjoying it!
Awsome James. Working on BASIC yet?
Not done anything yet, would be nice to have something higher level.
For the folks following in your steps or that are otherwise inspired by it, are there things that looking back you would have done in a different way? Is it maybe a short talk (for the second channel)?
I did a video a while back called "Design retrospective" ruclips.net/video/QZMcBETdydA/видео.html which covered some stuff. I may do a similar video when it's fully done that covers the whole system.
Nice. Things are coming together. Do you have any plans to open this can of worms called Codepages and Regional Settings? Not that I find it useful, but the engineers of that time were facing such challenges, and so I ask myself if James want to face them as well.
Not something I’ve thought about. When I’m outputting to a terminal that works with utf8 I get natural support for basic Unicode anyway.
That is the "boring" way - LOL. I was hoping for some broken encoding one day, you know. As it was in the old days ... Sorry for such forbidden thoughts
@@weirdboyjim Wise decision. Mojibake were the plague of my existence for quite a while.
The RUclips algo sent me here after searching for Nvidia Infiniband switches. It knows me too well!
It would be great if you could provide access to your public resources outside of Discord. Some of us *cannot* use Discord.
What restrictions are you under? I’m trying to avoid multiplying up the number of things I have to keep track of.
@@weirdboyjim Feel like moving off RUclips too? The RUclips censorship bot's bottom lip started quivering ... Let's try again...
Discord banned my account before I even finished the signup process. Seriously. The home screen hadn't even finished loading. Official Discord client, no funny business. Trust and Safety eventually unlocked it with an "oops our bad", only to ban it again 2 weeks later for no reason.
32 days after filing the appeal T&S finally responded with a "we can't find your account", because locked accounts are automatically deleted after 30 days. Now my mobile number cannot be used for another signup, and a mobile is *required*.
It saddens me that so many interesting and open source projects are locking their communities away behind such a rubbish proprietary system that can't be archived for future reference by open systems.
@@weirdboyjim maybe you could put your stuff on ben eater's website. if discord isnt enough. not saying its a good idea. just the first idea i thought of.
the most important part of an OS is syscalls
Kind of Amiga OS like library jumptable
What popped into my head, given the naming scheme, was RISC OS's SWI interface.
Jump tables like this are pretty common if the cpu doesn’t have something handy like software interupts.
Very nice indeed. Next up, BASIC interpreter? 😂
It would indeed be interesting to get something high level going.
Nice!
relocatable files when? :P
The way my Isa handles pointers that could be tricky!
Next up: A port of Tiny C.
Someone on discord already has a ‘c’ compiler up and running!
Very impressive! This would surely make this feel much more like a standalone computer and less of an embedded platform.
I have a long term goal on my list to make my own OS of sorts using the FreeRTOS kernel, so it would end up being a (probably pre-emptive) multitasking OS, with executables compiled as ELF binaries, and have capabilities like TSRs and loadable device drivers (I guess they are very much the same thing in a way).
I still have a few things to learn and figure out before then though, like how to make a binary that can be loaded anywhere in memory and still run, but this serves as great inspiration towards such a thing! Thanks 🙂
Sounds like a good project. Relocatable code always used to be accomplished by have an executable file section that lists all the pointers for load time relocation.
@weirdboyjim yep. I've been playing around with .exe's recently, writing C in Turbo C, compiling it, and extracting the executable code to make a ROM image to run on my 286 board.
That just has a table of segments and offsets that you need to add a value to. I assume ELF would be similar to a degree, but I haven't looked too much into it yet.
the best thing is that it is better than windows, maybe i cant watch YT, but at least it does not spy on me XD
Making that thing able to display YT videos would actually be an interesting future project! It's amazing what this thing can do already.
@@benhetland576 i mean, 144p @1 FPM maybe, but it also has to litle memory for things like that. but man can dream
No spyware in the wild for Jam-1 yet!