Re: UMDK manufacturing, part 2: Software
Posted: Thu Dec 03, 2015 9:23 pm
ok, waiting for next step.
Sega Megadrive/Genesis development
http://gendev.spritesmind.net/forum/
I'm guessing the menu program failed to build. Try building it manually and see why it fails, execute ./rel in its folder. But probably it failed because some tools for the crosscompiler didn't get built right. I had the same problem on my arch linux, but on debian jessie the build was flawless.mikejmoffitt wrote:my Firmware.bin is also 1280 bytes.
Code: Select all
7za
help2man
sudo apt-get install libtool-bin
For now, it is better to stick to standard MD hardware. All tests were done with Chris' MD2 and some of my MD1 boards such as the M5PAL-VA4.Montserrat wrote:I supose now we need to get it run standalone, also it will be very nice if the kit could run the debugger in the nomad, its a very portable solution and includes the screen.
Nomad its a genesis 2 whithout a reset button, may be this is related.
The debugger relies on the fact that the monitor program is loaded from flash during startup. If that load process is failing, then the monitor will not run correctly. Luckily, you now have all the necessary tools to check this. Try using gordon & spi-talk.xsvf to write a 512MiB file random-data file to flash again (like we did in the initial setup process), but this time rather than reading it back using gordon, write a little ROM that gets the MegaDrive to read it, and copy it to a block of SDRAM starting at 0x400000, then use sigtest.xsvf and loader to run it, then use loader to read the result out of SDRAM. The flash chip and the SD-card are both connected to the FPGA on a general-purpose SPI bus. There are two hardware registers for the SPI interface, SPICON=0xA13004 and SPIDATW=0xA13000. You can use them to read from flash with some code like this:Montserrat wrote:I supose now we need to get it run standalone
Code: Select all
SPIDATW = 0x0000 /* SPI word read/write */
SPICON = 0x0004 /* SPI interface control */
bmTURBO = (1<<0) /* 0x0001 */
bmFLASH = (1<<2) /* 0x0004 */
.org 0x000000
dc.l 0x000000 /* Initial SSP */
dc.l 0x000008 /* Initial PC */
boot:
move.b 0xA10001, d0
andi.b #0x0f, d0
beq.s 1f
move.l #0x53454741, 0xA14000 /* write "SEGA" to TMSS register */
1: lea 0xA13000, a0
lea 0x400000, a1
move.w #(bmTURBO | bmFLASH), SPICON(a0)
move.w #0x0300, SPIDATW(a0) /* 03 = "read flash" command; next three */
move.w #0x0000, SPIDATW(a0) /* bytes set the read offset to zero. */
move.w #0xFFFF, SPIDATW(a0) /* get first two bytes */
/* Load 32 bytes from flash, copy them to SDRAM at 0x400000 */
move.w #15, d0
2: move.w SPIDATW(a0), (a1)+
dbra d0, 2b
/* OK, we're finished copying, so go into an infinite loop */
3: bra.s 3b
Didnt know you were able to speak intergalactic. Sorry i did not catch a single word. I'm afraid that i can be only usesful as a test dummy.prophet36 wrote:LAST POST
Does someone else with more programming experience want to give it a go? I just tried the "flash-read" code I posted and it does work (I just copy-pasted it over test.s and ran "make test.bin" to run it through the assembler).Montserrat wrote:Sorry i did not catch a single word.
As I said before, I'd rather not continue telling people exactly what to type. I'd much prefer to see people experimenting with the tools (flcli, gordon, loader, etc) and trying to run their own simple assembly-language programs, learning to interpret the trace dumps and reading back execution results stored in SDRAM using the loader utility. Obviously I'm happy to answer specific questions like "how do I use loader's -r option?" and "why does the trace show that the word following a move #0x2700,sr instruction is read twice?", but I'm not prepared to answer more "tell me what to type now" questions. I hope you all understand.Anne Isabella Ritchie wrote:If you give a man a fish he is hungry again in an hour; if you teach him to catch a fish you do him a good turn.
I apologise. I certainly did not intend it to be rude.Montserrat wrote:That was rude. Seriously.
I will try this out and put a Test-ROM together.prophet36 wrote:Does someone else with more programming experience want to give it a go? I just tried the "flash-read" code I posted and it does work (I just copy-pasted it over test.s and ran "make test.bin" to run it through the assembler).Montserrat wrote:Sorry i did not catch a single word.
As I said before, I'd rather not continue telling people exactly what to type. I'd much prefer to see people experimenting with the tools (flcli, gordon, loader, etc) and trying to run their own simple assembly-language programs, learning to interpret the trace dumps and reading back execution results stored in SDRAM using the loader utility. Obviously I'm happy to answer specific questions like "how do I use loader's -r option?" and "why does the trace show that the word following a move #0x2700,sr instruction is read twice?", but I'm not prepared to answer more "tell me what to type now" questions. I hope you all understand.Anne Isabella Ritchie wrote:If you give a man a fish he is hungry again in an hour; if you teach him to catch a fish you do him a good turn.
Ok, I can see both sides of this but essentially: Chris can coach people and provide answers to UMDK but he cannot teach people how to program the MD and the Motorola 68000 in general. I realise that this might be a little over whelming for some, and they may need to hang back a bit, get the books out and teach themselves more about the 68K as a chip, an architecture and indeed its machine language and then understand the MD better to know what is going on.Montserrat wrote:That was rude. Seriously.
Good idea. Here goes:MintyTheCat wrote:The other thing that some how I had not gotten around to was that it would be really great if UMDK's Memory-Map could be put somewhere for reference
Code: Select all
move.b #0x1F, 0xA130F3
Code: Select all
move.b #0x00, 0xA130FF
Code: Select all
move.b #0x41, 0xA130F3
Code: Select all
move.b #0x42, 0xA130FF
Code: Select all
SSF2 REGISTERS
-------------------------------------------------------
| Register | D6=0 | D6=1 |
|-----------|---------------------|---------------------|
| 0xA130F3: | 0x080000 - 0x0FFFFF | 0x480000 - 0x4FFFFF |
| 0xA130F5: | 0x100000 - 0x17FFFF | 0x500000 - 0x57FFFF |
| 0xA130F7: | 0x180000 - 0x1FFFFF | 0x580000 - 0x5FFFFF |
| 0xA130F9: | 0x200000 - 0x27FFFF | 0x600000 - 0x67FFFF |
| 0xA130FB: | 0x280000 - 0x2FFFFF | 0x680000 - 0x6FFFFF |
| 0xA130FD: | 0x300000 - 0x37FFFF | 0x700000 - 0x77FFFF |
| 0xA130FF: | 0x380000 - 0x3FFFFF | 0x780000 - 0x7FFFFF |
-------------------------------------------------------
Code: Select all
SPICON (0xA13004)
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
\_________________________________/ | | | |
| | | | \ TURBO
RESERVED (MUST BE ZERO) | | |
| | \ SUPPRESS
| |
| \ FLASHCS
|
\ SDCS
I did not asked for such thing.MintyTheCat wrote: Chris can coach people and provide answers to UMDK but he cannot teach people how to program the MD and the Motorola 68000 in general. I realise that this might be a little over whelming for some, and they may need to hang back a bit, get the books out and teach themselves more about the 68K as a chip, an architecture and indeed its machine language and then understand the MD better to know what is going on.