8bitbaby prototype board for MSX, Apple, Atari, C64/128/VIC20 etc

Página 2/3
1 | | 3

Por ronivon

Expert (73)

imagem de ronivon

03-03-2008, 11:36

So, no one interested in this topic anymore?

This weekend, i managed to make my 8bitbaby prototype work... I did not burn it after all.

It has a long time since I last developed anything for the MSX, so I spend some time reading some MSX hardware specifications, regarding to the slots expansion.

I want to make a simple hardware device, connected to the slot, to understand how it works, and how I can address the hardware connected to the slots by memmory mapped io.

The idea is: turn on some leds connected to the prototype board.

I have developed this VHDL code, and need some opinions if this might work, or, if I am going to burn something inside my MSX:

------------------------------------------------
entity msx_top is
port
(
msx_clock : in std_logic;
led : out std_logic;
cs1_n : in std_logic;
int_n : out std_logic;
busdir_n : out std_logic;
iorq_n : in std_logic;
mreq_n : in std_logic;
wr_n : in std_logic;
rd_n : in std_logic;
reset_n : out std_logic;
a : in std_logic_vector(11 downto 0);
d : inout std_logic_vector(7 downto 0)
);
end msx_top;

architecture rtl of msx_top is
begin

led <= rd_n and cs1_n;

process (msx_clock)
begin
if msx_clock'event and msx_clock = '1' then
if cs1_n = '0' and rd_n = '0' then
case a is
when "000000000000" =>
d <= "01000010"; -- 42h
when "000000000001" =>
d <= "01000001"; -- 41h
when "000000000010" =>
d <= "01000000"; -- 40h
when "000000000011" =>
d <= "00000000"; -- 00h
when others =>
d <= "10101010"; -- AAh
end case;
end if;
end if;
end process;

end rtl;
------------------------------------------------

Little explanation:
I simulate a ROM cartdrige (headers 4241h), and INIT address 4000h.

All read access, to whatever address, will always return AAAAh (binary 10101010). The CPLD EPM3064 does not have much space for memory emulation.

A led will light up for every read access.

This is the beginning.
Later, I will check the write date, and turn on leds according to the values sent by the MSX. This way, I will know how communication works and will step forward to create something useful, like MMC/SD access or something else.

I will publish the Quartus Project on my site when it is working, but, before connecting to my MSX, I will need some advice from you hardware guys, if there is something critical I must now and change.

Thanks,
Roni

Por Guillian

Prophet (3354)

imagem de Guillian

04-03-2008, 10:28

I'm not a hardware or VHDL expert, but I think it will not work.

The ROM header is wrong. It is #41, #42 and not #42, #41
The INIT address points to #0040 (somewhere in the BIOS). You have to change the bytes order. Furthermore, in #4000 there is no code at all, so the program will crash.
Also "led <= rd_n and cs1_n" will make almost imposible to see it, since the signals change too fast.

What about making a simple example that stores bit 0 of data bus when you write to #4000-#BFFF (/CS2). You can use that bit to control the led.
In that way you can test it easily from BASIC and don't need to simulate a ROM.

Por ronivon

Expert (73)

imagem de ronivon

05-03-2008, 00:31

See ? My MSX stayed too much time boxed... Smile

I am missing something...
You mean, a hardware device can interface with the MSX when /CS2 is asserted, using address 4000h to BFFFh ? That easy?

I emulated ROM just because did not know other way to make the interface, but will try you suggestion. Thanks.

One bad thing about the 8bitbaby is that it is not possible to just connect it to the MSX slot. The pins are there, but the board are too wide and will not fit into the slot. I am already thinking about using a damaged cartdridge I have as part of the prototype board, and wire it up to the 8bitbaby. Makes testing faster.

Guillian, if you have more suggestions, you are welcome.
Thaks.

Por Guillian

Prophet (3354)

imagem de Guillian

05-03-2008, 12:06


You mean, a hardware device can interface with the MSX when /CS2 is asserted, using address 4000h to BFFFh ? That easy?

I wanted to mean that checking /CS2 signal you know if that cartridge slot is being accesed in #4000-#BFFF
Then you can check /WR to know if it is a writing operation and D0 to get bit 0 of the data bus.

In this way you can make simple test from BASIC:

poke &hf677,&hc0  <= change BASIC program memory area
out &ha8,&b11010000 <= select slot 1 in #8000-#BFFF (short way)
out &ha8,inp(&ha8)AND&b11001111OR&b00010000 <= select slot 1 in #8000-#BFFF (long way)
poke &h8000,1 <= D0 = 1 - Led ON
poke &h8000,0 <= D0 = 0 - Led OFF

Por ronivon

Expert (73)

imagem de ronivon

05-03-2008, 13:31


I wanted to mean that checking /CS2 signal you know if that cartridge slot is being accesed in #4000-#BFFF
Then you can check /WR to know if it is a writing operation and D0 to get bit 0 of the data bus.

In this way you can make simple test from BASIC:

poke &hf677,&hc0  <= change BASIC program memory area
out &ha8,&b11010000 <= select slot 1 in #8000-#BFFF (short way)
out &ha8,inp(&ha8)AND&b11001111OR&b00010000 <= select slot 1 in #8000-#BFFF (long way)
poke &h8000,1 <= D0 = 1 - Led ON
poke &h8000,0 <= D0 = 0 - Led OFF

Great.

The VHDL code would be something like the code below.
The EPM 3064 will have only 34 pins available. For this tests, I will ignore 8 bits from the MSB, and read only 8 bits from the LSB address. That's way "a : in std_logic_vector(7 downto 0) ".

entity msx_top is
port
(
msx_clock : in std_logic;
leds : out std_logic_vector(7 downto 0);
cs2_n : in std_logic;
wr_n : in std_logic;
rd_n : in std_logic;
a : in std_logic_vector(7 downto 0); --- map only 8 bits form the MSX address bus
d : inout std_logic_vector(7 downto 0)
);
end msx_top;

architecture rtl of msx_top is
signal leds_sig : std_logic_vector(7 downto 0);

begin

process (msx_clock)
begin
leds <= leds_sig;

if msx_clock'event and msx_clock = '1' then
if cs2_n = '0' and wr_n = '0' then
if a = "00000000" then
leds <= d;
elsif cs2_n = '0' and rd_n = '0' then
if a = "00000000" then
d <= leds_sig;
end if;
end if;
end if;
end if;
end process;

end rtl;

With one Poke, it will light up 8 leds. Every bit of the data will control one led.
The code generates a latch, so the leds will remain with the state of the last poke.

Reasonable?

Tell me one more thing: I will need to use BUSDIR to tell the MSX that the data is available for read in the bus ?

thanks.

Por Guillian

Prophet (3354)

imagem de Guillian

05-03-2008, 14:12

It is reasonable Wink

You will not need BUSDIR signal. I think it is used when accesing ports (IN/OUT instructions)

Por ronivon

Expert (73)

imagem de ronivon

06-03-2008, 00:38

It is reasonable Wink

You will not need BUSDIR signal. I think it is used when accesing ports (IN/OUT instructions)

Just opend the game cart, and removed the eprom.

But, it does not have all connectors in the pcb. It is missing the /RD, /WR, IORQ, MERQ, among others.
Sad

Plan B...

Por DD

Expert (88)

imagem de DD

16-12-2008, 15:47

Any progress on this?

I am about to make a small converter PCB for Wiznet Wiz810MJ to the MSX for debugging a complete other project. In fact i want to use the WizNET for some kind of VoIP for transmitter stations and have to control it with a PIC microcontroller.

Anyway, back 2 topic, i am going to test it with the MSX, from hardware point of view very easy and maybe it is a good solution as ethernet controller for the MSX. What about the software? I understood there was a general software driver (Nestor) which might be useful?

Por Leo

Paragon (1236)

imagem de Leo

29-03-2009, 23:06

this topic is interesting , i just ordered a pair of these boards.
I think could use this dip40 device (5v compatible ) :

http://www.enterpoint.co.uk/store/erol.html

B-)

Por st1mpy

Hero (538)

imagem de st1mpy

14-08-2010, 15:08

I recently bought some ISA prototype board. I intend to cut the excess edge connector/pins to modify it into a MSX cartridge prototype board. I've checked that it slots into the cartridge slot. I'll post some pictures when I've done it.

Página 2/3
1 | | 3