GNU compiler collection for 6502
Moderator: Moderators
GNU compiler collection for 6502
I found the source code repositry here, but haven't found any post here about it.
Is anyone here using it for the Vic-20?
Is anyone here using it for the Vic-20?
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: GNU compiler collection for 6502
I wasn't aware there are implementations of GNU compilers that run on the VIC-20.
Re: GNU compiler collection for 6502
Its a general 6502 port, so to run it on a 6502 machine one needs the appropriate libraries (like the ones for cc65g). If no one here knows about it, then there is probably no Vic-20 port yet. From the comments under "issue" section it looks like its at least running on C64.
I also found a Linux variant that runs on C64, but it may not be related: http://lng.sourceforge.net/
Edit: I found some install instructions here that points out that the C64 version is not fully up, but that the package compiles under cc65.
I also found a Linux variant that runs on C64, but it may not be related: http://lng.sourceforge.net/
Edit: I found some install instructions here that points out that the C64 version is not fully up, but that the package compiles under cc65.
Re: GNU compiler collection for 6502
it does NOT run "on" the c64 - it produces code that can then run on the c64. (and lng isnt "a linux variant" at all...)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: GNU compiler collection for 6502
If those compilers do not execute on the C64, and supposedly neither do so on VIC-20, this thread here should be moved to the "Emulation and Cross-development" Section.
Re: GNU compiler collection for 6502
Thanks for clearing that up. Is there any other "linux" variants (or minix) that run under 6502?groepaz wrote:it does NOT run "on" the c64 - it produces code that can then run on the c64. (and lng isnt "a linux variant" at all...)
Re: GNU compiler collection for 6502
no not really, linux is really a bit too heavy for that
there are some other projects that use a somewhat similar approach, one of which is LNG (which is dead unfortunately). the most "serious" one i have seen is "fuzix" (find it on github) - but that has not been ported to c64 or vic20 yet.

I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
Re: GNU compiler collection for 6502
Well, someone got Minix to run on his own computer with a home-made cpu (made from 74xx chips) and 64KB. I don't see the Vic-20 as being inferior to that.groepaz wrote:no not really, linux is really a bit too heavy for thatthere are some other projects that use a somewhat similar approach, one of which is LNG (which is dead unfortunately). the most "serious" one i have seen is "fuzix" (find it on github) - but that has not been ported to c64 or vic20 yet.
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: GNU compiler collection for 6502
Just to set the facts straight: the CPU of this machine (Magic-1) has 22 bits address space with 64K segments/pages and I/O; and the computer contains 4 MB RAM in total.Kakemoms wrote:Well, someone got Minix to run on his own computer with a home-made cpu (made from 74xx chips) and 64KB. I don't see the Vic-20 as being inferior to that.
Re: GNU compiler collection for 6502
From the homepage: "It's a one-address, microprogrammed machine with one-byte opcodes. It features 8/16-bit data operations, functioning on an 8-bit wide data bus with 16-bit addresses (mapped via 2K-byte pages into a 22-bit physical address space)."Mike wrote:Just to set the facts straight: the CPU of this machine (Magic-1) has 22 bits address space with 64K segments/pages and I/O; and the computer contains 4 MB RAM in total.Kakemoms wrote:Well, someone got Minix to run on his own computer with a home-made cpu (made from 74xx chips) and 64KB. I don't see the Vic-20 as being inferior to that.
So it sounds like a 6502 with a mapped memory expansion. And there are several of those for the Vic-20. So then the question becomes how much mapped memory one needs to get it running?
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: GNU compiler collection for 6502
Just because it has an 8 bit data bus doesn't mean a CPU "has" to resemble a 6502 in any way. And, from more careful reading, you could already have deduced by yourself, that the CPU of the Magic-1 has a custom designed instruction set.
For me, there's not much sense to elaborate further if there's a sensible way to get a Unixoid OS running on a 65xx in general, and on the 6502/VIC-20 in particular: just take a look at the Contiki port by Carlsson - that one got to a dead end because the available address space is obstructed by the ROM ranges. He barely got a stack running on it. Or take a look at Lee's web server: it uses a (non-intelligent!) ISA network card - the VIC-20 is able to run a web server on it, barely.
There are no standardized means of memory management and protection. Only a CPU with 8 bit data bus and 16 bit address space (and at 1 MHz). Sloo-oo-oow peripherals. A functional, but (for your intended use woefully) inadequate video system. Etc. Simply the wrong tool for the job!
Doesn't mean you can't do anything on the VIC-20. It just means one needs a sensible judgement of what is possible to achieve with the VIC-20 hardware, and what is not. If you lack that judgement, you'll put just lots of hours into waste because it won't work out.
I had similar discussions with MRaider/FD22, who also concocted that writing an own OS would somehow help to transcend the limits of the VIC-20 hardware. With exactly 0 (read: zero!) results after four years. That track record should speak for itself.
Kakemoms, please don't fall into the same trap. There's still enough to explore on the VIC-20, still something new to try out - with standard h/w, external expansions or moderate modifications of the mainboard; and new algorithms - and here in Denial you have a huge collection of knowledge, and can you ask for collaboration or help. And the best releases of the last years most often were not one-man-shows.
Think about this.
For me, there's not much sense to elaborate further if there's a sensible way to get a Unixoid OS running on a 65xx in general, and on the 6502/VIC-20 in particular: just take a look at the Contiki port by Carlsson - that one got to a dead end because the available address space is obstructed by the ROM ranges. He barely got a stack running on it. Or take a look at Lee's web server: it uses a (non-intelligent!) ISA network card - the VIC-20 is able to run a web server on it, barely.
There are no standardized means of memory management and protection. Only a CPU with 8 bit data bus and 16 bit address space (and at 1 MHz). Sloo-oo-oow peripherals. A functional, but (for your intended use woefully) inadequate video system. Etc. Simply the wrong tool for the job!
Doesn't mean you can't do anything on the VIC-20. It just means one needs a sensible judgement of what is possible to achieve with the VIC-20 hardware, and what is not. If you lack that judgement, you'll put just lots of hours into waste because it won't work out.
I had similar discussions with MRaider/FD22, who also concocted that writing an own OS would somehow help to transcend the limits of the VIC-20 hardware. With exactly 0 (read: zero!) results after four years. That track record should speak for itself.
Kakemoms, please don't fall into the same trap. There's still enough to explore on the VIC-20, still something new to try out - with standard h/w, external expansions or moderate modifications of the mainboard; and new algorithms - and here in Denial you have a huge collection of knowledge, and can you ask for collaboration or help. And the best releases of the last years most often were not one-man-shows.
Think about this.
Re: GNU compiler collection for 6502
actually fuzix was designed for 8bit CPUs with segmented memory - however it will not work well unless you can provide fast context switching (meaning being able to bank the stack page at least on 6502).
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
Re: GNU compiler collection for 6502
What do you mean inadequate video system? It has colors and several bits of resolution!Mike wrote:For me, there's not much sense to elaborate further if there's a sensible way to get a Unixoid OS running on a 65xx in general, and on the 6502/VIC-20 in particular: just take a look at the Contiki port by Carlsson - that one got to a dead end because the available address space is obstructed by the ROM ranges. He barely got a stack running on it. Or take a look at Lee's web server: it uses a (non-intelligent!) ISA network card - the VIC-20 is able to run a web server on it, barely.
There are no standardized means of memory management and protection. Only a CPU with 8 bit data bus and 16 bit address space (and at 1 MHz). Sloo-oo-oow peripherals. A functional, but (for your intended use woefully) inadequate video system. Etc. Simply the wrong tool for the job!
Doesn't mean you can't do anything on the VIC-20. It just means one needs a sensible judgement of what is possible to achieve with the VIC-20 hardware, and what is not. If you lack that judgement, you'll put just lots of hours into waste because it won't work out.
I had similar discussions with MRaider/FD22, who also concocted that writing an own OS would somehow help to transcend the limits of the VIC-20 hardware. With exactly 0 (read: zero!) results after four years. That track record should speak for itself.
Kakemoms, please don't fall into the same trap. There's still enough to explore on the VIC-20, still something new to try out - with standard h/w, external expansions or moderate modifications of the mainboard; and new algorithms - and here in Denial you have a huge collection of knowledge, and can you ask for collaboration or help. And the best releases of the last years most often were not one-man-shows.
Think about this.
Thanks for the info & links.
Ah, I see. That is interesting. While the 6502 can't do that, my 65C02 expansion can do it. Currently there is only 4 pages, but I have increased that to 16 in the next version (with 1MByte memory). I will keep that in mind for the next layout. Its a simple poke to switch to a different 64KB page.groepaz wrote:actually fuzix was designed for 8bit CPUs with segmented memory - however it will not work well unless you can provide fast context switching (meaning being able to bank the stack page at least on 6502).
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: GNU compiler collection for 6502
Mike wrote:[...] A functional, but (for your intended use woefully) inadequate video system. [...]
From the context, it should have been clear to you that this sentence (and the whole paragraph, and the one preceding it) referred to the VIC-20.Kakemoms wrote:What do you mean inadequate video system? It has colors and several bits of resolution!
Re: GNU compiler collection for 6502
Yes I was talking about the Vic-20 too! What a coincidence..