6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Sep 09, 2024 7:38 am

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: MC6847 routines
PostPosted: Tue Mar 06, 2012 4:59 am 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Are there some useful routines for displaying/managing text or graphics for the MC6847 CRTC(something compatible with EhBasic)? As i managed to get my video module working, i would now like to be able to use it properly.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 11, 2012 1:38 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Is there any computer based on the 6502, and that it uses the MC6847?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 11, 2012 2:40 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10928
Location: England
Wikipedia says acorn atom
http://en.wikipedia.org/wiki/Motorola_6847
http://www.old-computers.com/MUSEUM/computer.asp?c=80


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 11, 2012 4:28 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Where could i find the Atom's os?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 11, 2012 4:59 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10928
Location: England
There's a zip file here
http://mdfs.net/Docs/Comp/Acorn/Atom/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 11, 2012 7:13 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
The rom files need decompiling, any recommendations?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 11, 2012 8:10 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10928
Location: England
I've never used it but this got a mention the other day
http://myweb.tiscali.co.uk/pclare/DASMx/

There's also Ruud's disassembler
http://www.baltissen.org/newhtm/auto_dis.htm


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Mar 11, 2012 9:20 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Ill give it a try, i hope i will find the routines, if not, ill have to write them myself...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 12, 2012 10:52 am 
Offline
User avatar

Joined: Tue Nov 16, 2010 8:00 am
Posts: 2353
Location: Gouda, The Netherlands
A few years ago I found some disassembled Acorn Atom ROMs, nicely commented. Since I can't find them on-line anymore, I put a copy on my web server:

Atom Basic
Atom OS

For the text/graphics routines, you'll need the OS ROM. Note that the Atom OS did not have code to write text in the graphic modes. There are however some plot routines (mode 0) that could use the special graphics characters in text mode to draw some (very low res) graphics.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 12, 2012 11:05 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10928
Location: England
That's excellent.

I've found a copy linked from here which is part of a Splitting the Atom book online describing the ROM


and nearby some more Atom resources
http://www.atomclub.nl/atom_handleidingen/utility.html Manuals for some utility ROMs?
http://www.atomclub.nl/software/ROMS.html some ROMs

Here's a suitable entry page - it's a mirror of Keith Howell's site (defunct)
http://www.atomclub.nl/sites/Fpga/www.h ... m/Atom.htm


Top
 Profile  
Reply with quote  
 Post subject: Re: MC6847 routines
PostPosted: Thu Mar 15, 2012 12:43 am 
Offline

Joined: Mon Mar 02, 2009 7:27 pm
Posts: 3258
Location: NC, USA
Dajgoro wrote:
Are there some useful routines for displaying/managing text or graphics for the MC6847 CRTC....

I've used the 6845(very similar) in a monochrome graphics project for graphics routines, and it depends how you have the lower address lines hooked up to the video ram. This will determine how the graphics routines shift out the bits to display graphics.
You can manipulate the address bus order from 6847 to RAM so you have an Atari scheme or hook it up straight and have a C-64 scheme. You need to do some research, but I've written a fast plotting routine that was <128 bytes for the C-64.
Dajgoro wrote:
... i hope i will find the routines, if not, ill have to write them myself...

That is usually the best route to get what you want.


Last edited by ElEctric_EyE on Thu Mar 15, 2012 1:13 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 15, 2012 2:09 am 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
Thanks a lot for the help, i think i will write them myself, but i will peak in the atoms os a bit...
As for the hardware, i connected all the lines normally, without any special patterns.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Mar 21, 2012 6:37 pm 
Offline
User avatar

Joined: Mon Dec 08, 2008 6:32 pm
Posts: 143
Location: Brighton, England
If you want to use a text-mode screen (which I suspect is what you want with EHbasic) study the Atom OS routine OSWRCH. It handles writing a character to screen, including changing from ASCII to the 6847 character set (lower case letters appear inverted) and detecting and acting on special characters (CR, LF, etc). It also includes functions for clearing and scrolling the screen and moving the cursor. It also implements a software cursor. The routine expects memory data bit 7 to be connected to the 6847's invert pin. This can be a permanent connection since the invert pin has no effect on pixel-mapped displays.

Study the Atom OS line drawing routines - they are supposed to be optimised for speed and so, while not the easiest to understand, do perform well.

_________________
Shift to the left,
Shift to the right,
Mask in, Mask Out,
BYTE! BYTE! BYTE!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

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