6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 2:13 pm

All times are UTC




Post new topic Reply to topic  [ 842 posts ]  Go to page Previous  1 ... 18, 19, 20, 21, 22, 23, 24 ... 57  Next
Author Message
PostPosted: Wed Nov 04, 2015 12:57 pm 
Offline

Joined: Wed Nov 04, 2015 12:18 pm
Posts: 2
After some hassle with my email address, I finally managed it to register here - only for this project!

It quite 'hurts' what I had to read about cc65 here and I'm unsure if my reply is wanted, since Oneironaut wrote he wants to learn all by himself, but here are some hints:

* there is already 'one call' for ca65, cc65 & ld65: This is called cl65
* since this is an open source project you have of course access to all these assembler functions in SOURCE like "popax", "mulu" etc., but believe me: You don't want to build an own subset of these. They form the 'runtime' which is addressed by the compiler and removing some would break the compiler output. Things like " int a=0; a *=10; " lead to calls to these routines!
* starting with the target "none" was the right approach

Write, if assistance is needed. I'm quite familiar with the tool set.

I still would like to see this as 6502 project and would even like to see "special support" for this processor. As already mentioned, the zero-page is very handy for fast access, so why not build a logic where (parts)-of it can be banked, allowing e.g. fast self-modifying-code on it (normally this space is to precious to waste it for code)?
Or banking of the stack-space for easier multi-tasking switches would be great too! I'm not aware of any popular machine allowing these features, but I'm quite curious how this would behave.

I.


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 04, 2015 1:20 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Hi - welcome - it would be great if you could post in a new reference thread with all the best pointers you know of to get started with cc65. (Edit: I've just found some materials here)

People here are commonly trying to compile for a bare platform, so a recipe for say c64 isn't going to help everyone (but might of course help some.)

Also, as in this case, many people are used to a Windows IDE or to a single-source-file assembler model, and the idea of compiler+assembler+linker might be a bit foreign to them, as perhaps the idea of a batch script or a makefile.

I think we all know that documentation is the hardest part! Especially if you have a diverse readership.


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 04, 2015 2:40 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Thanks everyone.
Here is the new plan to keep Vulcan-74 on track...

I have already removed the 65C02 and left a space on the board called "Cartridge Port". This is now a 16 pin port that has 15 address lines going to the 138 decoders, 8 data bits, and one strobe line. The strobe line is directly 6502 compatible, by tying it to the clock. So now any micro-controller or processor that can spare 16 IO lines can talk directly to the Vulcan Hardware. Being native to AVR assembly, and finding GCC easy to use, I will continue with the ATmega-1284 as my test platform, basing all other libraries from what I create here. Getting the AVR libraries ready will only take an afternoon of time.

I will be working on the Sound Generator hardware right away. This is why I made a second massive breadboard, as the Sound Generator will require at least 150 more logic ICs. Once the Sound Generator is working, libraries will be created and tested, completing the design.

The breadboard is only a proof of concept, and from there, I intend to make a permanent version in a cabinet. I have not yet decided between an actual PCB or a hand wired board on a massive perf. board. I may do both! The end goal is to create a massive E-Book (online and downloadable) on this project, but make it so easy to build that anyone can make one, even with zero experience. For this to be a reality, a PCB is really necessary, as soldering a point to point massive board is a skill only gained over time. No, I will not consider wire wrap. Most likely, I will hand wire my own version just to prove my schematics, and then order a few boards and make a second unit to prove the board. From there, I will make all PCB files available, a parts list, and tons of code examples and libraries for every processor (including 6502) in various languages. Having more time, I will try CC65 again. When it seemed like my ONLY option, I was not cool with that. Now that Vulcan-74 is compatible with anything that has 16 IO lines, it's all good.

So, back to having fun plugging in wires and working with a modern tool-chain!
Progress will once again move back into the fast lane!

Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 04, 2015 6:07 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Thanks, I will probably take you up on this once I have the hardware ready.
To be honest, I am glad this road-block happened, as the multi-target approach opens this kind of thing to anyone.
Now the focus is on the hardware, with the freedom to use any language and target.
It will be cool to see one of my old PIC16F84's doing a nice clone of PacMan in Basic!

It wasn't CC65 that made me decide to go external on the processor, it was actually this post from WDC....
http://forum.6502.org/viewtopic.php?f=1&t=3124&start=18

If a company does not want their tools in the hands of hobbyists, then what about the actual hardware???
I had no problem purchasing a dozen 65C02's, but that was a few years ago.
Imagine if the same thing applied to the chip? So much for my "readily available" promise!

How many units will you purchase per year.... "ummm.... one".
What will your annual sales be on this project.... "ummm.... zero".

Doh!

Anyhow, I respect WDC, and their reasons. They have an amazing track record, so who am I to dispute their motives!
What is odd though is lowering the compiler price to hobby/hacker level, yet not allowing anyone to purchase.
If I was pumping out 100k units, I don't think the difference between $39.93 and $399.95 would mean squat to me!
But like I said before... the simple things in life confound me the most!

Ok, back on track....
My next post will be hardware progress.
...No Fate but What we Make!

Radical Brad





Irgendwer wrote:
After some hassle with my email address, I finally managed it to register here - only for this project!

It quite 'hurts' what I had to read about cc65 here and I'm unsure if my reply is wanted, since Oneironaut wrote he wants to learn all by himself, but here are some hints:

* there is already 'one call' for ca65, cc65 & ld65: This is called cl65
* since this is an open source project you have of course access to all these assembler functions in SOURCE like "popax", "mulu" etc., but believe me: You don't want to build an own subset of these. They form the 'runtime' which is addressed by the compiler and removing some would break the compiler output. Things like " int a=0; a *=10; " lead to calls to these routines!
* starting with the target "none" was the right approach

Write, if assistance is needed. I'm quite familiar with the tool set.

I still would like to see this as 6502 project and would even like to see "special support" for this processor. As already mentioned, the zero-page is very handy for fast access, so why not build a logic where (parts)-of it can be banked, allowing e.g. fast self-modifying-code on it (normally this space is to precious to waste it for code)?
Or banking of the stack-space for easier multi-tasking switches would be great too! I'm not aware of any popular machine allowing these features, but I'm quite curious how this would behave.

I.


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 05, 2015 1:16 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
The project is back on track now. I took an hour last night and recoded the AVR "Kernal" to work with the new 16 line IO system.
It was nice to see those spinning balls and the large background back up on the screen.

I like the new IO port, which is fully compatible now with 6502, 65816, and any controller that can swing 16 IO lines.
My original Cartridge Port was going to have a 40 pin connector, but now I can get away with a 20 pin connector...

IO Address : 7
IO Data : 8
IO Strobe : 1
VCC : 1
GND : 1

This leaves two free pins, one of which I might use to feed a 10MHz clock out to the Cartridge to save the requirement of adding a crystal to whatever target is being used as the Cartridge. On the other pin, I may feed out 3.3 volts for more modern controllers like XMega and ARM. Vulcan inputs work fine with 3.3v, so the only translation needed will be on the 8 bit data line coming into a 3.3v target. A 74LVC245 will take care of this issue for those not cool with over-volting their micro-controllers like I do.

I am now planning the landscape for the Sound Generator, and hope to start laying down ICs on the weekend.
Before I start on the Sound Generator, I will do one more Video Demo to test everything and post the results.

Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 05, 2015 2:08 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Oneironaut wrote:
VCC : 1
GND : 1
This might be acceptable using soldered connections, but it's a weak point if a connector is involved.

I'm sure I'm not the only one who's had the experience of curing faulty electronic gear simply by undoing the connectors, giving 'em a dose of contact cleaner spray, then reconnecting and putting the "repaired" :roll: device back in service. The gear that's most prone to this action features cheap connectors and -- less forgivably -- no redundancy on key connections such as GND.

Quote:
now I can get away with a 20 pin connector
I urge you to consider using 24 pins (or whatever the next larger size is) so you can provide at least two GND pins. Maybe double up VCC too -- and you'll still have extra pins for Clock or whatever comes to mind later.

cheers,
Jeff

_________________
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: Thu Nov 05, 2015 3:43 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Thanks Doc, that is a good point.
The cost difference between a 24 and 20 pin connector is next to nothing.
I will run VCC and GND at both ends.

Way back when I built this simple Game system, I think I had dual VCC and GND as well. It was a while ago, so I can't remember the exact pinout.
I believe I built this one between 2006 and 2007, and it only used 70ns SRAM and 74LS parts!!
To get the required 10MHz VGA bandwidth, I relied on propagation delays that included 2 bits on the line at once!

In this unit, the "Cartridge" was also an external micro-controller, but a lot more data had to be transmitted through the connector since the mainboard was nothing more than a dual frame buffer. All graphics were drawn directly by the controller, seeing the board as a 64K SRAM only.

Image
An external micro-controller was used as a cartridge on a 40 pin connector.

Image
Homebrew joysticks were Atari / Commodore compatible.

Image
Output was 256x240 VGA and mono 4 voice sound.

Image
Any controller that could swing 16 address lines, 8 data lines, and 4 control lines could be used.

The 40 pin Cartridge link ran fine at 10MHz bandwidth, but it was a bit stiff to plug and unplug.
The new 24 pin Cartridge on Vulcan-74 will be much easier to use.
I did like the IDE connector though, it was very robust.

Again, thanks for your suggestion, I will certainly by adding dual power lines as a precaution.

Cheers,
Radical Brad


Dr Jefyll wrote:
Oneironaut wrote:
VCC : 1
GND : 1
This might be acceptable using soldered connections, but it's a weak point if a connector is involved.

I'm sure I'm not the only one who's had the experience of curing faulty electronic gear simply by undoing the connectors, giving 'em a dose of contact cleaner spray, then reconnecting and putting the "repaired" :roll: device back in service. The gear that's most prone to this action features cheap connectors and -- less forgivably -- no redundancy on key connections such as GND.

Quote:
now I can get away with a 20 pin connector
I urge you to consider using 24 pins (or whatever the next larger size is) so you can provide at least two GND pins. Maybe double up VCC too -- and you'll still have extra pins for Clock or whatever comes to mind later.

cheers,
Jeff


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 05, 2015 7:58 pm 
Offline

Joined: Sun Aug 30, 2015 10:23 pm
Posts: 36
Have you considered a kickstarter/indiegogo to raise money to produce PCBs and cases?


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 05, 2015 8:04 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
My goal is not so much to sell parts or make $$$, but to simply give back to the community.
Basically, an extension of the DIY projects I did on my other sites...

http://lucidscience.com/pro-showall.aspx

http://www.atomiczombie.com/DIY%20Tutorials.aspx

I would however, order a batch of parts or boards if there was enough interest, and just add shipping costs.
I do have a good contact at a PCB house, so I will see how large the final board turns out, and how much it costs.
If there is interest, I would also bulk order from Digikey. Nice breaks start at 50+ ICs.

Thanks,
Brad

porcupine wrote:
Have you considered a kickstarter/indiegogo to raise money to produce PCBs and cases?


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 06, 2015 1:07 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Dual Joystick functionality has now been implemented on the board.
Just a pair of 74HC245s that go active on the databus when the IO decoder drops their OE lines.

This completes the Video Section of Vulcan-74. The other board is completely open for the Sound Generator.

I will be doing one more demo program to exercise all Video functions and the Joystick ports.
From there, it will be the development of the Sound System.

Currently, the board looks similar to this, the only change being the addition of the 6502 compatible IO decoder and removal of the XMega.
A 40 pin DIP ATMega is now acting as the Cartridge during the final development stages, as I am comfortable with the C/ASM tool-chain.

Image
The second board will contain the Sound Processor.

Some previous videos, showing the Sprite Generator and bitmap handling capabilities of the Playfield Generator...

Image
https://www.youtube.com/watch?v=XuzK2BwvmKQ

Image
https://www.youtube.com/watch?v=3fXuFCxMHVI

Image
https://www.youtube.com/watch?v=CxonyIrZhDc

My next test demo will be a "physics" demo, showing a bunch of balls being dropped through a 512x2048 maze.
This will test several functions such as Playfield scrolling, direct memory reads (for collisions), Sprite Generation, and the Joystick.

.... until the next rain (or snow) day!
Radical Brad


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

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
The Video System testing is now complete, and everything works perfectly.
For this test, I worked out all of the Video, Sprite and Playfield functions. These commands will be common to all processors and micro-controllers, making up what I call the Kernal routines. All routines will be optimized assembly for their platform, callable from the C main loop. Here are the AVR calls...

Code:
extern int GPU_Startup();
extern int ReadJoystick(uint8_t);
extern int SetMemory(uint8_t);
extern int DrawVideo(uint16_t,uint16_t,uint8_t);
extern int ReadVideo(uint16_t,uint16_t);
extern int SwapVideo();
extern int RunSprite(uint16_t,uint16_t,uint16_t,uint16_t,uint32_t);
extern int ReadSprite(uint32_t);
extern int DrawSprite(uint16_t,uint16_t,uint8_t);
extern int SetAlpha(uint8_t);
extern int RunPlayfield(uint16_t,uint16_t,uint16_t,uint16_t);
extern int SetPlayfield(uint8_t);
extern int ReadPlayfield(uint16_t,uint16_t);
extern int DrawPlayfield(uint16_t,uint16_t,uint8_t);


This may not look like a lot of commands, but they offer a LOT of power for a minimum of overhead.

This command will use about 60 processor cycles, but can move a 400x300 image around the screen easily.

Code:
RunSprite(Ball_X,Ball_Y,Width,Height,8Ball[Rot]);


100 large sprites flying around (including alpha pixels) is no problem for the Vulcan hardware.

For this test, I decided to use floats for all variables, just to see if there would be any slowdown!
I gave myself 2 hours max to do this one, and that time included making the wall and 8-ball graphics in photoshop...

Here is a quick video...

Image
https://youtu.be/HqSYwKYwtOo

60 frames per seconds was no problem at all, even dropping the AVR clock to 2MHz!
To make this code even more "inefficient", the collision between the ball and ledge is Raytracing in floats!!!
The background image is 1024x1024, and the sprite is 128x128 in size. No more balls next time... promise!
It's too bad that filming the screen looks so choppy and washed out, the real deal is so smooth and bright!

Image
Pure floats, and raytraced collision detection!

I am now moving on to the Sound Generator Hardware.
Time will be in short supply for a while, but I will poke at it when I can and post the progress.

Cheers!
Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 10, 2015 12:44 am 
Offline
User avatar

Joined: Sun Oct 18, 2015 11:02 pm
Posts: 428
Location: Toronto, ON
Very impressive Brad ... I gotta believe this is setting a new threshold for "possible". Cheers!

_________________
C74-6502 Website: https://c74project.com


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 10, 2015 1:07 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Thanks!

Once the Sound is working, I will put some real time into making some demos /games that really show what it is capable of.
I am really pleased with the PlayField Generator. Funny, it was only an afterthought, but really puts some kick into the system.

Here is the bitmap that it is tossing around without breaking a sweat...

Image

I know in today's gaming world, a 1024x1024 image is not that impressive, but this is only 1980's logic!
Actually, I don't think Direct-X could scroll this as smoothly. Windoze always has a few hiccups when trying to move images smoothly.

I am now connecting all the VCC and GND for the new board, and hope to start laying out the sound system.
4 channels must converge into one bus arbiter, so it will be important to plan out the landscape here.

Cheers!
Radical Brad

Drass wrote:
Very impressive Brad ... I gotta believe this is setting a new threshold for "possible". Cheers!


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 10, 2015 6:57 pm 
Offline

Joined: Sat Aug 15, 2009 8:08 pm
Posts: 29
Oneironaut wrote:
Image
This C-64 needs a few parts!

Radical Brad


Brad, I've never seen a blank C64 PCB! I wonder if you have a scanner and would be able to scan the PCB front and back at high resolution? It might be something interesting to preserve!

Steve

BTW, amazing project you have going!


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 11, 2015 8:56 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
No problem, when I have the chance, I will scan a few images and post them.
Somewhere in my vast collection, there is also a blank Vic-20 and Pet Mainboard.
I sure would like to find a ceramic 6502 as well one day! I have a ceramic 8088 and 8086.

Brad

sjgray wrote:
Oneironaut wrote:
This C-64 needs a few parts!

Radical Brad


Brad, I've never seen a blank C64 PCB! I wonder if you have a scanner and would be able to scan the PCB front and back at high resolution? It might be something interesting to preserve!

Steve

BTW, amazing project you have going!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 842 posts ]  Go to page Previous  1 ... 18, 19, 20, 21, 22, 23, 24 ... 57  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 34 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: