Welcome, Guest. Please login or register.


Author Topic: SD card interface (Read 95467 times)

Offline Z80System

  • EP addict
  • *
  • Posts: 3835
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 32.0.1700.107 Chrome 32.0.1700.107
    • View Profile
Re: SD card interface
« Reply #75 on: 2014.February.20. 13:03:46 »
Quote
Yes, Saint, on the expansion bay you have all the posibilities, not at the cartridge bay. But could be nice to find a good use for that little boxes that gave to the EP that look of expandability....
Yes, It would be the mega ultimate goodness, but maybe the cartridge port itself is designed for ROM(RAM) type of extensions, and unfortunately not for any extension we can imagine ... :(

And that is only an unfortunate fact we never used the cartridge bay with many different cartridges because the lack of those ... :(
« Last Edit: 2014.February.20. 13:10:36 by Z80System »
Z80 System

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 33.0.1750.146 Chrome 33.0.1750.146
    • View Profile
Re: SD card interface
« Reply #76 on: 2014.March.12. 00:18:49 »
I've built up the first part of my prototype. It's just an address decoding GAL and a FLASH chip hooked up to expansion port, which should give me a 256KB ROM board.

However whenever I boot up, I just get a crash. Almost exactly like I had with the EXDOS board with the slow EPROM giving me a green screen or other odd crashes.

How does EXOS work with extension ROMs? Does it look for EXOS_ROM as the first 8 bytes, and if they exist, jump to that ROM on bootup? I'm wondering whether its crashing trying to execute the ROM (I put EPPLUS on there), or if the bus is just getting corrupted through some timing issue.

Also, is it possible to page in a ROM and read its contents easily from BASIC? It would be handy if I could program the ROM with just some text, and try and read it on the EP to see if I've made any wiring mistakes. :roll:

Online Zozosoft

  • EP addict
  • *
  • Posts: 13176
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 27.0 Firefox 27.0
    • View Profile
    • http://enterprise.iko.hu/
Re: SD card interface
« Reply #77 on: 2014.March.12. 09:14:10 »
Quote from: Saint
How does EXOS work with extension ROMs? Does it look for EXOS_ROM as the first 8 bytes, and if they exist, jump to that ROM on bootup?
Shortly: yes.
Longer: EXOS System Extension Interface

Quote
Also, is it possible to page in a ROM and read its contents easily from BASIC? It would be handy if I could program the ROM with just some text, and try and read it on the EP to see if I've made any wiring mistakes. :roll:
10 S=4
20 FOR I=0 TO 7
30 PRINT CHR$(SPEEK(S,I));
40 NEXT
50 PRINT

S=segment number, I=address

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 33.0.1750.146 Chrome 33.0.1750.146
    • View Profile
Re: SD card interface
« Reply #78 on: 2014.March.12. 10:15:41 »
Perfect, thankyou Zozo!

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 33.0.1750.146 Chrome 33.0.1750.146
    • View Profile
Re: SD card interface
« Reply #79 on: 2014.March.12. 14:55:23 »
Is there a limit to which ROM slots you can use? The emulator seems to have a limited set...

0-7, 10-13, 20-23, 30-33, 40-43

And are these hex values? I assume they are.

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 33.0.1750.146 Chrome 33.0.1750.146
    • View Profile
Re: SD card interface
« Reply #80 on: 2014.March.12. 15:34:43 »
I tested the 16KB page with a psudorandom non-repeating pattern, it all verifies ok from basic. All other segments on the flash read 255 as expected. Very weird it wont boot from it... :mad:

Online Zozosoft

  • EP addict
  • *
  • Posts: 13176
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 27.0 Firefox 27.0
    • View Profile
    • http://enterprise.iko.hu/
Re: SD card interface
« Reply #81 on: 2014.March.12. 15:53:32 »
00-03h are the onboard ROM
04-07h Cartridge socket
F8-FBh 64k expansion in EP128
FC-FFh onboard RAM (Video)
All others can be used for any ROM or RAM expansion.
EXOS 2.0/2.1 just detect ROM programs at 04-07h,x0h segments.
My updated versions (2.2+) can detect at any segment.

EXDOS are on the 20-21h segments, address decoded 20-2Fh to the ROM socket on the EXDOS card.

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 33.0.1750.146 Chrome 33.0.1750.146
    • View Profile
Re: SD card interface
« Reply #82 on: 2014.March.12. 20:22:10 »
Ok, I'm using page 0x40 at the moment, so this should boot on any EXOS version.

So, it looks like the issue is with the M1 read cycle. I had just been using address decode & MREQ for the CE, as OE and CE need to be low for the data lines to be driven, so I shouldn't need to worry about RFSH. But to be sure, I added the RFSH line and changed CE to be address decode & MREQ & !RFSH. This made no odds... :(

So I had a look at the CE and OE lines with the scope. They look fine, both CE and OE assert and de-assert at the same time and I can see pulses of about 300ns (the M1 cycle) and 500ns (normal read). They look fine... 

The only slightly odd thing is if I look at CE and D0. I can see CE assert, then shortly afterwards D0 is asserted either high or low. When driven low, after CE is deasserted the D0 line tristates and floats up to about 2v. This is what seems to happen for normal bus access on the EP.

Now when the flash drives the bus high, it drives to 5v (other signals on the EP are 4v), and it seems to remain it 5v even after the bus is tristated when CE is deasserted. So that's a little strange. This is the only thing so far that seems odd, though...

Has anyone tried a 29C020 (or other 29Cxxx) with the EP? I just happened to have one lying around, hence the prototype was built with it...

Online Zozosoft

  • EP addict
  • *
  • Posts: 13176
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 27.0 Firefox 27.0
    • View Profile
    • http://enterprise.iko.hu/
Re: SD card interface
« Reply #83 on: 2014.March.12. 20:42:40 »
Quote from: Saint
Has anyone tried a 29C020 (or other 29Cxxx) with the EP?
Yes, and no problem.

Offline Tuby128

  • EP lover
  • *
  • Posts: 920
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 21.0 Firefox 21.0
    • View Profile
Re: SD card interface
« Reply #84 on: 2014.March.12. 22:03:45 »
I didn't read all your comments but the last several. Are you using a pull-up resistor on your extension card? Sometimes pull-up resisors can help to close the end of a bus. With this solution the floating bits can be forgotten. Of course it's just an assumption.

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 33.0.1750.146 Chrome 33.0.1750.146
    • View Profile
Re: SD card interface
« Reply #85 on: 2014.March.12. 22:27:19 »
Quote from: Tuby128
I didn't read all your comments but the last several. Are you using a pull-up resistor on your extension card? Sometimes pull-up resisors can help to close the end of a bus. With this solution the floating bits can be forgotten. Of course it's just an assumption.
Yeah, pulldown resistors was a thought I had on the data lines, but they shouldn't really be needed. While the bus is floating the logic level doesn't actually matter, and as soon as something else drives the bus then the logic level changes. It does seem a little odd that the high impedance state of the 29Cxxx keeps the logic level high like that, though.

I'm still wondering if its timing related. The m1 cycle has less time for the data lines to be asserted and latched than normal read / write cycles. But it's still 3 T states, so about 375ns. With a 90ns FLASH, that still leaves a lot of time spare...

Offline Saint

  • EP user
  • *
  • Posts: 266
  • Country: gb
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 33.0.1750.146 Chrome 33.0.1750.146
    • View Profile
Re: SD card interface
« Reply #86 on: 2014.March.12. 23:18:00 »
This is really weird. All the timings look fine. There is about a 40ns delay from the falling edge of T1 to the FLASH CE, then about another 50ns delay from there to the data being valid. So only about 90ns from the falling edge of T1 and the data is valid. And it stays valid until the end of T2 + 40ns. The CE is low for the full 375ns, just delayed. So it all looks spot on... :ds_icon_frown:

The address lines also don't change until the rising edge of CE, which is after the data should have been latched.

I'll try and hook up the logic analyser tomorrow and see if I can see what's on the data lines when CE is low...

Offline SzörG

  • EP fan
  • *
  • Posts: 213
  • Country: hu
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 21.0 Firefox 21.0
    • View Profile
    • ReTRo Tauta
Re: SD card interface
« Reply #87 on: 2014.March.15. 21:55:52 »
Here's a short report. The ENTERPRISE 128 SD card interface first prototype has been operating state on this week.
I'm trying to put on a better video :-)

Online gflorez

  • EP addict
  • *
  • Posts: 2452
  • Country: es
  • OS:
  • Windows XP Windows XP
  • Browser:
  • Firefox 27.0 Firefox 27.0
    • View Profile
Re: SD card interface
« Reply #88 on: 2014.March.16. 22:15:56 »
As I understand, Wifi SD cards work(apart as a storage) as an access point in which, once connected, you can read or write the files inside the card. Thus, is not the EP which operates the Wifi side, it works by itself. Even some wifi SD-cards act as a repeater of another wireless point, and then the PC, phone or tablet not lose access to the Internet.


It acts like a wireless host connection, you don't have to constantly extract the SD card and put it on a card-reader near a PC, you manage the SD files confortably on a drawer inside the PC(or phone or tablet).

-----------------
Según yo lo veo, Las tarjetas Wifi-SD funcionan(a parte de como almacenamiento) como un punto de acceso, en el cual, una vez conectado, puedes leer o escribir los fichero que hay dentro. Por lo tanto, No es el EP el que opera la parte Wifi, funciona por si misma. Incluso algunas funcionan como repetidores de otros puntos de acceso inalambricos, para que el PC, smartphone o tablet no pierdan su conexión a Internet.

Actúa como una conexión host inalámbrica, no tienes que constantemente sacar la tarjeta SD e introducirla en un lector de tarjetas cerca del PC, tú manejas los ficheros de la SD confortablemente dentro de una carpeta en el PC( o smartphone o tablet)
« Last Edit: 2014.March.16. 22:29:55 by gflorez »

Offline Z80System

  • EP addict
  • *
  • Posts: 3835
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 33.0.1750.154 Chrome 33.0.1750.154
    • View Profile
Re: SD card interface
« Reply #89 on: 2014.March.16. 22:24:14 »
Quote
As I understand, Wifi SD cards work as an access point in which, once connected, you can read or write the files inside the card. Thus, is not the EP which operates the Wifi side, it works by itself.
Yes, I'm agreed,

but I am afraid of the wifi can understand only more modern filesystems on the SD card, like FAT32, exFAT, NTFS or maybe FAT16 ... but EP SD card solutions (Zozosoft's one or this new constructing one) handle only FAT12 filesystem.

So when we will format a wifi SD card to this FAT12, then probably the wifi part can not read/write the EP partitions anymore because of the filesystem...

I'm not sure, but probably it will be the situation ...
« Last Edit: 2014.March.16. 22:29:26 by Z80System »
Z80 System