26 April 2012, 00:50 | #1 |
Registered User
Join Date: Sep 2010
Location: Maryland, USA
Posts: 82
|
68000 boot code
Hey Mods, someone suggested I post here and gave a link to this particular forum. Please move to Coders. Asm / Hardware as that seems to make more sense.
I'm interested in doing some minimal boot code for 68000. The goal is to simulate a softcore 68000 such as tg68 or wf68k00 and look at bus cycles in waveform viewer. So i need to be able to see a few reads and a few writes, doing more later on. I assume that assembly is best approach for this as there is no os or kickstart or anything at all to run, and i want very detailed control of what happens when. But i have not done assembly since 1994 and that was using vax toolchain at university. What should I use in AmigaOS (WinUEA) or windows or linux to accomplish executable from assembly? And where do I go to see good assembly examples? In the past year Ive done minimal Rabbit3000 and PicoBlaze assembly, which I do not recognize from old 68000 class so long ago. Thank you for your help! (I do software running cpu simulations at work on Arm chips from C test code, but this has bit boot rom code underneath, this 68000 sim will be a lot different) Last edited by billt; 03 May 2012 at 19:17. |
26 April 2012, 01:56 | #2 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
|
Funnily enough I'm playing around with almost exactly this kind of thing at the moment. I've got an Altera DE1 board and I've got the 68020-compatible version of TG68 running on the FPGA, reading a simple program.
Note that the TG68's bus interface is slightly different from the "real" 68000 - and instead of using /DTACK there's a CLKENA signal that you simply hold low until data is ready. (The Minimig ports that use TG68 have a wrapper that translates to more traditional 68K signals.) For assembling simple test programs I use EASy68k which has a simulator/debugger and can generate listings and S-records. Tonight I'm experimenting with SDRAM, and have a simple VGA framebuffer running, filled with the TG68. I plan to put details (and project code) on the site in my sig in due course - but in the meantime if you'd like to take a look, the very first baby steps can be found, as a QuartusII project, here. This project runs a very simple program on the TG68 which increments a counter and writes the result to the 4-digit hex display on the DE1 board. If you'd like the latest version just PM me to remind me and I'll zip it up at some point. |
26 April 2012, 02:35 | #3 | |
Registered User
Join Date: Sep 2010
Location: Maryland, USA
Posts: 82
|
Quote:
|
|
01 May 2012, 21:52 | #4 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
|
For anyone who's interested, I've now got my simple test project working using the TG68K + wrapper, rather than using the TG68K bare, so it's now using traditional MC68000 signals.
http://retroramblings.net/?p=59 |
01 May 2012, 21:55 | #5 | ||
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
|
Quote:
Quote:
|
||
03 May 2012, 18:16 | #6 | |
Registered User
Join Date: Sep 2010
Location: Maryland, USA
Posts: 82
|
from your blog page:
Quote:
Man, it's been ages since I've done 68000, 1994 or 1995... And back then we had a boot ROM thingamy in place for loading the board from a terminal. I'm going to have to dig out my books from that class, as some of these particular details seem to be hard to find now. |
|
03 May 2012, 18:25 | #7 | |
Registered User
Join Date: Sep 2010
Location: Maryland, USA
Posts: 82
|
Quote:
I got a very minimal display up on my monitor the other day. Nothing exciting to look at, you had a choice of solid red or solid green. Red was 800x600@72Hz and green was 640x480@60Hz. But it's up, and now I am workign on the state machine to decide what color each pixel should be to draw the game we're doing. (No framebuffer, no processor, no software) I'm going to be very happy when this is over, it's burning me out quick... But it's really cool to learn how to do this stuff! It took quite a while to "get it" for HDL coding. (Verilog or VHDL, for me it was Verilog for until this VHDL class started in January) A couple years ago, after spending a decade wading around in Verilog gates netlists (for ASIC LVS verification, the ASIC design in question being an FPGA chip) and after a while also wading around in Verilog RTL written by other people, I finally got an opportunity to try my first RTL in Verilog. I then learned that you don't set your initial values of registers with an initial block, and what the right way to do that sort of thing was. (All I'd cone before was simulations) Then other things started to make more sense. And this VHDL design class very quickly got me thinking much better about how to woth with an HDL language for making something go into an FPGA and work. And some of my old ideas back when I didn't know enough to get anywhere are popping back into my head again, along with a couple new ones, some involving the standard 680x0 busses. At a few meetings some coworkers would occasionally mention that they were trying to do their code to do a certain hardware style, and I had no idea how synthesizers work and couldn't do that imagination myself. Eventually it soaked in and began to make sense, and now I feel much more like I'm typing a netlist (RTL abstracted of course) And and operation is not like a C instruction to fetch, load, operate and store. It's an AND gate. Maybe a few AND gates in parallel for a multibit thing. An if/else or a case is a multiplexer. And that's a gate too, or a number of gates in parallel. And being able to think of things as gates rather than instructions helped me get a lot more comfortable with the completely parallel nature of RTL code. Last edited by billt; 03 May 2012 at 19:41. |
|
03 May 2012, 18:39 | #8 | |
Registered User
Join Date: Sep 2010
Location: Maryland, USA
Posts: 82
|
http://www.easy68k.com/EASy68Kforum/...b0e26479e663fc
Quote:
|
|
03 May 2012, 19:59 | #9 | ||
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
|
Quote:
What I probably should have done instead is: org 0x00 dc.l 0 dc.l 8 Start: ... In fact since that's much clearer, I'll go edit the post now - thanks for the feedback Quote:
|
||
03 May 2012, 23:22 | #10 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,690
|
Is this related to Amiga hardware or OS? Other than selecting (a good) one of many emulators that do 68000, I mean. Just not sure if we yet have a forum that fits that I could move it to.
You can use AsmOne and assemble "in" the emulator but a few use their favorite PC text editor and launch any UAE to run it. You couldn't really ORG $4 and expect to pop back in the assembler when your code has run if you code in an Amiga assembler, you'd have to cold reset the Amiga/emulation. If my intuition is right, Linux will have some mature packages. |
04 May 2012, 00:11 | #11 |
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
|
Good question. In my case I'm doing this stuff to gain a better understanding of the Minimig core, and hopefully thereafter to work on improving the DE1 and Chameleon ports. Beyond that I guess the biggest Amiga relevance is simply that an Amiga forum is a good place to find people with 68000 expertise!
|
04 May 2012, 19:35 | #12 | ||
Registered User
Join Date: Sep 2010
Location: Maryland, USA
Posts: 82
|
Quote:
Quote:
My interest is Amiga hardware, in the sense that Minimig is and that an FPGA can pretend to be a 68000 or something else on a 680x0 bus, such as what Majsta has talked about for a while. Trying very hard to encourage him to do some simulation of his idea rather than just put stuff onto his Amiga and consider the Amiga boot colors on monitor as is VHDL debug method. I didn't realize there were others like Robinsonb5 doing similar sounding things. I do have an idea for a modular classic accelerator board that this is a small part of. But having a softcore 68000 doing bus cycles to compare with Motorola/Freescale spec is important to getting things happy with a real Amiga. I'll probably be poking around with Easy68k for a while when I get time, as for now I'm stuck mostly with Windows until I get a new laptop. The one I have doesn't have room for Linux or much else right now. :/ I don't really plan to do any real assembly software for Amiga users to run on their machines, only what I need to do for hardware simulations of things attached to a 680x0 softcore. Such as eventually my Zorro to Wishbone bridge project at Opencores, probably first connected to ao68000 for simulations and experimenting, then at some point to Minimig via some 68k to Wishbone bridge. Last edited by billt; 04 May 2012 at 19:50. |
||
04 May 2012, 19:41 | #13 | |
Registered User
Join Date: Sep 2010
Location: Maryland, USA
Posts: 82
|
Quote:
My wife and I hope to get a bigger house this summer and if that works out then I really really want to get my real stuff out of storage and running again, as it's been a few years since I've had opportunity to really use AmigaOS at all. My classics and XE are lonely and dusty in the stuffed room of which we do not speak. Last edited by billt; 04 May 2012 at 19:51. |
|
05 May 2012, 01:01 | #14 |
Registered User
Join Date: Apr 2011
Location: porto/portugal
Posts: 50
|
hi while you people burn fuses over your heads make amigas alive agin keep the good work on projects and fpga´s ,the problem is that when somebody gets there like other simillar projects thing on money and that is were the projects die,like amiga one and ppc and sam boards .
|
05 May 2012, 02:09 | #15 | ||||
Registered User
Join Date: Mar 2012
Location: Norfolk, UK
Posts: 1,157
|
Quote:
Quote:
Quote:
Quote:
As for coding on the Amiga, and suitable software, I tend to use SNMA as an assembler, and monam2 from the Devpack2 package for debugging - but having been absent from the Amiga scene for a good many years I've no idea what else is available now! |
||||
05 May 2012, 20:13 | #16 | |
Registered User
Join Date: Sep 2010
Location: Maryland, USA
Posts: 82
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
68000 code optimisations | pmc | Coders. Asm / Hardware | 248 | 17 September 2023 13:20 |
680x0 to 68000 | Counia | Hardware mods | 1 | 01 March 2011 10:18 |
New opcode for 68000 family | clenched | request.UAE Wishlist | 15 | 14 April 2009 15:02 |
quitting on 68000? | Hungry Horace | project.WHDLoad | 60 | 19 December 2006 20:17 |
3D code and/or internet code for Blitz Basic 2.1 | EdzUp | Retrogaming General Discussion | 0 | 10 February 2002 11:40 |
|
|