6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 01, 2024 12:36 pm

All times are UTC




Post new topic Reply to topic  [ 321 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 22  Next
Author Message
PostPosted: Fri Mar 24, 2017 4:41 am 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
Also, as I am about to tackle the ACIA (I'm going with the Rockwell part), a question about monitor programs comes to mind. Since everyone's setup is likely different, how do they typically do I/0? Are they serial based, and I just have to alter the appropriate addresses in the code to have it work on my setup? I presume just about any monitor I find around here will include source code, right?

Also, since I've already found that my assembler (ACME) doesn't seem to recognize allot of directives I find in all my books (like .org and .word), is it customary for someone to mention the best assembler to use to assemble their program? I'm finding only scarce documentation on the ACME assembler, so I'm kinda thinking of trying something else, unless one can persuade me otherwise.

I'm also on the hunt for a proper text editor that works well for this kinda thing. I first tried the JOE editor, and it wasn't my thing. Wasn't a fan of the interface at all. I'm currently using Windows Notepad, which works fine, but I'd like something well geared towards 6502 assembler. Something that indents properly out of the box, and hopefully does different colors for various code aspects. I've used Atmel Studio (Visual Studio based) a fair amount, and having a "meant for coding" editor is something I love. The editor part, not the over bloated behemoth part :wink:

I searched for IDE's, and came up with nothing. An IDE isn't that important as just a decent editor to me though. In fact, at first I was sure I'd hate having to use the command line prompt to run my assembler, but its actually a pretty efficient way to do it surprisingly!


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 24, 2017 5:06 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8534
Location: Southern California
What system do you want the editor to run on? UltraEdit is a popular programmers' text editor today and is available for Widows and Linux. I know a professional programmer (actually has his own company to program for business applications) who swears by it. I use the last version of MultiEdit that they had for DOS, which has probably thousands of features, and even in DOS (which I use a hi-res monitor for, not the old boxy, clunky 80x24 everyone thinks of DOS using), I've had up to about 36 files open at once, tiled and windowed in lots of custom ways. Other than actual text entry, it's all point-and-click or click-and-drag for windows, menus, etc.. It can interface to different assemblers and compilers to take you right to the errors, do custom indentation, macros, yada, yada. Unfortunately, today MultiEdit is only being provided for Windows. When I called them, they said they were getting a lot (note the correct spelling of "a lot") of requests for a Linux version though, so they're planning on coming out with that (but who knows when).

Every time I hear "ACME," I think of the coyote trying to catch the roadrunner in the TV cartoon when I was a kid. He always had a box of dynamite or something with the "ACME" brand on it. :lol:

_________________
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 Mar 24, 2017 6:42 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8468
Location: Midwestern USA
Dan Moos wrote:
My wife was unimpressed with the two lit LEDs, but I'm ecstatic because they meant my computer added 1 +2 successfully :P

Don't feel bad. My wife is generally unimpressed with all this electronic gimcrackery as well. The only time she gets impressed is when a client sends a large check as payment for me getting his electronic gimcrackery running. :D

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 24, 2017 6:56 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8468
Location: Midwestern USA
Dan Moos wrote:
Also, as I am about to tackle the ACIA (I'm going with the Rockwell part), a question about monitor programs comes to mind. Since everyone's setup is likely different, how do they typically do I/0? Are they serial based, and I just have to alter the appropriate addresses in the code to have it work on my setup? I presume just about any monitor I find around here will include source code, right?

Most monitors have hooks in the program that you edit to point to your character input and output functions. You have a bit of a chicken-and-egg situation, in that you need to write enough code to have working I/O, but can't debug the code without a working monitor. Welcome to the brave world of bare metal development. :D

Quote:
Also, since I've already found that my assembler (ACME) doesn't seem to recognize allot of directives I find in all my books (like .org and .word), is it customary for someone to mention the best assembler to use to assemble their program? I'm finding only scarce documentation on the ACME assembler, so I'm kinda thinking of trying something else, unless one can persuade me otherwise.

I use the Kowalski editor/assembler/simulator (runs on Windows) for developing 65C816 code. You can use it to develop 65C02 programs and export them in several different formats after assembly. The editor works well, the assembler has a good macro language, and there is context-sensitive help.

Quote:
I'm also on the hunt for a proper text editor that works well for this kinda thing.

In addition to using the editor that is part of the Kowalski simulator, I use UltraEdit. I have tried Notepad++, but was unimpressed.

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


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 24, 2017 9:58 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1385
I'm also using UltraEdit (and they now have an OSX version) but I'm using the Windows version. I started using WDC Tools (licensed copy) back in 2013. TIDE isn't anything to write home about, but I've got a config/setup that runs everything I need in a Windows 7 VM. I use ExtraPutty as a terminal program to chat with my SBC and use an FTDI USB/Serial adapter to attach to the Windows VM. This provides a good dev environment, a console front end to the board and Xmodem download to the board. Then again, you do need some way to initially program the EEPROM, so I have a Dataman 40Pro programmer also running under the Win7 VM and I use ExpressPCB loaded for schematics and PCBs.

As noted, bare metal development... you gotta start somewhere. I grabbed some old BIOS code I did back in the 80's for the 6551 (on a Vic-20) and updated it. I then added timer/port support for the 6522 and put everything into a small BIOS (768 bytes). This provides a simple startup for the processor, sets up vectors, I/O config, initializes page 0 and the stack and shows the BIOS and clock speed before jumping to a vector for the Monitor entry point. You're more than welcome to take a look at the code and/or use it to verify that your hardware is functioning properly.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 30, 2017 4:46 am 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
Ok, here's the current state of things.

My hardware seems to be working as it should. I just got the ACIA (Rockwell 65c51) talking to my pc through an FTDI USB/serial adapter.

Haven't attempted getting info IN to the ACIA from the PC just yet, but I can get info out no prob. Using RealTerm on Windows as my terminal program.

I want to put Darryl's SBC-2 monitor and assembler on my EEPROM. I have downloaded everything, and have some questions.

I realize in the .asm file that defines the ACIA's addreses, I need to substitute my setup's addreses. Is that all I need to do software-wise for that?

Which serial handshaking lines do I need to for sure have hooked up?

I have one VIA, whereas it seems the SBC-2 monitor is setup for 2. Does that mean I just need to change one of the VIA addresses in Darryl's code, and just ignore the second one?

Is there somewhere where I need to let the code know my RAM start and stop addresses?

Anything else I need to customize to my setup?

About the TASM assembler. Do I just need to put all the .asm files in one folder, and run the TASM command as it is shown in Darryl's README?

Thoughts on TASM in general: I'm currently using ACME, but it seems its assembler directives are often different than what I see in most of my books. Darryl's code looks more in line with what I tend to see, so to me that is a reason to investigate it. Is it decent?

Thanks as usual. I have had much quicker success than I expected on this project, thanks to the good people here.


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 02, 2017 3:46 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10971
Location: England
Great to see this work-in-progress thread!


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 02, 2017 8:24 pm 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
Now that I've got the root hardware up and running, my project is at a crossroads.

My next hardware goal is to no longer need the terminal connection to the PC. Keyboard should be simple enough. Just finished looking over the PS/2 protocol, and it's fairly straight forward. Video is still in the decision making stage. Garth brought up SPI controlled graphics displays. I like the sound of that because it is a good mix of diy video, but not completely from scratch. I see that method as a bridge to an eventual true VGA or composite from scratch interface. Fits nicely with the whole incremental complexity thing I'm going with.

Software is probably my most immediate goal. I'm torn between modifying an existing monitor/OS, or rolling my own. The more I ponder it, the more rolling my own sounds appealing. I am leaning that way. Since this computer is just a goal into it's own, I'm in no real hurry, so the instant gratification of dropping something premade in ROM doesn't really matter to me.

Honestly, I thought getting to the point of having a working build would be allot tougher/longer road. The only real hiccup has been a self-inflicted wound from a rookie misread of a data sheet. I got the hardware up and running ahead of schedule, so my study of 6502 assembly needs to catch up!

Here is a current pic:


Attachments:
KIMG0082.JPG
KIMG0082.JPG [ 1.68 MiB | Viewed 893 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 02, 2017 10:04 pm 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
Just discovered Michal Kowalski's editor/assembler/simulator.

I like it.


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 02, 2017 10:44 pm 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
Ok, with Kowlaski's setup, I can't seem to actually get a binary. I can use the simulator, but can't actually create a file to put on an EEPROM.

I tried "save code", but its always just zeroes. Feel like I'm missing a step.

This thing is an actual assembler, and not just a sim, right?

I'm loving the editor. The little context sensitive help window is gold for a beginner like myself


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 02, 2017 11:44 pm 
Offline

Joined: Sat Oct 20, 2012 8:41 pm
Posts: 87
Location: San Diego
Dan Moos wrote:
Ok, with Kowlaski's setup, I can't seem to actually get a binary. I can use the simulator, but can't actually create a file to put on an EEPROM.

I tried "save code", but its always just zeroes. Feel like I'm missing a step.

This thing is an actual assembler, and not just a sim, right?

I'm loving the editor. The little context sensitive help window is gold for a beginner like myself


I usually use Intel-HEX format but when you select binary there will be an options button enabled and you can enter a start and end address.


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 03, 2017 1:50 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8468
Location: Midwestern USA
Dan Moos wrote:
Just discovered Michal Kowalski's editor/assembler/simulator.

Make sure you are running the latest version, which is 1.2.12.

Quote:
Ok, with Kowlaski's setup, I can't seem to actually get a binary. I can use the simulator, but can't actually create a file to put on an EEPROM.

I tried "save code", but its always just zeroes. Feel like I'm missing a step.

First of all, be sure to set a starting address for assembly, using a directive such as * = <address> in your source code. While your source code is loaded into the editor press the [F7] key to assemble it.

Upon successful assembly, type [Ctrl-K] to save object code into a file. Within the save code dialog, select the "save as type" as a binary image, .65b. Next, click on "options" and set the address range to be saved. Generally, the starting address will be the same as used with the * = <address> directive at the beginning of the source code. The ending address will be whatever corresponds to the end of the expected object code. When I assemble my POC V1 ROM, the starting address is $E000 and the ending address is $FFFF, since that is where the code will appear in the system. With the address range set up click "Save" to save to a binary file. The binary can then be directly loaded into an EPROM burner.

Additional note with the Kowalski assembler: the following directive should be the very first line in your main source file:

Code:
   .opt proc65c02,caseinsensitive

The above tells the assembler to permit the use of 65C02 instructions and to make labels and symbols case-insensitive. It is only necessary in the main source file, not INCLUDE files.

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


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 03, 2017 3:05 am 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
One point of confusion.

Lets say this is the only think I want to put in my 32k ROM

And also lets say I want it (just for the sake of argument) to be loaded starting at the beginning of ROM)

So that would be starting at $0000 in the physical chip.

But my ROM starts at $8000 in my memory map, and as such, my code starts with a "=* $8000" statement

Wouldn't I still want the assembler to start the binary file at $0000, since that is where the burner should put it on the physical chip?

Whats more, if its the only thing on my ROM, than I also will have my reset and IRQ stuff at $FFFA and on through $FFFF. So I would want a binary that was burned physically from $0000 to $7FFF, even though the code actually resides from $8000 to $FFFF

all that being said, what would I want to tell the save file routine for a range? I tried basically what I just said, and got a file with all zeroes.

I'm gonna try again, just to see if I did it wrong.


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 03, 2017 3:12 am 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
Never mind, it basically came down to a typing error. It worked perfectly.

I'm loving this editor, and the sim is just icing on the cake! I'm too new to critique the assembler. Using @ instead of % for binary messed me up at first, but other than that, it seems to be much more complete when it omes to assembler directives than the ACME assembler I had been using. Also, as i said before, the help box that pops up when you type keywords in is a godsend to a newbie like me.

Nice work Mr. Kowalski, whoever/wherever you are!


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 03, 2017 3:14 am 
Offline

Joined: Sat Mar 11, 2017 1:56 am
Posts: 276
Location: Lynden, WA
BDD, mine says 1.2.11.

Is 1.2.12 worth upgrading to, and where is it?


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

All times are UTC


Who is online

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