MSX -> Arduino

Page 2/4
1 | | 3 | 4

By rogermm

Master (130)

rogermm's picture

20-10-2013, 17:16

If you use LLVM, llvm-g++ will compile your C++ code to LLVM bitcode, and llc has a backend which converts bitcode to C.

You could write commands like this:

llvm-g++ -emit-llvm -c foo.cpp -o foo.o
sdcc foo.c

----- Win+SDCC+Eclipse HOWTO ----
http://andrear.altervista.org/home/sdcceclipse.php
http://sourceforge.net/projects/eclipse-sdcc/

--- Konamiman MSX SDCC libaries ---
http://www.konamiman.com/msx/msx-e.html#sdcc

By msxegor

Master (183)

msxegor's picture

22-10-2013, 17:32

Hi!
With arduino-vs-msx there are lots of questions:
- first, arduino is no way a slow controller - maybe a little on the RAM side but still 16 mhz and most of commands need a single clock. Multiplication needs 2 clocks - alas even R800 is nowhere near.
- all really interesting "schields" require either i2c or other fast serial interface, which we have on-chip
on arduino (read, microcontroller) with speeds up to 10 mhz or so. Nothing on MSX. Not even ability to transfer data at the rate Sad
BTW if the qustion is in connecting various hardware, there is UEXT standard (but still requires at least one high speed serial port and 3,3V too)

By NYYRIKKI

Enlighted (5900)

NYYRIKKI's picture

23-10-2013, 15:35

msxegor wrote:

Hi!
With arduino-vs-msx there are lots of questions:
- first, arduino is no way a slow controller - maybe a little on the RAM side but still 16 mhz and most of commands need a single clock. Multiplication needs 2 clocks - alas even R800 is nowhere near.

Yes, I realize that typical Arduino is 2-3x faster than tR and even slow Arduinos are a bit faster.

Quote:

- all really interesting "schields" require either i2c or other fast serial interface, which we have on-chip
on arduino (read, microcontroller) with speeds up to 10 mhz or so. Nothing on MSX. Not even ability to transfer data at the rate Sad

I don't understand why I2C would be a problem? Although Arduino boards are fast, most of the other chips are really not that powerful. In slow mode I2C communicates with 10kHz, normal mode is 100kHz and fast mode is 400kHz (Yes, I know modern chips may support also FM+ and HS modes, but they are not very interesting looking from MSX). 10kHz should be doable even with bad code trough joystick port. (Actually I'm planning to test this theory) In I2C master drives the clock, so if MSX is slow -> communication is slow. Not a big deal.

By NYYRIKKI

Enlighted (5900)

NYYRIKKI's picture

23-10-2013, 15:48

By rogermm

Master (130)

rogermm's picture

23-10-2013, 18:27

See ZX Spectrum SPI interface at 1.75MHZ: http://spectrum.alioth.net/doc/index.php/ZX_SPI

I have ported this project to my MSX breakout board: http://187.33.0.151//MsxArm/MsxBreakoutFatSpi
Untested

By rogermm

Master (130)

rogermm's picture

23-10-2013, 18:38

MSX Denyonet(http://msx.altervista.org/denyonet/) uses the same chip as Arduino ethernet shield(http://arduino.cc/en/Main/ArduinoEthernetShield). Both uses SPI interface

By NYYRIKKI

Enlighted (5900)

NYYRIKKI's picture

23-10-2013, 19:16

Yes, the thing that really makes eager to investigate this possibility is that while for example Denyonet is hard to get and costs >80$ + PP the Arduino ethernet shield costs <10$ including PP... Little adapting software and off we go.

If we could also compile Arduino software then most of the software side "hard to implement / boring to do" stuff would be already available! Sure in more serious projects you might need you to add your own ML librarys / more hardware in between, but this kind of approach would be a huge help & cheap way to get started.

How ever I must say that I have even hard time to follow the discussion about software side here... Not to mention reading / writing / compiling anything. This would require some C / C++ / G++ -knowledge that I have none. I just can't help thinking that if we could get even basic C and PinMode, digitalWrite & digitalRead functions of Arduino running then I think many of the basic examples & interesting protocols would be already available for us.

By MicroTech

Champion (385)

MicroTech's picture

28-10-2013, 16:30

Connecting Arduino ethernet shield to MSX via SPI would result, probably, in a very slow communication speed (between MSX and Wiznet W5100).

MSX has no hw SPI controller, so you should "software emulate" SPI... you are not the first who need it

I also read in this forum (but I couldn't find it yet) that Tsujikawa succeded in reasding/writing SD card through joy port with a similar technique...

Is there anybody who already has an arduino eth shield to make some tests?

By rogermm

Master (130)

rogermm's picture

28-10-2013, 23:29

The MSX HAS a SPI interface(open source hardware): http://187.33.0.151//MsxArm/MsxBreakoutFatSpi(the wiki is offline by now). The SPI work with 3.54Mhz so can be fast as LDIR/LDI z80 instruction. So Wiznet W5100 can be connected to MSX breakout board in the serial way and behave as was connected on 8 bits Z80 parallel data bus!!!!

The project is opensource. The main purpose of MSX breakout board(2 flavors: slim/fat) is to interface MSX with MSXARM(http://187.33.0.151//MsxArm/MsxArm). But can be used in another projects too. The breakout board uses a programable logic(CPLD).
unfortunately it is untested. We(I and popolony2k ) are working on a SPI demo.

By rogermm

Master (130)

rogermm's picture

29-10-2013, 01:30

In the SPI demo I"ll demostrate how to send large chucks of data using fast Z80 instructions and nice hardware tricks. (Welcome to the "Z80 zombie mode" tricks). LDI/LDIR??? NO. LDIR/LDI(supposedly the fastest data transfer instruction) is slow. POP XX is more fast. How?? Stay tuned.

Page 2/4
1 | | 3 | 4