Jump to content
IGNORED

New Atari ST/E Mega ST/E hard disk interface


Recommended Posts

6 hours ago, Chri O. said:

Are you sure you have all your SD card pins connected correctly, the (CS) chip select pins ?

Yes, I have continuity checked all connections and they are fine, however... 

I did find that the card reader I used needed 5V supply as it has

a regulator on board to convert to 3.3V, I assumed it took the 3.3V line (no instructions came with it, just said VCC on the card),

so I removed the 3.3V line and attached the 5V line, it still doesn't seem to work on the STE.

 

I activated the debugger in the code and sent the output to a serial monitor, I can now see it detects a 4Gb SD card

but says there are no partitions, it doesn't see a 32Gb card when that's in and have no more different SD Cards to try.

 

I have use a Micro SD card reader, so suspect it's something it's not liking with the Micro SD cards.

Today I'm going to remove that and fit the bigger standard SD Card reader and hope

that it's more compatible with other cards that I have used with my 8 bit Atari's upgrades.

Link to comment
Share on other sites

Quick update, had an idea that maybe the speed of communication with the card may be the problem, so I

changed to code from FULL_SPEED to HALF_SPEED and now the debug says 

 

-----------------------
ACSI2STM SD bridge v1.1
-----------------------

Initializing ACSI bus ...
ACSI bus ready
Initializing SD card Speed = 10
Size: 30MB - 62688 blocks

 

Will try it later in my STE as it seems to be reporting the size of the first partition
 

Link to comment
Share on other sites

I just stumble upon interesting document from Atari: Application Notes on the Atari Computer System Interface (ACSI) [Sep 27 1985]

It does show nice timings necessary for ACSI interface, perhaps this will be useful for some people.

 

/*  Atari ACSI DMA pinout, looking at the male connector at the ATARI computer:
             19 pin D-SUB
    ---------------------------------
    \ 01 02 03 04 05 06 07 08 09 10 /
     \ 11 12 13 14 15 16 17 18 19  /
       ---------------------------
Pin	Name	Description
1	D0	Data 0
2	D1	Data 1
3	D2	Data 2
4	D3	Data 3
5	D4	Data 4
6	D5	Data 5
7	D6	Data 6
8	D7	Data 7
9	_CS	Chip Select
10	IRQ	Interrupt Request
11	GND	Ground
12	/RST	Reset
13	GND	Ground
14	ACK	Acknowledge           
15	GND	Ground
16	A1	Address bit
17	GND	Ground
18	R/W	Read/Write
19	_DRQ    Data Request
*/
// ATARI Document Archive https://docs.dev-docs.org/
// in category: "Hard Drive" Application Notes on the Atari Computer System Interface (ACSI) [Sep 27 1985]
//
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ----- Command Phase -----------------------------------Alt+0175¯ ------
// DATA direction: From Atari to Target Device                          
// A1    ¯¯¯¯¯¯¯¯\___________________________/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ LOW indicates 1st byte of new command.
// IRQ   ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\___________/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\_____ Active low driven by target device to indicate (A) readness to accept another command byte (B) the availability of a byte to be read.
// _CS   ¯¯¯¯¯¯¯¯¯¯¯¯¯\__________/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\__________/¯¯¯¯¯¯¯¯¯¯
//                     |        |                  |        |           
// R/_W  ¯¯¯¯¯¯\______________________/¯¯¯¯¯¯\____________________/¯¯¯¯¯ LOW from ATARI to Device (Write), HIGH from Device to ATARI (Read)
//               |     |        |     |      |     |        |     |     
// DATA  =======><-------VALID--------><====><-------VALID--------><==== 8bit DATA Bus
//               |     |        |     |      |     |        |     |     
//               |<-a->|<--b--->|<-c->|      |<-a->|<--b--->|<-c->|     
//                Byte 0                      Byte 1                     Byte n
// Timing
// a)  60 ns  (max)
// b)  250 ns (max)
// c)  20 ns  (max)
// IRQ Active LOW (open-collector) 1K Pullup on ATARI.
//
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ----- Status Phase ----------------------------------------------------
// DATA direction: From Target Device to Atari     
// A1    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ HIGH indicates inactive.
// IRQ   ______________/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ Active LOW driven by target device to indicate (A) readness to accept another command byte (B) the availability of a byte to be read.
// _CS   ¯¯¯¯¯¯¯¯¯¯¯¯¯¯\_______________/¯¯¯¯¯¯¯¯¯¯¯
//                     |              |            
// R/_W  _______/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\_____ LOW from ATARI to Device (Write), HIGH from Device to ATARI (Read)
//              |      |              |      |     
// DATA  =====================><----VALID----><==== 8bit DATA Bus
//              |      |              |      |     
//              |<-a-->|<--b-->|<-c-->|<-d-->|     
//                              Byte 0             
// Timing
// a)  50 ns  (max)
// b)  150 ns (max)
// c)  100 ns (max)
// d)  80 ns  (max)
//
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ----- DMA - Data Out Phase --------------------------------------------
// DATA direction: From Atari to Target Device      
// A1   : ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ HIGH indicates inactive.
// DRQ  : ¯¯¯¯¯¯¯\_______________/¯¯¯¯¯¯¯¯¯¯¯¯¯¯\___ Active LOW, DMA Device Data request, Used by the peripheral to request a DMA data transfer.
//                 |                                
// _ACK : ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\______________/¯¯¯¯¯¯¯¯¯¯¯
// R/_W :          |     |      ?       |     |      LOW from ATARI to Device (Write), HIGH from Device to ATARI (Read)
//                 |     |              |     |     
// DATA   ========><----------VALID-----------><==== 8bit DATA Bus
//                 |     |              |     |     
//                 |<-a->|<-----b------>|<-a->|     
//               |<--c-->|              |<--d-->|   
// Timing
// a)  60 ns  (max)
// b)  250 ns (max)
// c)  240 ns (max)
// d)  240 ns (min)
// DRQ Active LOW (open-collector) 1K Pullup on ATARI.
//
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ----- DMA - Data In Phase ---------------------------------------------
// DATA direction: From Target Device to Atari      
// A1   : ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ HIGH indicates inactive.
// DRQ  : ¯¯¯¯¯¯\________________/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ Active LOW, DMA Device Data request, Used by the peripheral to request a DMA data transfer.
//                |                                 
// _ACK : ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\______________/¯¯¯¯¯¯¯¯¯¯¯
//                |     ||              |           
// DATA   =============><--------VALID--------><==== 8bit DATA Bus
//                |     ||              |     |     
//                |<-a->||<-----b------>|<-c->|     
// Timing
// a)  60 ns  (max)
// b)  250 ns (max)
// c)  50 ns  (min)
// DRQ Active LOW (open-collector) 1K Pullup on ATARI.

 

Edited by Chri O.
ADD 19 pin D-SUB pinout ):
  • Like 2
Link to comment
Share on other sites

Well, I think that I need to add here some comments, which some may consider angry, but all I want is to be accurate. I mean, not only myself, but others too ?

 

So, first problem - the name. Why ACSI2STM - that does not make sense. Every STM has ACSI port, so it is actually something like ACSI2ACSI .  It has SD card socket, uses SD cards, so that should be in name. Suggestion:  something like ASTtoSD (since ACSI2SD is used already) .

 

Quote from it's Github page:

" Maximum partition sizes are the following:

  • 32MB for TOS 1.04 (ST and STF series)
  • 64MB for modern Linux kernels
  • 512MB for TOS 1.62 and 2.06 (STE series)

Other TOS versions were not tested.

With different drivers, you may have different limits. This bridge supports 32 bits access for disks bigger than 8GB."

 

No way. TOS 1.04 and 1.62 are totally same considering FAT16 filesystem code - I know it for sure, because I disassembled both, and yes, it is same. And both were released in 1989.  So, if  some SW gives limit of 32 MB for partition - and what the hell, not  only first one for TOS 1.04 it is serious mistake, flaw.   At least what says for 1.62 and 2.06 is correct.

"32 bits access for disks bigger than 8 GB" - huh . Actually, 32 bit access (SCSI 8 byte commands) is needed for disks bigger than 1 GB.

Basic ACSI uses 5 byte SCSI commands, where sector address is sent in 3 bytes instead 4, and from those 24 bits 3 are ACSI target #, so it is effectively 21 bit addressing > 2 POW 21 = 2 Mega sectors = 1 GB .  32 bits can go up to 2048x more = 2 TB .

Is that 8 GB result of using 8 ACSI targets of 1GB each, when not 32 bit access (should say addressing) is used ? Why it is used at all, when it supports 32 bit addressing ? I guess because some ancient drivers.

I  need to mail author (will not write on Github) - anyone know his e-mail address (PM me) .

 

I had some longer mailing in last week with couple people using this and other, similar adapter called ACSI2SD . There is pretty much confusion about what and how ... Still not finished with it.

Link to comment
Share on other sites

8 hours ago, ParanoidLittleMan said:

... So, first problem - the name. Why ACSI2STM - that does not make sense. Every STM has ACSI port, so it is actually something like ACSI2ACSI .  It has SD card socket, uses SD cards, so that should be in name. Suggestion:  something like ASTtoSD (since ACSI2SD is used already) ...

 

It's called that because they uses a STM32 chip on it I think. 

Link to comment
Share on other sites

Yes, and someone said same to me in e-mail. Still, I say that it is bad name, especially for Atari people who associate STM with - we know what Atari model . Then, most of users don't care what components are involved in device, but care about with what can use it.

Then, saying to STM - component what is not final or starting one in data transfer chain is just wrong.  SD card is that, with what ACSI port communicates, transfer data. Plus, people selects usually storage adapter by criteria what storage media it uses, supports.

ACSI2STM could be with CF card socket, with SCSI connector , etc.   I don't like Satanistic names, but even they are better than this.

Link to comment
Share on other sites

  • 3 weeks later...

So finally I am able to read data from SD card on my Teensy 3.5 MCU but for the life of me I cannot write to the drive at all !!!!!!

Maybe this has something to do with PP man demo version HD driver and the HD image I am using ?

Anyways PP man Atari St hard disk performance tester it's showing me on average 890 to 950 KB/s.

 

This is just one of these random tests:

Logical Drive: C

Transfer rate: 942 KB/s

Access time: 2.8 

Edited by Chri O.
Link to comment
Share on other sites

Just to add extra information:

Spoiler

CPU is T_3.5

F_CPU =168000000

ARDUINO =10812

F_PLL =168000000

F_BUS =56000000

F_MEM =28000000

NVIC_NUM_INTERRUPTS =86

DMA_NUM_CHANNELS =16

CORE_NUM_TOTAL_PINS =64

CORE_NUM_DIGITAL =64

CORE_NUM_INTERRUPT =64

CORE_NUM_ANALOG =27

CORE_NUM_PWM =20

 

SD info:

Spoiler

SdFat version: 2.0.0

Assuming an SDIO interface.

type any character to start

init time: 19 ms

Card type: SDHC

Manufacturer ID: 0X3

OEM ID: SD

Product: SC32G

Version: 8.0

Serial number: 0XF849C8A

Manufacturing date: 12/2014

cardSize: 31914.98 MB (MB = 1,000,000 bytes)

flashEraseSize: 128 blocks

eraseSingleBlock: true

OCR: 0XC0FF8000

SD Partition Table

part,boot,bgnCHS[3],type,endCHS[3],start,length

1,0X0,0X1,0X1,0X0,0X6,0XF3,0X30,0X3,63,63488

2,0X0,0XF4,0X30,0X3,0XF,0XD3,0X35,0X8D,63614,2278510

3,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0

4,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0X0,0,0

Scanning FAT, please wait.

Volume is FAT16

sectorsPerCluster: 4

clusterCount:      15831

freeClusterCount:  203

fatStartSector:    66

dataStartSector:   226

Data area is not aligned on flash erase boundary!

Download and use formatter from www.sdcard.org!

type any character to start

 

 

Link to comment
Share on other sites

Yes, let's blame demo SW . Where it says that write with it works not well ? Write is actually important part of gaming - because state saves. And that's why there is some free space on partitions.

So, 32 GB SD card manufactured in 2014 ???  

"Data area is not aligned on flash erase boundary! " - and this is now ridiculous . It is on SD card, or whatever Flash card to take care of boundaries by erase.

Whole thing is just smelly.  Looks like forged card, especially if it is really from 2014.

But what is sure is that write problem is in HW, and 99% the card is culprit.

Please go in some shop and buy brand SD card, just not some very fast one. 8 GB will be fine for regular TOS 1.04 and later. Will cost not more than 10 bucks.

Link to comment
Share on other sites

On 5/10/2021 at 4:42 AM, Chri O. said:

So finally I am able to read data from SD card on my Teensy 3.5

Glad you made some progress, I've not been able to touch mine for some time now due to other things, but

hope to get the Micro SD card interface replaced with the SD card one soon.

Link to comment
Share on other sites

I bought one of these from the OP. His recommended image does not work, shows corrupted files or "0 bytes" in directores. After some fiddling with Hatari I figured out it might be because my German 1040STFM has 1.02 TOS. I also tried another image, the "1000 games on 1GB" (by PLM?) which I think I got from here. This one is much better, most games work. Though some still don't, eg After the War which says "Atari ST 1.02" on the loading screen, so I thought it should.

 

I know very little about ST, mostly stumbling in the dark here. I think that this device is pretty good though, especially at this price, and don't don't regret buying it, even if my TOS might be inadequate.

Link to comment
Share on other sites

I made special image for TOS 1.00 and 1.02 couple couples of months ago.  https://www.mediafire.com/file/hgkdnnwym334ilg/1000GamesT02.zip/file

Which is btw. most downloaded one . So, most of Atari ST users is still on those pre-neandertal TOS versions ?  ?

Why would showing TOS version mean that it must work under it ? It is noted in README.TXT normally. But things are that practically all it works under TOS 1.00 and 1.02 too. However, not from that 1000 games on 1 GB image, that's made with TOS 1.04 min in mind.  Some things need to be set different in hard disk partitions for TOS 1.00 and 1.02 - and not only keeping partition size under 256 MB.

 

And when it is popped out, I must say that got some bad experiences in e-mails . Problems with ST machines, better with STE . And not because TOS version.

The worst part is bunch of total inaccurate claims. And worse is that there are some things which are very easy to check. Still, incorrect writes.

Then, they use my SW, my images without consultation, and I don't see that are aware about many mass storage on Atari relevant things.

Plus, there are indications that some people spreads copyrighted driver SW too. Yeah, that's easier than spending time with collecting facts, doing tests, SW ...

 

 

Link to comment
Share on other sites

Like I said, "I know very little about ST". I 'm using exactly that "1000GamesT02.zip" image and simply saw that few games do not work, so I'm curious what is the reason for it.  Are there any extra steps required to get them working, or is it sometimes just not possible on 1.02?

 

I've just tried After the War on both 1.02 and 1.04 in Hatari and it also crashes after "Insert Disk 2" message.

Link to comment
Share on other sites

Sorry, but Hatari is not criteria. I tested all it on real HW. 

To give answer need more details about Hatari settings .  There are some which need little better knowledge - like CPU settings etc.

And I recommend to go with good old Steem 3.2 (not Steem SSE). Much better for beginners, and by me better overall. If nothing else, less hard things for setting.

 

Link to comment
Share on other sites

Wow!  I completely missed all these posts!

 

Current firmware is rewritten fully in ARM based assembly,

in order to improve compatibility between ST/E machines.

 

Also there are many STM32 fakes around, with not as small differences;

current firmware recognizes the operating controller, such CH32, CKS32, APM32...

in order to use different parts of the code accordingly to their differences,

 

However, it is not arduino based; now it is compiled using commercial tools,

Keil compiler, the official ARM MCU development tools

 

 

A note: Any user that needs custom partitioning,

needs to acquire the excellent Peter Putnik software package (driver + partitioner).

Its a great software for a very low cost,

 

 

 

 

 

 

 

Link to comment
Share on other sites

2 hours ago, masteries said:

However, it is not arduino based; now it is compiled using commercial tools,

Keil compiler, the official ARM MCU development tools

Where can the binary be obtained, the web site still says Arduino Based.

 

I also see that although improved, there are several wiring changes to be made :( 

Lucky for me I still haven't got mine going.

 

Just downloaded and it did compile on Arduino, there is a warning about low memory though

Edited by TGB1718
Update:
Link to comment
Share on other sites

I rewired the unit to the latest design, installed the new software, but still no joy,

I am using the game image posted by @ParanoidLittleMan  I tried ICD Pro, HDUtil demo and

PUtil demo, but none of them saw the drive.

 

When the drivers were searching for drives, the activity LED was flashing on the STM32, so I know

there is some communication going on.

 

This is still using the MicroSD Card reader, so it looks like I will have to replace that with the larger SD card reader

and try again. Tomorrow maybe :)

Link to comment
Share on other sites

On 5/12/2021 at 7:19 PM, ParanoidLittleMan said:

Sorry, but Hatari is not criteria. I tested all it on real HW. 

To give answer need more details about Hatari settings .  There are some which need little better knowledge - like CPU settings etc.

And I recommend to go with good old Steem 3.2 (not Steem SSE). Much better for beginners, and by me better overall. If nothing else, less hard things for setting.

 

When I tried on Hatari it was pretty much the default config. I don't think I changed anything (apart from "Boot from hard drive".) only chose TOS and then your image.

 

But that's less important, I'm more interested in my real hardware. Two games I think should work (judging by the readme) are After The War (screen goes black after Insert Disk Two) and Barbarian (Psygnosis) - shows 4 bombs after second (third?) loading screen. I'm on 1040 STFM, German TOS 1.02. Can provide other details if necesary.

Link to comment
Share on other sites

On 5/13/2021 at 12:07 PM, masteries said:

Wow!  I completely missed all these posts!

 

Current firmware is rewritten fully in ARM based assembly,

in order to improve compatibility between ST/E machines.

 

Also there are many STM32 fakes around, with not as small differences;

current firmware recognizes the operating controller, such CH32, CKS32, APM32...

in order to use different parts of the code accordingly to their differences,

 

However, it is not arduino based; now it is compiled using commercial tools,

Keil compiler, the official ARM MCU development tools

 

 

A note: Any user that needs custom partitioning,

needs to acquire the excellent Peter Putnik software package (driver + partitioner).

Its a great software for a very low cost,

 

 

 

 

 

 

 

Is it possible to download or to buy current firmware from somewhere?

Link to comment
Share on other sites

3 hours ago, nachocientos said:

Is it possible to download or to buy current firmware from somewhere?

I hope so, mine still won't work, but I did compile using Arduino just as the web site says, but this doesn't

seem to work, I would like to obtain the precompiled binary.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...