EASy68K  
It is currently Mon Dec 11, 2017 7:30 am

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: 68020 + 68881
PostPosted: Sat Oct 08, 2011 8:53 am 
Offline

Joined: Tue Oct 20, 2009 12:01 pm
Posts: 16
Location: scotland
Hi - I'm looking for a windows assembler that will assemble 68020 instructions plus also be able to handle 68881/2 floating point instructions.

Free of course!

It appears that the Easy68K does not handle FP instrutions

Hope you can help


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 08, 2011 4:45 pm 
Offline

Joined: Mon Jul 26, 2010 11:43 pm
Posts: 198
Location: Aurora, IL
IDE68K has a C compiler, assembler and simulator capable of supporting 68020 and 6888x instructions. I've used this quite extensively for analyzing and optimizing some 68E020+68882 code under my management.

http://home.kpn.nl/pj.fondse/ide68k/
http://home.kpn.nl/pj.fondse/ide68k/download.htm
http://home.kpn.nl/pj.fondse/ide68k/sof ... e68k22.zip

http://www.freescale.com/webapp/sps/sit ... de=MC68020

Under tools & software tab is this cross assembler, if you're a reasonably competent C programmer this can be compiled for other platforms, including the Win32 Console.
http://cache.freescale.com/files/archiv ... 00XASS.zip


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 10, 2011 6:16 am 
Offline

Joined: Tue Oct 20, 2009 12:01 pm
Posts: 16
Location: scotland
Thanks very much !!

Yesterday I won this on ebay :

http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=180732644394

Image


So I shall be able to develop some 68K floating point programs now....

Previouly I had been planning to wire-warap a 68881 to extend my current simple 68000 development board and then implement the Motorola application notes AN947 (MC68881 FP coprocessor as a periphial in a M68000 system) which uses macros to implement the FP instructions - but this new kit will allow me to by-pass that method. Still it was good doing the research on how to wireup a 68881 to a bog-standard 68000 system. I may still do that at some point.

Anyway thanks again for your prompt reply and link

cheers


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 10, 2011 9:49 pm 
Offline

Joined: Mon Jul 26, 2010 11:43 pm
Posts: 198
Location: Aurora, IL
The absence of a 6888x doesn't preclude the 68000 from performing floating point in software. Attaching the 6888x to a 68000 is a bit of a hack, it works much more effectively on the 020/030 designs, and the addressing modes are so much better.

Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2011 1:54 pm 
Offline

Joined: Tue Oct 20, 2009 12:01 pm
Posts: 16
Location: scotland
Oh yes I know - I implemented an FFT algorithm in 68K assembly and 'borowed' a set of FP library routines that implemented all the FP instructions using the standard 68000 instruction set.

The wire up of 68881 to a standard 68000 although not as neat as having the built-in co-processor interface like the 68020 etc - didn't look too bad a job!

Hear are some snippits of info I collected when I was planning to wire-wrap the add on 68881 to my current system :

An evening of wire-wrapping would achieve it :

Image

Then implementing the FP instructions using macros (Motorola application notes AN946)

Some Equates for the instructions :

Image

Some co-processor interface registers defines and more instruction fields :

Image

And then a set of macros to implement all the instructions types - the macros implement the comms with the Co-Processor directly via writes to the command register, read the response register and then do all the data transfers, if required, via the Operand register.

Here is one of the macros that does all word sized transfers of data out of the co-processor :

Image


As I say I may stilll do this little project at some point in the future.

But now as soon as my new kit arrives I will work on that for a while ....

That is a neat little card you posted a pic of. Pocket size so to speak :lol:

How do you communicate with it? Can't see any obvious I/O ports.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2011 2:51 pm 
Offline

Joined: Mon Jul 26, 2010 11:43 pm
Posts: 198
Location: Aurora, IL
You basically memory map the device into the 68K's regular address space, but then you have to read the control/status registers from the device's coprocessor interface state machine. I'd guess this would be a relatively expensive exercise to implement in 68K instructions, although I can see the appeal in trying.

The board pictured is on the back of a mezzanine stackup, the IO/PSU board connects to the header on the right, and has 3 serial ports.

The macro's can be found in MACRO881.ZIP
http://www.programmersheaven.com/downlo ... nload.aspx
http://www.retro.co.za/68000/MotorolaPD ... 7_REV0.PDF

ATARI made the 6888x board for the 68K ST, 74 series chips would appear to perform decoding.
http://www.maedicke.de/atari/hardware/sfp004.htm


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2011 6:08 pm 
Offline

Joined: Tue Oct 20, 2009 12:01 pm
Posts: 16
Location: scotland
Yes - that URL is where I sourced the Application note from. But nice find for the macros! - that will save me having to type it all in myself :wink:

thanks for all the links


Top
 Profile  
 
 Post subject: flite board
PostPosted: Thu Jun 21, 2012 12:15 pm 
Offline

Joined: Thu Feb 16, 2012 4:34 pm
Posts: 17
@wentworth:
How are your experiences with this Flite board?

Regards


Top
 Profile  
 
 Post subject: Re: 68020 + 68881
PostPosted: Sat Nov 16, 2013 6:35 am 
Offline

Joined: Tue Oct 20, 2009 12:01 pm
Posts: 16
Location: scotland
@hancock

Very good, a lot of fun has been had using it. I developed C code & ASM under the IDE68K environment & use Tera Term to communicate & send the Motorola S-record file down to the board.
& use the onoard monitor features to test & run it.

I've extended the board by filling the 8 spare RAM sockets, so it now has 512KB.

I also made up a 96way DIN connector & cable which plugs into the Flite expansion socket & the other end I have a vero board where I have wire-wrapped some DS1386 (32KB non volatile static RAM with Real time clock & watchdog timers) & I tested the interupts generated by the RTC & watchdog timer.
Regular time pulse IRQ & a watchdog timer that printed out the time in "HH:MM:SS YY/MM/DD" format on the screen at a specific time etc usual stuff...

Also written setup & IRQ handler routines for the onboard DUART & PI/T & driven some relays to switch some electric devices on/off & had the DUART IRQ reading & writting to a circular buffer in memory etc.

With the coding I've incorporated some pure assembler, some C with assemler code & IRQ routines interfaced with the C main calling program.

The IDE68K has a Micrium uC/OS-II (multi tasking Real time Kernel) system, & with just a few modifcations I was able to port that to work on the Flite. And have written multi tasking C systems that use all the features such as mailboxes, queues, semaphores etc etc. I was quite pleased with myself for that port. As it really gives some power to the whole system. I notice they have a TCP stack module, so I may well look at what h/w I would need to add to get that to work & then have network capability too.

There is plenty of spare room left on my VERO extension board & I'm going to add a multi-channel MUX & a high speed ADC so I can do some monitoring. Chips & sockets already bought, probably be a Winter project when the nights draw in.

So all in all it has been fun playing & experimenting with the baord over the last 2 years (on & off) If you get the chance buy one & I'll post all my project work for you to have a look at and maybe find some useful for re-use ....


Top
 Profile  
 
 Post subject: Re: 68020 + 68881
PostPosted: Sat Nov 16, 2013 7:29 am 
Offline

Joined: Thu Feb 16, 2012 4:34 pm
Posts: 17
That sounds phantastic and like everything I always wanted to do. Unfortunately I never found a board which was so close to my wishlist like this one.
On this board I would be missing the MMU (for a Linux port) - but I guess I was to demanding.
Today this is so "vintage" and as far as my sporadic checks show - it is very difficult to still get a board of the like.

Today I would be unhappy to use the Raspberry or Arduino...

I was playing around with CPM/68k within the Easy68k Simulator some time.
Still have a box of boards in the cellar, none of them achieves the convenience of the simulator and perhaps FYI:
Here is a modern implementation of such a system based current technology (in German only :-)
http://schuetz.thtec.org/nkc2/68020/68020.html
I was in the middle of building it, but gave up (too demanding for my toolbox.. :-)

I would be interested indeed in the details of the development environment, the tools and... some photos?!

Rgds


Top
 Profile  
 
 Post subject: Re: 68020 + 68881
PostPosted: Sat Nov 16, 2013 11:58 am 
Offline

Joined: Tue Oct 20, 2009 12:01 pm
Posts: 16
Location: scotland
Hi hancock, here some pics of the board attached to my laptop running Tera Term via a USB serial.
The solid state relays are switched by the on board PI/T. I made a mistake with the orientation of the 96way connector on my vero board, hence the awkward position of the cable. I must re-wire that one day...

Image

Image

Here is the Terminal screen just after switching on "HE" help command output, then I ran a program that was stored in the Non volitile RAM for several months $6000020 & it looks like it the RTC has kept it time & adjusted itself for GMT too !!! Then I downloaded a ("LT" command) a new version I coded the other night & ran that.

Image

Here I downloaded a uC/OS-II program that has 2 tasks using semephores to a gain accesses to a data object (example from chapter 1 of the uC/OS-II manual) you can see Task 1 & Task 2 being blocked or getting the resource. Very powerful kernal & only resides in ~70K so with the 512K I have, that leaves plenty of space for user tasks & ASM code.

Image

To port the uC/OS-II OS from the standard IDE68K implementation was pretty simple, the main thing is to implement the system OSTickISR service routine, so I added a few lines :

Here I use the Flite onboard PI/T Timer to provide the 100Hz IRQ tick for the OS Kernel

Image

Plus a few setup actions, like linking in the IRQ routines into the vector table, set up of the PI/T, this is done in a module "os_boot.asm" that is included in your projects and is the startup code :

Image

Then just the "putchar", "getchar", "kbhit" & "exit" routines which are just basically "TRAP #11 dc.w nn" type commands that apply to the Flite monitor & it was all done.


Top
 Profile  
 
 Post subject: Re: 68020 + 68881
PostPosted: Sun Nov 24, 2013 8:29 pm 
Offline

Joined: Thu Feb 16, 2012 4:34 pm
Posts: 17
Hey, thanks, nice to see the "lab".

I had also thought about uCOS, but did not get that far although I am very interested in porting and Operating Systems as such. It just takes too much time...and I never could find the "ideal" board as I conceived it.

Due to your postings I went down in my cellar to dig out some of my unfinished projects...
Will do another try to run uCOS on one of my boards - perhaps this time I will finish it.

Actually, this is why I was looking for coproc-support in Easy: perhaps I could find enough fun in the simulator and could avoid any more pains with hardware stuff.
But it seems that it will not happen.
If I remember correctly there *were* thoughts about supporting 68020/68881 but have not seen any concrete information.

rgds


Top
 Profile  
 
 Post subject: Re: 68020 + 68881
PostPosted: Sat Nov 30, 2013 2:49 pm 
Offline

Joined: Tue Oct 20, 2009 12:01 pm
Posts: 16
Location: scotland
I've decided to add an Wireless Bluetooth RF Transreceiver to my expansion board & use the 2nd UART port on the 68681. Using the ebay purchase :

http://www.ebay.co.uk/itm/400464096879? ... 1423.l2649

Using the RFCOMM protocol stack & the "AT command" language I think I will be able to get the aboard to communicate with my wireless BT homehub & eventually connect to the WWW.


Top
 Profile  
 
 Post subject: Re: 68020 + 68881
PostPosted: Thu Jan 01, 2015 3:04 pm 
Offline

Joined: Thu Jan 01, 2015 2:23 pm
Posts: 10
can i see your ucOS/2 port ?
i'd like to put it on my 68020 board, too


Top
 Profile  
 
 Post subject: Re: 68020 + 68881
PostPosted: Wed Feb 25, 2015 1:25 am 
Offline

Joined: Tue Oct 20, 2009 12:01 pm
Posts: 16
Location: scotland
Hi @legacy

Sorry for the delay, I only spotted your post today & I haven't logged in for a while.

I'll dig out the code modifications that I made to the standard uC/OS-II as supplied with the IDE68K download.

But basically it is just a few mods :

1/ Change the LIB/start.asm file for the __exit, __putch, __getch & __kbhit so that they use the particular TRAP that applies to your 68020 board. Mine uses TRAP #15.

2/ Change the uCOSII/os_boot.asm so that you patch in the _OSCtxSw routine into the TARP #10 vector & the _OSTickISR routine into which ever vector your onboard timer interrupt chip uses. I have a 68230 chicp & generate the 100Hz interrupt using Vector 69.


The modified the rest of os_boot.asm with the following code :

_start:

move.l #%0001,D0 ; set E bit for CACR
movec D0,CACR ; enable 68020 cache
move.l #-1,__ungetbuf

; set-up the Vector table & VBR

lea 0,A0
lea __uCOS2VBR,A1
move.w #$47,D0
CpyVec: move.l (A0)+,(A1)+
dbra D0,CpyVec

lea.l (_OSTickISR,PC),A0
move.l A0,__uCOS2VBR+$114 * Use vector 69

lea.l (_OSCtxSw,PC),A0
move.l A0,__uCOS2VBR+$A8 * Use Trap 10 for context switch

; Add in the Flite 68EC020 EVM board for VBR=$00000000 ROM jump table

move #$4EF9,VECT69.L * place JMP instruction in vector 69 RAM jumper location
lea.l (_OSTickISR,PC),A0
move.l A0,VECT69+2.L * Write it to the vector 69 JMP address location

move #$4EF9,VECT42.L * place JMP instruction in vector 42 RAM jumper location
lea.l (_OSCtxSw,PC),A0
move.l A0,VECT42+2.L * Write it to the vector 42 JMP address location

move #$4EF9,VECT30.L * place JMP instruction in vector 30 RAM jumper location Auto IRQ 6
lea.l (_AUTOIRQ6Handle,PC),A0
move.l A0,VECT30+2.L * Write it to the vector 30 JMP address location

move #$4EF9,VECT31.L * place JMP instruction in vector 31 RAM jumper location Auto IRQ 7
lea.l (_AUTOIRQ7Handle,PC),A0
move.l A0,VECT31+2.L * Write it to the vector 31 JMP address location

; Change the VBR
; lea __uCOS2VBR,A0
; movec A0,VBR

; set-up the timer here but don't enable until after OSStart() call!

lea PIT,A0 * A0 points to PI/T base
move.b #0,TCR(A0) * disable/reset timer
move.l #2500,D0 * 0.01 sec period 100Hz (8MHz with /32 prescale) Tout toggles 1sec
movep.l D0,CPR(A0) * load value into Counter preload register
move.b #OSTickVec,TIVR(A0) * use vector 69 _OSTickISR
; set timer IRQ
move.b #$A1,TCR(A0) * PC3=TIRQ, PC7=TIACK, load from pre-load counter, enable timer
; set the Status Register
andi #$FAFF,SR * set processor interrupt level 2 (allow IRQ 3 and above)

jmp _main ; start the uC/OSii environment code

;*******************************************************************
; _Timersetirq called immediately after OSStart to start timer ticks
;*******************************************************************
_Timersetirq:
move.l A0,-(A7) ; save reg
lea PIT,A0 * A0 points to PI/T base
move.b #$A1,TCR(A0) * PC3=TIRQ, PC7=TIACK, load from pre-load counter, enable timer
; set the Status Register
andi #$FAFF,SR * set processor interrupt level 2 (allow IRQ 3 and above)
move.l (A7)+,A0 ; restore reg
rts


I actually use my boards standard Vector Jump table, rather than changing the VBR (see commented out section)

3/ Modify the uCOSII/os_cpu_a.asm file _OSTickISR routine by adding some code to reset the PI/ Timer, I just needed to add these lines into the rutine

_OSTickISR:
...
...
; Reset the Timer interrupt from PI/T
lea PIT,A6 ; A6 points to PI/T base
move.b #1,TSR(A6) ; reset the Zero detect bit in Timer status register
...
...
JSR _OSTimeTick ; Call uC/OS-II's tick updating function
JMP OSIntExit68K ; Exit ISR



Think that is basically all that I needed to do. Good luck.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  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:  
Powered by phpBB® Forum Software © phpBB Group