6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 16, 2024 10:19 pm

All times are UTC




Post new topic Reply to topic  [ 149 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8, 9, 10  Next
Author Message
 Post subject:
PostPosted: Fri Sep 16, 2011 2:26 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8492
Location: Midwestern USA
As long as we're talking about the Kowalski simulator, you should know that there is functionality in it that is undocumented. I will give you a little teaser and then explain more at another time. Here is a code excerpt from the SCSI driver I am writing for my POC unit:
Code:
;   53C94 interrupt status register masks...
;
c94irsel =@00000001            ;selected
c94irsla =c94irsel << 1        ;selected w/ATN
c94irrsl =c94irsla << 1        ;reselected
c94irso  =c94irrsl << 1        ;successful operation
c94irsr  =c94irso  << 1        ;service request
c94irdis =c94irsr  << 1        ;disconnected
c94ircmd =c94irdis << 1        ;invalid command
c94irrst =c94ircmd << 1        ;bus reset

Paste the above into a new code window in the simulator, assemble and use [Alt-6] to display the symbol table and look at the values generated for the above symbols.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 16, 2011 3:05 am 
Offline

Joined: Tue Aug 16, 2011 6:18 pm
Posts: 74
Location: USA Pa
I just want to convert Lee's Disassembly with the Serial port mod back to a bin file so I can load it to a Am29F010 Flash Mem.. Provided my TOP prom programmer decides to co-operate.. So what is the procedure and what windows based program or programs do I need to accomplish it.. Sorry but I'm not up to speed yet on the 6502 .. What little I did was many years ago with the Motorola 6802 and 6809... like in the early 1980's

_________________
When falling from a high place, You might as well try to fly


Last edited by falcon5252 on Fri Sep 16, 2011 8:37 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 16, 2011 4:03 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8492
Location: Midwestern USA
falcon5252 wrote:
I just want to covert Lee's Disassembly with the Serial port mod back to a bin file so I can load it to a Am29F010 Flash Mem.. Provided my TOP prom programmer decides to co-operate.. So what is the procedure and what windows based program or programs do I need to accomplish it.. Sorry but I'm not up to speed yet on the 6502 .. What little I did was many years ago with the Motorola 6802 and 6809... like in the early 1980's
  1. Load the disassembled source code into the Kowalski simulator.
  2. Press [F7] to assemble.
  3. Press [Ctrl-K] to save object code.
  4. When the save code window opens, select "binary image", click the Options button to set the memory range, provide a filename and save.
The resulting file is pure binary and can be loaded into the buffer of most EPROM burner programs.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 16, 2011 2:21 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
Falcon, can you send a picture of the arcade board? I work in arcade games and can help you identify it, if you wish.

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 16, 2011 6:55 pm 
Offline

Joined: Tue Aug 16, 2011 6:18 pm
Posts: 74
Location: USA Pa
Tony ... Just emailed you a photo of the board,, It was listed as a Star Arcade 6502 CPU Board.. I saw the Rockwell symbol, And could only read the Rxxx2P2, Going by the Rockwell datasheets figured it had to be a 2mhz 65C02P2...

B.D.D .... Thanks for the procedure to get a BIN file.. This is all new, And figuring out what programs to use, Is a bit daunting being they span 30 years, and various operating systems, and some are computer specific, Atari, Comodore, Apple and so on..... Plus minor differences in ASM format from one program to another...AAAH!!

Lee ... Been browsing the disassembly , Need to ask a few questions
1 - Are the I/O addresses set as global declaration for the start address location meaning they can be changed by changing one 16 bit word in the code for the start address for each I/O device...

2 - Can the program memory also be moved by setting a new global base address, For program RAM size & Location . leaving page 0 & 1 just for CPU housekeeping .. I take it both the base address and the memory test routine would both have to be altered... Or is it allot more complicated than I'm thinking.. My goals are, One port it to the new board I just bought .. And better decode the I/O to to free space for more memory and or additional I/O.. It would to be nice to decode all I/O addressing and move all I/O to a 2k block from $0900 to $0FFF

3 - EhBasic .. Does a program written in EhBasic when run create compiled code in memory or is it interpreter based program..

4 - Is there a 6502 Basic that can be compiled or am I out of luck on that...

_________________
When falling from a high place, You might as well try to fly


Last edited by falcon5252 on Fri Sep 16, 2011 10:07 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 16, 2011 9:19 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
Falcon: thanks. I cant get it until I get home. You can always link it up on here, of course. I can still read on here :D

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 16, 2011 9:20 pm 
Offline

Joined: Fri Aug 30, 2002 2:05 pm
Posts: 347
Location: UK
Quote:
Did you see any evidence of Acel & Decel ramps in the stepper control code or was it just advertising hyp

Ah, found it, I've not worked out the details but it looks like long movements do things with the timer values.

Also all movemets start and end together, the shorter moves being run more slowly.

Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 16, 2011 9:44 pm 
Offline

Joined: Tue Aug 16, 2011 6:18 pm
Posts: 74
Location: USA Pa
WoW wasn't expecting that ... Great for robotics where getting from point A to B should be a fluid movement .. But if your doing CNC with it you would have to just send 1 Axis move at a time or it would alter the shape your trying to produce... I will have to try it once I'm up and running again and see how it behaves..

_________________
When falling from a high place, You might as well try to fly


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 16, 2011 10:12 pm 
Offline

Joined: Fri Aug 30, 2002 2:05 pm
Posts: 347
Location: UK
I think this is what you would want your CNC machine to do.

You send it start and end coordinates and it moves between them in as close to a straight line as possible.

The TeachMover does that in six dimensions simultaneously.

Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Sep 16, 2011 10:17 pm 
Offline

Joined: Tue Aug 16, 2011 6:18 pm
Posts: 74
Location: USA Pa
Pretty astounding little program for just 4k of code... Starting to see where the 6502 fast Interrupt response comes in handy for robotics..

Lee ... Thought I would mention this because its probably embedded in the code your looking at and may cause confusion as to what you are seeing... Because of the way the Robot is cable driven, As you move the shoulder and elbow the gripper cable changes length so the gripper motor has to constantly readjust to keep the jaws in the same relative position... You may also find other code that compensates for cable length changes, Like the shoulder affecting the elbow cables .. It's one of the downfalls of cable drive... but I keeps the Robot from having to lift the weight of its own motors..

With Concurrent movement, It depends On what you were trying to do, It can be a Plus or a Minus... But as long as you were aware of how the program operates.. You can easily modify the way you send the control commands, To get your desired result... Maybe the TeachVAL program lets you send Simultaneous or Sequential move command sequences... like you may want to move up and left at the same time to move a cutter to a new start point, But then straight down 50 steps as when placing the cutter on the project and then cut material for 200 steps to the right... You wouldn't want the last two commands to run concurrently..

Question; Anybody chime in,, On the Microbot board they are double inverting Phi2 using 2 inverters in the LS14, In essence creating a 40ns delay line on that clock signal going to all chips that require it including the LS138 decoder, Can anybody think of a reason why they are doing that... Seems it would break some rules and possibly cause some overlap with Phi1 on the trailing end of Phi2...

_________________
When falling from a high place, You might as well try to fly


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Sep 17, 2011 1:24 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
falcon5252 wrote:
Is there a 6502 Basic that can be compiled or am I out of luck on that...

[plug] A robot like that is an ideal vehicle for becoming acquainted with the Forth programming language! From the Wikipedia article on Forth:
Quote:
A Forth environment combines the compiler with an interactive shell. The user interactively defines and runs subroutines, or "words," in a virtual machine similar to the runtime environment. Words can be tested, redefined, and debugged as the source is entered without recompiling or restarting the whole program.

Memory requirements for Forth are modest and the performance varies from fast to blistering. And you can count on lots of enthusiastic support from the Forth fans on 6502.org :D [/plug]


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Sep 17, 2011 3:04 am 
Offline

Joined: Tue Aug 16, 2011 6:18 pm
Posts: 74
Location: USA Pa
FORTH May be compact and powerful but doesn't look like the syntax is very intuitive to learn.. I looked at a couple of code sequences very abstract language...I don't know if I'm up to the challenge... I think I'll stick with Basic for now.. I could put in one of the Banked flash memory blocks and toy with it .. How much prom space does it require

_________________
When falling from a high place, You might as well try to fly


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Sep 17, 2011 3:59 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
falcon5252 wrote:
FORTH [...] doesn't look like the syntax is very intuitive to learn..
Fair enough, I admit it may seem alien. But if an experienced person were there and you could watch as they whipped up and tested some robot Forth, the light bulb would go on for you in a big way. I bet a live tutor would have you flying in short order. Hard to convey that except in person, though.

Quote:
On the Microbot board they are double inverting Phi2 using 2 inverters in the LS14, In essence creating a 40ns delay line on that clock signal going to all chips that require it including the LS138 decoder, Can anybody think of a reason why they are doing that... Seems it would break some rules and possibly cause some overlap with Phi1 on the trailing end of Phi2...

Some extension of the trailing edge of Phi2, yes exactly. I haven't studied the wiring details but the delay would have been added to improve their timing margins. When the 6502 does a read cycle it records (latches) what's on the data bus data at the end of Phase 2 (no added delay). If the device being read (ie, driving the bus) continues driving the bus a few extra nanoseconds, that guarantees valid data remains until well after the 6502 has "taken the picture," as it were. There are actual spec's for all this, of course -- setup time, hold time etc, as shown on the data sheets for the devices in question. Hope that helps,

Jeff
ps- instead, it's also possible their concern was with a write operation. It's more than I can explain at the moment, but the same general principle applies: the transmitting device needs to put valid data on the bus and the receiving device has to capture it -- all within mutually acceptable timing windows. The 'LS14 inverters delay the peripheral device but not the 6502. Presumably they thought the relative timing between them would be better with the peripheral device delayed.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Sep 17, 2011 5:33 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8541
Location: Southern California
Quote:
FORTH May be compact and powerful but doesn't look like the syntax is very intuitive to learn. I looked at a couple of code sequences very abstract language. I don't know if I'm up to the challenge. I think I'll stick with Basic for now.. I could put in one of the Banked flash memory blocks and toy with it .. How much prom space does it require

Actually, Forth hardly has any syntax. :D It's not hard to learn, but it is an entirely different way of thinking; and it was my experience that although I initially thought I saw things it would never be able to do, at least not gracefully, as I gained experience I found that it not only could do them, but extremely elegantly-- it's just that much of the capability does not initially meet the eye. Its extreme flexibility tends to make good programmers better and bad ones worse.

You can get under the hood and modify or extend the compiler itself, for example to make a new kind of program structure or data structure or other defining words, or even define new operators. Forth had the tools to do OOP even before it was called that. (You don't particularly have to understand that yet just to get gong though.) You can develop applications much more quickly than you probably ever thought possible, and with less debugging necessary. You can mix assembly in with high-level Forth, and you can also write words (routines basically) in high-level Forth to prove a concept and then re-write them in assembly for maximum performance if desired, without changing the routines that call them. You can dictate that your creations will have one behavior at compile time and another one at run time. Everything you write becomes part of the language itself.

Uh-oh, I feel myself starting to be an excited salesman again. I better stop.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Sep 17, 2011 12:12 pm 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
If one were interested in just getting started with Forth, let's say on a C-64 system, what book or program would you guys recommend?

And just for comparison what type of environment are you both (Jeff & Garth) using Forth on now? compared to the early days of home computers?

_________________
65Org16:https://github.com/ElEctric-EyE/verilog-6502


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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: