6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Sep 19, 2024 11:05 pm

All times are UTC




Post new topic Reply to topic  [ 746 posts ]  Go to page Previous  1 ... 16, 17, 18, 19, 20, 21, 22 ... 50  Next
Author Message
PostPosted: Sun Nov 01, 2015 2:53 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Did you look at these instructions ?

http://www.cc65.org/doc/customizing.html


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 3:28 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
jmp(FFFA) wrote:
Oneironaut wrote:
1) Forget C, but lose the ability to code great games in a few hours.

Please tell me why you seem to believe that C is the only suitable high level programming language for coding games on the Vulcan74?


Let me expand on that comment.

I believe that given adequate time, I could ALWAYS do a faster and smaller routine in Assembly than anyone could do in C, regardless of their C expertise.
Having taken up this challenge several times on PIC and AVR, I understand that even a commercial C compiler has no chance. Most times, it's barely a challenge!

Now having said that, I also believe that even a half-assed C programmer like myself could code a great game on the Vulcan-74 platform in a few hours, and that no assembly programmer, no matter how well versed could do the same.

I know this will sound crazy, but I could care less about how efficient the generated C code is. Vulcan has so much power that even with the 6502 clocked at 500KHz (yes Kilohertz), my system would run circles around an Amiga. A few instructions will scroll a 1024x1024 bitmap around the screen! Hell, even a interpreted Basic would make this thing fly! I have actually considered making the Kernal a Basic interpereter, and this option is not off the table yet.

I have seen so many amazing hardware projects drop straight into oblivion die to the fact that they were just too difficult to program, and the authors underestimated how important a large codebase would be to making it a success. The most popular language HAS to be supported, and the toolchain MUST be easy to use. I never intending this project to be a "look what I can do" project, but instead something that anyone with ZERO knowledge could build and learn from. Including a 2500 line assembly program as an intro does not make it easy at all, nor does requiring the builder to learn to tweak a toolchain for a language that should make things "easy". I will not even launch the new website until the Vulcan-74 example codebase is loaded with games and demos as this is just as important as proper schematics and a deep explanation on what every single IC is doing on the board. If it takes years, then that's how long it takes!

I guess I should have set some rules for the toolchain just as I did for the hardware....

1) Toolchain must install in one click on a modern PC, ready for coding Vulcan-74 games and demos with ZERO setup.
2) The language MUST be the most widely used. This is why I chose C. Oddballs like Forth... not going to happen here!
3) From code to Cartridge must also be a single click without requiring ancient hardware like serial ports and ROM burners.
4) All Vulcan functions to be optimized assembly and fully transparent to the user. ZERO setup required.
5) The entire Toolchain will have no options, as they will not be necessary. Just code, compile, burn.
6) Changes made to a program MUST appear on the Vulcan monitor within 15 seconds after pressing compile & burn.
7) For those like me who prefer pure assembly, the workflow will also be single click, code-and-see in 15 seconds.

I understand the CC65 is not any of these things out of the box, as it is a VERY configurable toolchain for many platforms.
At this point, I still (sort of) believe that I can make it into all of these things though. Stripped down, and made invisible to the user.
Besides a credit to the author in my Toolkit Software, users should not even be aware of CC65, as my Toolkit will do the dirty work "under the hood".

So to get make to your original comment...
I don't think C is the only Language for Vulcan-74, but it is the only language that a newb would be able to use and bang out a decent game in 4 hours with!

Radical Brad


Last edited by Oneironaut on Sun Nov 01, 2015 3:40 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 3:32 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Arlet wrote:
Did you look at these instructions ?

http://www.cc65.org/doc/customizing.html


Yes, that and the compiler section has been very helpful.
This doc was what I used to learn how to mix C and assembly successfully.
It does assume that the reader know something about C compilers though, and I do not yet.

BSS, Heap, Object files, H file.... no clue!
My only experience with C is installing AVR Studio and making assembly libraries for Main().

It will take me some time, no doubt!

Brad


Last edited by Oneironaut on Sun Nov 01, 2015 3:42 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 3:40 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
There may be a bit of a cultural mismatch in your expectations here: the sort of people who write C compilers are probably command-line people, who would first target a command line workflow, not a Windows-based IDE workflow. But you do seem to have got things pretty much working, which is good. It's been said many times that the 6502 is not a good C target - either you'll get code which you don't like much, or the C that's supported will be a mini-C that's closer to the machine.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 3:48 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Quote:
It's been said many times that the 6502 is not a good C target

Maybe high level programming on the 6502 could be done better using a bytecode interpreter. Something like SWEET16, but extended to provide a good C target. It would certainly be more compact. And since cc65 relies heavily on calling subroutines anyway, the speed penalty may be acceptable, especially if you have the option of falling back to pure assembly when needed.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 3:52 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
BigEd wrote:
There may be a bit of a cultural mismatch in your expectations here: the sort of people who write C compilers are probably command-line people, who would first target a command line workflow, not a Windows-based IDE workflow. But you do seem to have got things pretty much working, which is good. It's been said many times that the 6502 is not a good C target - either you'll get code which you don't like much, or the C that's supported will be a mini-C that's closer to the machine.


Yes, this is probably why it seems so damn painful to me!
I love building things that are insanely complex, and doing it the hard way (for the learning experience), but I do not expect my tools to fight me.
This is why I have never been one of those Bill Gates hating Unix fanboys.
Just give me a fast windoze PC with Photoshop and Visual Studio so I can get sh$t done! I don't care to learn about the actual tool.

Some people want to know what kind of fibres are in a canvas and what type of wood a paintbrush is made of. Me... I just want to paint!
They day I start to care about the makeup of the paintbrush will be they day I make my own damn brush. until then, my brush better just work properly!

I will be honest, I hate messing this CC65 command line and configuration stuff. I just want the damn thing to work!
The reason I am doing this is so that others won't have to if they choose to build something based on this project.

Brad


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 4:01 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Ok, back to the fight...

I can see that the .lib file is nothing but a bunch of assembly routines (the ones I was missing).
Does anyone know of a utility to expand this back to an assembly file?
I want to pick through it and take what I need for my own Initialization file.
If I cannot do this, then this game is over, and I will continue with TIDE.

Brad


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 4:07 pm 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
Quote:
Does anyone know of a utility to expand this back to an assembly file?

You can pick a lib apart into a set of .o files using ar65. The command 'ar65 l file.lib' shows the content, and 'ar65 x file.lib object.o' extracts an object file.

I haven't figured out how to disassemble the object file, but you'd probably be better off looking for the original sources anyway.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 4:10 pm 
Offline

Joined: Wed Sep 23, 2015 8:14 pm
Posts: 171
Location: Philadelphia, PA
Arlet wrote:
Maybe high level programming on the 6502 could be done better using a bytecode interpreter. Something like SWEET16, but extended to provide a good C target. It would certainly be more compact. And since cc65 relies heavily on calling subroutines anyway, the speed penalty may be acceptable, especially if you have the option of falling back to pure assembly when needed.

There was a decent C subset on the old 6502 Atari called Deep Blue C that used exactly this model (generates p-code, includes p-code interpreter). Code is slower than that produced by cc65, but *much* smaller. I believe the source is floating around, but if you can't find it and want it let me know and I'll dig it up out of my archives. Might tkae a bit of work to port to run on a modern platform, however.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 4:55 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
From what I have read today, I should probably end the CC65 journey before I kill another day.
From my understanding, this is what it will take to get this going...

1) Find a library file from some other platform in the lib DIR, like Atmos or Supervision.
2) Make my own startup code and use a tool to "cram" it into the library existing.
3) Rely on a library jam packed with stuff I don't need since I cannot un-compile it and take what I need.

Can someone confirm that this is correct? If so, I am going to move forward and try WDC TIDE instead.
I will NOT use a library of assembly routines I cannot see or alter.
This is not my style. I am a total control freak, and don't intend to change.

I will make the decision today. Vulcan-74 is screaming for some code!

Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 5:08 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
The thing about a library in .a format is that it's a collection of useful functions - each function will only be incorporated into your executable if it is needed. (So, being jam-packed is a feature, not a flaw)

Edit: as noted, see the cc65 sources to see the sources. This is not a closed library, it's just that the sources weren't shipped in the executable package you downloaded, because they weren't needed.


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 01, 2015 5:14 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
I have decided to try the WDC tools before beating my head against the wall again.

I just downloaded, and installed the package, and it is on my screen waiting for input!
So far so good!!!

It even seems to export a pure binary file.
Some say the C compiler is not free, but it seems to be included. Not sure yet.

I will now scour the web for an example TIDE project that calls an assembly routine, as this is my goal.
If this works, I would GLADLY pay the $40.00 for a license and support a working modern 65C02 IDE.

I will report back on this next time I have a few hours to play.
For now if anyone uses TIDE, and would like to share an assembly calling example, that would be great.

Brad


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 02, 2015 12:24 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
While I was exchanging the lawn tractor with the snowblower, I found a tote in the C-can that contained a bunch of Commodore stuff!
A few Vic-20's, one still boxed, a dataset, a boxed C65 and disk drive, manuals, cartridges, and an unpopulated C64 mainboard.
Although my oldest working Commodore item is my Pet 4016, it was cool to see these items still functional!

Image
A bunch of stuff I forgot I collected!

Image
This C-64 needs a few parts!

Looking forward to getting back to doing something useful on my Vulcan-74 Project!
I have contacted WDC to ask why the toolset seems free (on their website), yet is asking for a license.
If it works as claimed, and can call ASM from C, then I have no issue with the cost.
The last few days forking around with CC65 in DOS was NOT my idea of enjoyable.
Way too many Yaks lost their hair, and I now worry that PETA may show up at my place!

http://www.hanselman.com/blog/YakShavingDefinedIllGetThatDoneAsSoonAsIShaveThisYak.aspx

Time will tell....
Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 02, 2015 2:02 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Attachment:
Cheap Video Cookbook.jpg
Cheap Video Cookbook.jpg [ 37.4 KiB | Viewed 885 times ]
A classic from the 70's! But I guess this book by Don Lancaster didn't sway the design of Vulcan-74. (Nor should it. Different techniques for different goals.)

Vulcan is all about dedicated video hardware to offload the CPU. With Cheap Video even a 1 MHz CPU can be the video hardware! :D

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 02, 2015 11:45 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
I did reference CVC when learning 6502 assembly. Some great tricks in there for sure!
Once Vulcan is done, I will probably to a minimalist 6502 bit banged VGA system next.
At 20Mhz, some of the CVC tricks will really work well!

Brad


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 746 posts ]  Go to page Previous  1 ... 16, 17, 18, 19, 20, 21, 22 ... 50  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron