6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 11:17 am

All times are UTC




Post new topic Reply to topic  [ 125 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9  Next
Author Message
PostPosted: Thu Jan 03, 2013 8:46 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
Commie wrote:
Hi Garth,

I have kb9 up and running which I can use for calculating electrical data, there's no problem there but the problem I see is not a hardware problem, it's software.Coding in assembler is like designing a 4 layer pcb board, after a few hours it totally drains me of energy. Sure I can build a 65816 SBC based on the latest chips but what about the software? what am I going to fill it with?

All the more reason I need to get my '816 Forth cleaned up and ready for publication. I would like to port it to an available SBC also, so the newbie can have something that works immediately, right out of the box. When I developed my system years ago, an old boss took a look at it. He had moved on to another company and they had just spent $8,000 on a C development system for Motorola microcontrollers, and he admitted they did not have nearly the interactivenss and freedom I had with my simple Forth system. I do see the 6502/816 community very slowly becoming stronger and more cohesive over the years. There's a much greater inventory of professionalism on 6502.org today than there was five or ten years ago. I wish it were developing faster, but it is going in a good direction.

Quote:
Just to make a comparison, I'm also using AVR chips coupled with Bascom AVR, the latter supports single and double 64 bit floating point with transcandential math functions and it can be had for less than £100.Whether you use them in your application is up to you they are nice to have on hand.

In my opinion, if the 6502 is going to compete or stay alive then really it needs a supporting powerful compiler.

Yes I know, wdc sell one for $400.00 but I bet you it only supports WDC's 6502 chips, i.e.' it probably wouldn't work with Rockwell parts or any other 6502 for that matter.

WDC's have been the only ones in production for many years (most of them being made by licensees, not WDC itself), and the production volumes are in the hundreds of millions of units per year, although rather invisible as they go into things like engine controls instead of desktop computers. WDC used to charge an arm and a leg for the programming manual, but in recent years has been free online. Hopefully they will do the same with the compilers. I can see where a company might not really want to support hobbyists (I definitely see this at the electronics industry trade shows) because it can turn into a lot of hand-holding with no significant immediate sales; but if they can afford to do it, I think it is a good investment, because later on, some of those hobbyists will end up using what they know in their jobs, designing the processor into products. The added popularity of the processor also improves the general support for it.

In 1987 I wrote a small set of 7-digit decimal floating-point functions in 6502 assembly for a product at work. What a lot of clock cycles it took! A couple of years later I was introduced to fixed-point and scaled-integer math, how you typically use 16-bit cells (sometimes with 32-bit intermediate results) on 8-bit computers, and scale the needed range of numbers to what the cells can handle. At first I was very skeptical; but eventually I came to prefer it (in systems with no floating-point coprocessor). I guess I should post 6502 & '816 routines for the transcendental math functions. They should also go in the 6502.org wiki. (Actually you could probably get them for 6502 in Lee's EhBASIC, even if you didn't want to use the BASIC itself which is, BTW, a very, very good one.) I started heading toward even the transcendental functions in the primer on multiple-precision, scaled-integer, and fixed-point math, and was delinquent in getting very far; but got a lot of the concepts in later in the article on large look-up tables for hyperfast, accurate, 16-bit fixed-point/scaled-integer math. Since that was about looking them up in a couple of microseconds though, it did not get into calculating them which would be much slower.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 03, 2013 8:51 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Some of those hundreds of millions are Tamagotchi: https://plus.google.com/u/0/10704982391 ... Ty3N2eLvdt


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 04, 2013 11:02 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
BigEd wrote:
Some of those hundreds of millions are Tamagotchi: https://plus.google.com/u/0/10704982391 ... Ty3N2eLvdt

Very entertaining. Portions were hilarious! But what persistence! Is Natalie Silvanovich on this forum? If not, why not?

Edit: The original YouTube video link has gone dead. https://www.youtube.com/watch?v=KxeA33yhm7o works now (March 2, 2018).

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 04, 2013 6:10 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8509
Location: Midwestern USA
Commie wrote:
Coding in assembler is like designing a 4 layer pcb board, after a few hours it totally drains me of energy.

Aww, it isn't that difficult. :D I can go six to eight hours writing assembly language software and not feel tired, let alone "drained."

Quote:
Sure I can build a 65816 SBC based on the latest chips but what about the software? what am I going to fill it with?

There are any number of choices in that regard. One would be Garth's Forth package, which gives you both a basic operating environment and a programming environment. My POC, which is a 65C816 SBC, has a built in M/L monitor, which qualifies as software. How about EhBasic for a powerful programming language?

Quote:
In my opinion, if the 6502 is going to compete or stay alive then really it needs a supporting powerful compiler.

At the present rate at which the 6502 architecture s being used it's in no danger of extinction. As an example, the controller in my microwave oven has a 65C02 core in it.

Quote:
Yes I know, wdc sell one for $400.00 but I bet you it only supports WDC's 6502 chips, i.e.' it probably wouldn't work with Rockwell parts or any other 6502 for that matter.

WDC's TIDE (Terbium Integrated Development Environment) supports the entire 6502 cross-section, if you're willing to fork over the cost (it seems excessive in my mind, given that the money is in the sales of parts). As for Rockwell parts, why would you consider those in a new design?

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 04, 2013 6:55 pm 
Offline

Joined: Mon Nov 19, 2012 11:08 pm
Posts: 29
BigDumbDinosaur wrote:
WDC's TIDE (Terbium Integrated Development Environment) supports the entire 6502 cross-section, if you're willing to fork over the cost (it seems excessive in my mind, given that the money is in the sales of parts). As for Rockwell parts, why would you consider those in a new design?


Hi BDD,

Your other points noted, with regards to WDC's integrated development enviroment, I was refering to the supporting c compiler, it will probably only generate W65C02 codes so that the c compiler is W65C02 specific so no Rockwell parts allowed.
Why use Rockwell parts?, first of all they are good, you can abuse them and they still work and they run any third party code no problem. Secondly, I have hundreds in stock and there are hundreds for sale on ebay at low low cost.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 04, 2013 9:24 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
Quote:
Secondly, I have hundreds in stock

Aha! I think that one is more likely the first reason! :lol: It makes sense if you're on a tight budget, like Dajgoro was talking about. I probably have 100-200 Rockwell 65c02's, but they're only a fraction as fast as WDC's. I also have 110 NMOS 6512's which I should probably eBay because I definitely won't ever use them. I got them from Jameco on closeout in the late 1980's for a project I never went through with.

On assembly language, as someone else here said, "65x02 is wonderful. Programming 65x02 feels like vacation; you cannot get tired doing that. It is natural, logical, it doesn't give you headache." (Take the "&start=6" off the URL to see the beginning of the forum topic.) Good comment notwithstanding, I have definitely seen plenty of assembly code here that almost does give me a headache, but the same can be said of higher-level languages. After all, you can't do this in assembly:

for(;P("\n"),R-;P("|"))for(e=C;e-;P("_"+(*u++/8)%2))P("|"+(*u/4)%2);

:lol:

Higher-level languages have their place, as does assembly. Assembly is needed for the highest performance; but a nice thing is that a little assembly goes a long way, meaning that most of the application can be in a higher-level language and you can get most of the needed performance using assembly in only certain small, critical parts. In Forth, I can switch into and out of assembly in the middle of a higher-level definition.

Some of the higher-level languages are rather poor at the down-to-the-metal bit-twiddling needed for some hardware applications, and assembly is sometimes more practical there.

I have been slowly working on improving the situation with assembly that I think you're referring to, partly by using macros to transfer what I've learned from higher-level languages, to assembly. One thing on my long to-do list is to improve the assembly program-structure macros article. It still won't have the interactiveness of Forth but it has become so much easier to manage than the way I used to write assembly 25 years ago.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 04, 2013 11:07 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8509
Location: Midwestern USA
Commie wrote:
Your other points noted, with regards to WDC's integrated development enviroment, I was refering to the supporting c compiler, it will probably only generate W65C02 codes so that the c compiler is W65C02 specific so no Rockwell parts allowed.

Pray tell. What are "W65C02 codes?" You do know (should know) that the W65C02S is THE STANDARD for the 65C02 MPU ISA, not the Rockwell part, right? The 65C02 was designed by Bill Mensch of the Western Design Center and Rockwell was one of several licensees for the product. The Verilog design flow that WDC sells to licensees can be, and often is, customized to a specific application, including the deletion of unwanted opcodes to reduce resource consumption in the target hardware.

In any case, the TIDE compiler can be told to not use any of the new CMOS instructions at all if desired (I don't recall the #PRAGMA that does it). Doing so would make the resulting machine code 100 percent compatible with the NMOS part.

Quote:
Why use Rockwell parts?, first of all they are good...

Yes they were—back in their day (1980s). But why go back to the days of buggy-whips and spats? The whole point of using the 65C02 is to gain more functionality and performance. Why throw away part of that by using an obsolete version of the 65C02? Also, if I recall, the Rockwell part maxed out at 4 MHz. The discrete W65C02S will run at 20 MHz with ease—much faster in ASIC designs (200 MHz in one case). Tell me you wouldn't want to achieve a 5:1 speedup in your code. :lol:

Quote:
...you can abuse them and they still work...

Really! Just what do you mean by "abuse them?" I fail to see that as a good reason to use any part, unless abuse is an intentional activity.

Quote:
...and they run any third party code no problem.

Not true. The Rockwell parts will not recognize STP and WAI as valid instructions. If you were to remove a W65C02S from a system using low-power programming techniques and replace it with a Rockwell 65C02 you'd have an inoperative piece of hardware.

Quote:
Secondly, I have hundreds in stock and there are hundreds for sale on ebay at low low cost.

As Garth noted, that might the only rational reason to use an obsolete microprocessor (other than no modern equivalent being adaptable). Even then, I'd think twice about it. I have a pile of narrow SCSI hard drives around here, but would not use them in anything new (I did use one for initial testing of POC's host adapter—a modern LVD drive is now connected). As for the eBay parts, I'll betcha the bulk of them are used pulls. Caveat emptor with a capital C and a capital E!

The whole point of my response is not to ridicule or criticize you in any way. It's to point out the fallacy of using cost as the deciding factor in a circuit design, as well as rebut some of your statements about programming. In any case, functionality should always come first in design choices, cost second. Otherwise, why bother?

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 04, 2013 11:35 pm 
Offline

Joined: Mon Nov 19, 2012 11:08 pm
Posts: 29
GARTHWILSON wrote:
Quote:
Secondly, I have hundreds in stock

Aha! I think that one is more likely the first reason! :lol: It makes sense if you're on a tight budget, like Dajgoro was talking about. I probably have 100-200 Rockwell 65c02's, but they're only a fraction as fast as WDC's. I also have 110 NMOS 6512's which I should probably eBay because I definitely won't ever use them. I got them from Jameco on closeout in the late 1980's for a project I never went through with.


No, thats not the reason, from the onset of my KIM build I was going to try and replace the R6532 RIOT chip for the W65C22 chip, with software mods, this done nothing would stand in the way of making my KIM a 14MHz speed microcomputer, take note WDC do not manufacture the R6532 or equivalent chips.
It also turned out that the WDC65C02 would not run KB9 whereas all Rockwell parts do and work perfectly even the Rockwell cmos versions work.
Being able to run KB9 is of extreme importance to my project. So alarm bells wringing, who are WDC and what are they about?
I have quite a few W65C02 and W65C22 parts available which I bought from Mouser just before I started my KIM project.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 05, 2013 12:33 am 
Offline

Joined: Mon Nov 19, 2012 11:08 pm
Posts: 29
BigDumbDinosaur wrote:
[size=110]
In any case, the TIDE compiler can be told to not use any of the new CMOS instructions at all if desired (I don't recall the #PRAGMA that does it). Doing so would make the resulting machine code 100 percent compatible with the NMOS part.


Hi BDD,

I've just got back from WDC website and regarding their c compiler or software tools and they say, and quote= The 65xx Professional Software Development Kit (ProSDK) is sold for use in development of products that feature 65xx processors from WDC and its licensees. The ProSDK is NOT for reverse engineering of our technology in any form and is NOT provided for development of commercial products that use non–WDC 65xx processors in Core or Chip form.




BigDumbDinosaur wrote:
[size=110]
Really! Just what do you mean by "abuse them?" I fail to see that as a good reason to use any part, unless abuse is an intentional activity.


I meant to say 'accidental' abuse or unintended abuse which is easily done when prototyping on breadboard

BigDumbDinosaur wrote:
[size=110]
Not true. The Rockwell parts will not recognize STP and WAI as valid instructions. If you were to remove a W65C02S from a system using low-power programming techniques and replace it with a Rockwell 65C02 you'd have an inoperative piece of hardware.


What about going the other way, supposing we have an old NMOS R6502P gone faulty, can we replace it with WDC65C02?, the truth is sometimes you can but sometimes you can't, see my other post regarding KB9.

BigDumbDinosaur wrote:
[size=110]
As for the eBay parts, I'll betcha the bulk of them are used pulls. Caveat emptor with a capital C and a capital E!


The parts I have bought of Ebay are all new old stock, when pulls are for sale the seller states 'refurbished' both the price and pin condtion reflect this.
With a close vizual inspection it's quite easy to see if they have been used or not.

Cheers
Darren


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 05, 2013 7:21 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
It would be very good to get to the bottom of this difference in behaviour, when running KB9, between the Rockwell and the WDC parts.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 05, 2013 8:03 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
I totally agree. I would really like to find out what instruction is causing KB9 to not work on the WDC part.
Quote:
So alarm bells wringing, who are WDC and what are they about?

WDC is the intellectual property holder of the 65c02. The founder and president, Bill Mensch, created the 65c02 shortly after starting WDC. Rockwell was a second source, not the originator. The 65c02 is 100% WDC's baby, and not anyone else's. Bill Mensch is also a co-creator of the MOS6502 and the 6800.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 05, 2013 9:12 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8509
Location: Midwestern USA
BigEd wrote:
It would be very good to get to the bottom of this difference in behaviour, when running KB9, between the Rockwell and the WDC parts.

I agree. This seems to be a really odd problem, given that the WDC part is the standard, not the Rockwell version.

Commie wrote:
So alarm bells wringing, who are WDC and what are they about?

As Garth noted, WDC is the progenitor of the 65C02 design. And as I early said, the W65C02S is the MPU by which others are judged for software compatibility. The Rockwell version is non-standard in that regard.

Something that I suspect is that KB9 is executing a machine opcode that is undefined on the Rockwell part (and is therefore—should be—a NOP) but maps to a valid instruction on the W65C02S. Another possibility is that an undefined instruction on the Rockwell part behaves as a NOP (as it should) but with a different size than the equivalent on the WDC part. Yet another could be some sort of instruction execution timing issue. Still another may relate to some sort of hardware design "feature" that would be unique to the Rockwell part. There's an answer for this somewhere.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 05, 2013 10:25 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
BigDumbDinosaur wrote:
Something that I suspect is that KB9 is executing a machine opcode that is undefined on the Rockwell part (and is therefore—should be—a NOP) but maps to a valid instruction on the W65C02S.

But we have the source, and there is no such opcode in there.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 05, 2013 5:53 pm 
Offline

Joined: Thu Mar 03, 2011 5:56 pm
Posts: 284
I've just read (or scanned) through this thread, and it looks like KB9 has only been loaded from tape; it might be useful to check if it works if it's loaded via the serial interface instead (using the "KIMtape" protocol).

Another option might be to generate a checksum of KB9 just after it has been loaded, and compare that with a checksum generated from a binary image, or with the checksum generated in the same manner with the Rockwell processor.

The reason that I think this might be useful is that tape interfaces appear to be tricky to get right, and it might be that subtle differences make the load operation fail on the WDC processor. Those differences might be in timing, electrical noise, whatever - take your pick :-)

Of course, if the checksums match, it's probably time to blame UFOs.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jan 05, 2013 6:00 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8509
Location: Midwestern USA
rwiker wrote:
I've just read (or scanned) through this thread, and it looks like KB9 has only been loaded from tape; it might be useful to check if it works if it's loaded via the serial interface instead (using the "KIMtape" protocol).

Another option might be to generate a checksum of KB9 just after it has been loaded, and compare that with a checksum generated from a binary image, or with the checksum generated in the same manner with the Rockwell processor.

Good suggestions. There is an explanation somewhere in there. It isn't FM, despite what it might seem.

Quote:
Of course, if the checksums match, it's probably time to blame UFOs.

Or sunspots.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 125 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9  Next

All times are UTC


Who is online

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