Jump to content

LessNick

Members
  • Posts

    113
  • Joined

  • Last visited

Recent Profile Visitors

646 profile views

LessNick's Achievements

Chopper Commander

Chopper Commander (4/9)

106

Reputation

  1. I was only able to run it in Atari800win with settings as the right cartridge. And something tells me that this is a very specific thing in itself.
  2. Very interesting, but does this rom work in at least one emulator? I tried different combinations and versions and none of them worked run in Altirra.
  3. The format is partially supported in my hardware project - AstartA.
  4. Finally I was able to transfer data at 57600 speed from Atari to PC via SIO. The answer was found in the source code for working with MIDI. Oddly enough, this helped to correctly initialize the port and prepare it for data transmission. At the moment my code looks like this and works great: ;--------------- sioSend jsr sioSetup lda #$A0 sta AUDC4 ; $D207 lda #$08 ; $08 -57600 sta AUDF3 ; $D204 lda #$00 ; $00 sta AUDF4 ; $D206 lda #$28 sta AUDCTL ; $D208 ; 76543210 lda #%00100011 ; #$23 sta SKCTL ; $D20F lda #$01 sta SKREST ; $D20A ldx #00 sioLoop lda msg,x cmp #$9b beq sioCont inx cpx #$20 beq sioCont sta SEROUT ; $D20D a>SIO WAIT lda XMTDON ; $3A - wait for irqs beq WAIT ; to do their lda #0 ; stuff... sta XMTDON ; $3A - reset flag jmp sioLoop sioCont ldx #$00 rts ;--------------- ; enable serial I/O ;--------------- sioSetup lda #$73 ; ALLOW I&O concurrently! sta SSKCTL ; $232 - set the serial port control, sta SKCTL ; $D20F - and shadow lda POKMSK ; $10 - get irqen mask and #$CF ; no keyboard interrupts clc ora #$30 ; allow both types sta POKMSK ; $10 - of serial interrupts sta IRQST ; $D20E lda #0 ; reset transmit sta XMTDON ; $3A - done flag rts ;--------------- msg dta c'A SUCCESSFUL WRITE!' dta $9B Thanks again for your help!
  5. I experienced another shock when I tried to increase the speed further by setting (4,0) for 74880 and (0,0) for 115200 o_O, respectively. And what was my surprise when I saw the data at these speeds!!! True, we must admit that 115200 already had a bit garbage data, but perhaps these are BASIC features. I still haven’t figured out the Assembler code
  6. Thank you very much for the detailed explanation. I’ll try to figure out how to implement all this on assembler, but for now I’ve made a small table of calculations: I tried changing the values in the example in BASIC and lo and behold, everything works great, even at 57600!!! I'm shocked All that remains is to figure out the nuances.
  7. I did not disable interrupts, and therefore everything works by default. I added a bit check to the code, but it looks like I need the 3rd bit, not the 4th. ; bit 7 1 = [BREAK] key interrupt pending ; 6 1 = keyboard interrupt pending ; 5 1 = serial input interrupt pending ; 4 1 = serial output interrupt pending ; 3 1 = serial output-finished interrupt pending ; 2 1 = timer 4 interrupt pending ; 1 1 = timer 2 interrupt pending ; 0 1 = timer 1 interrupt pending sioWait lda IRQST ; 76543210 and #%00001000 ; 3 - serial output-finished interrupt pending beq sioWait It has become much better, the text has become meaningful, but nevertheless some of the bytes disappear. After running the debugger in Altirra, I was convinced that the logic was correct. A byte is sent, bit 3 is set to 0, after several cycles it becomes 1. We send the next byte to SIO, but bit 3 is immediately 1 o_O, that is, no one reset it to 0 and again we get an overflow. After some time, it becomes 0 and the truly desired symbol is delivered correctly. I'm at a loss as to what is going wrong. Can you give me an example of working code? p.s. If i use bit 4, it never becomes 0, it is always equal to 1.
  8. Hello there o/ I'm trying to figure out how SIO works from the Atari side. I came across an interesting and fairly simple example of sending data from BASIC: 10 POKE 53767,160 20 POKE 53764,86 : POKE 53766, 0 30 POKE 53768,40 40 POKE 53775,35 : POKE 53770,1 50 FOR A=32 TO 125 60 POKE 53773, A 70 NEXT A It worked perfectly and in the console on the PC I saw a line and sequences of ASCII characters. The only caveat was to change the PC port settings to 9600 speed. I tried to repeat this code by assembler: lda #$A0 sta AUDC4 ; $D207 lda #$56 sta AUDF3 ; $D204 lda #$00 sta AUDF4 ; $D206 lda #$28 sta AUDCTL ; $D208 lda #$23 sta SKCTL ; $D20F lda #$01 sta SKREST ; $D20A ldx #00 sioLoop lda msg,x cmp #$9b ; End? beq sioCont inx cpx #$20 ; Max Len? beq sioCont sta SEROUT ; $D20D jmp sioLoop sioCont ldx #$00 rts msg dta c'A SUCCESSFUL WRITE!' dta $9B However, I was disappointed; sometimes the first symbol appeared, sometimes it was just garbage. I would venture to suggest that BASIC somehow withstands pauses between sending the next byte to SIO, when my code sends without any delays and it seems that on the PC side the reception simply choke. Actually two questions, the first is how to correctly set the necessary delays? And secondly, how can I change the data transfer rate other than 9600? If I understand correctly, then the speed is determined by the values in: lda #$56 sta AUDF3 lda #$00 sta AUDF4 However, I was unable to find any descriptions of how these values are set. Thank you very much in advance!
  9. Once again I want to say a huge thank you to everyone. After lengthy battles, I finally managed to load BruceLee.atx It was undoubtedly an interesting experience. The system periodically checked phantom sector 17 during load. And then she caused me slight confusion by requesting a sector outside the floppy disk (3000+) The log from RespeQt came to the rescue, it turns out it’s enough to send a NACK to SIO and that’s enough. \o/
  10. Thank you very much for the link, I'll definitely read it. Just woow! o_O Oh, now it’s a little clearer why duplicate sectors are needed. Thank you very much again for the clarification.
  11. It’s difficult to answer exactly how it will actually be by position, but the title description clearly indicates the sector number and it doesn't matter what position is it. As far as I understand, this could be virtually any number. For example, when creating an ATX image in the ATR Tools program, you can see how the numbering changes depending on the selected Sector Layout. And when editing a track, you can set any sector number, including 0th I don't presume to say that ATR Tool is an ideal program, but it at least gives some idea of how it all works.
  12. Heh, this is the first thing I read. Without this page, I would not have been able to understand the structure of the ATX format at all. Although it must be admitted that it is written rather confusingly and the purpose of some areas on the floppy disk remains unknown. Perhaps the information there is a little outdated, since on the same git sdrive-max there is slightly different information in the header files.
  13. Hello there o/ Can anyone explain to me, in a simpler way, how the request for a sector number (block?) from the Atari Side via SIO is transliterate to the Track/Sector position on a real floppy disk? How does a disk drive generally understand what they want from it and which sector needs to be read? Let's take for example a disk image in ATR format. Everything there is quite simple, the sectors follow each other in order. Knowing the sector size, it is not difficult to calculate the offset within the disk image when requested by SIO. Working with a regular disk in ATX format turned out to be a little difficult. There is already redundant information about partitioning into tracks/sectors. But nevertheless, even here the sectors have numbering, and even if they are not in order, but mixed up first odd, then even, you can, at the very least, get an offset with the desired data block. It’s a little more difficult to calculate the correct offset to the beginning of a data block if there are different numbers of sectors on different tracks, for example more or less than 18. But this problem is also solvable in principle. But I’m completely at a loss as to what actually happens when there are no sequential sector numbers on the track (for example, 5, 8, 16), but there are sectors with numbers outside the numbering (for example, 36, 29, 66). I understand that this is some kind of clever copy protection (or something like that), but how does the drive positioning work in this case? For example, a request came from Atari to read sector number 716. Having calculated according to the description of the ATX structure, we got the position Track 39, Sector 4 and... Tadaaam! There is no sector number 4, there are sectors number 3 and 6, but 4 and 5 are missing. And what should you do in this case? Return an error that the sector was not found? But I have a strong belief that because of this mess with numbering, I actually get the wrong offset to the data. Thank you very much in advance for your answer.
  14. OK, thanks. It just seems to me that, along with the requirements for memory [req 64K], a short notation like [req RW] would also be quite understandable.
×
×
  • Create New...