flashjazzcat Posted June 12, 2014 Share Posted June 12, 2014 Decided to give 1.00 Preview 6 a go this evening since I needed to handle a 256KB file in a mounted folder. Unfortunately Aspeqt did not appear to return EOF after byte 262,144 (the last byte of the file) had been read. Fortunately UFlash (the software reading the file) does a sanity check to ensure a ROM file of an incorrect size is not programmed to the flash ROM (otherwise the Ultimate 1MB could have been bricked). I have not ascertained whether the extra byte returned by the CIO is simply a spurious appendage to the actual file, or whether something more serious has occured, such as the entire file content being offset by one or more bytes. I'll try to establish one way or another. Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3009567 Share on other sites More sharing options...
atari8warez Posted June 13, 2014 Share Posted June 13, 2014 (edited) So you were expecting to read 262,144 bytes from the file but AspeQt returned exactly how many bytes? I assume you were using SDX as the DOS, or was it something else? Edited June 13, 2014 by atari8warez Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3009818 Share on other sites More sharing options...
flashjazzcat Posted June 13, 2014 Share Posted June 13, 2014 So you were expecting to read 262,144 bytes from the file but AspeQt returned exactly how many bytes? I assume you were using SDX as the DOS, or was it something else? Yes: the file is 262,144 bytes long and the DOS is SDX. Please find attached a specially written test program, together with the ROM file in question: Aspeqt_Test.zip The program reads the ROM file (SDX446UL.ROM, which should be located in a mirrored folder on drive 2) in 8KB blocks and shows how many bytes have been read, and a running count of the file chunks. Using SDX 4.46 in Altirra with a DOS 2.5 mirrored folder on drive 2, the program correctly returns EOF after chunk #31. However, using the same version of SDX on real hardware with Aspeqt 1.00 Preview 6, the program successfully read fifty 8KB blocks until I pressed reset. I can only conclude that Aspeqt will return bytes from the stream ad infinitum. I don't know from what part of the file the spurious bytes are being returned, and I don't really have time to write a program which presents the blocks on the screen in hex format for inspection, etc. Here's the test program's source code, just to demonstrate that it simply reads 8KB blocks and quits on a short buffer or EOF: icl 'stdio.inc' icl 'macros.inc' org $2000 .local start jsr printf .byte 'Opening test file',155,0 jsr OpenFile bpl Loop jsr Close jsr printf .byte 'Error opening file',155,0 rts Loop jsr Read8KChunk sty Status lda icblen,x tay ora icblen+1,x beq EOF sty ptr1 lda icblen+1,x sta ptr1+1 jsr printf .byte 'Chunk %b - Bytes read: %d',155,0 .word Chunk,ptr1 inc Chunk cpw ptr1 #8192 bcc EOF lda Status bpl Loop EOF jsr Close jsr printf .byte 'EOF Reached - status: %b',155,0 .word Status rts .endl .local OpenFile ldx #16 mwa #FileName icbadr,x mwa #64 icblen,x mva #3 iccom,x mva #4 icaux1,x mva #0 icaux2,x jmp ciov .endl .local Read8KChunk ldx #16 mwa #Buffer icbadr,x mwa #8192 icblen,x mva #7 iccom,x jmp ciov .endl .local Close ldx #16 mva #12 iccom,x jmp ciov .endl icl 'printf.s' FileName .byte 'D2:SDX446UL.ROM',0 Chunk .byte 0 Status .byte 0 Buffer .ds 8192 run Start Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3009884 Share on other sites More sharing options...
atari8warez Posted June 13, 2014 Share Posted June 13, 2014 Thanks, I'll take a look at this after I am done with the other tasks that I am currently busy with. 1 Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3009969 Share on other sites More sharing options...
flashjazzcat Posted June 13, 2014 Share Posted June 13, 2014 (edited) Looks like a fairly simple issue, if I understand the implementation correctly: atariFiles[atariFileNo].pos = (125+((sector-433)*125)); file.seek(atariFiles[atariFileNo].pos); data = file.read(125); next = sector + 1; if (sector == 1023) next = 433; When the last usable sector is reached, the sector number wraps around to 433, but the file offset also wraps back around to the start since it is solely based on the sector number. Therefore any file which requires sector numbers to be reused will never reach the end. Surely an additional counter is required: if (sector == 1023) { next = 433; pass++; } The file offset calculation would then take "pass * (591 * 125)" or similar into account. I didn't implement the re-use of sectors (hence there was a hard limit of 90KB or so on the file size), but clearly if you're going to re-use sector numbers (which is obviously the intention), something along the lines of the above is needed. Edited June 13, 2014 by flashjazzcat Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3010094 Share on other sites More sharing options...
atari8warez Posted June 13, 2014 Share Posted June 13, 2014 Thank you for looking into this, as I mentioned above I will get to it at the first opportunity. Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3010114 Share on other sites More sharing options...
atari8warez Posted June 13, 2014 Share Posted June 13, 2014 (edited) UPDATE: I would like to announce the availability of the official Linux binaries for AspeQt v1.0.0-preview-6 (and for future versions). The executable runs successfully with a default Ubuntu installation and possibly with other distros like Debian etc... Here's the readme file included with the tar archive. AspeQt is now officially supported under Linux (specifically Ubuntu v14.04 LTS and above) as well as MS Windows (8/7/Vista/XP). Distributed binary may also run as is on other Linux distros like Debian, and derivatives of Ubuntu like Xubuntu, Kubuntu etc... As most linux distros include support for QT runtime, no separate Qt libraries are provided with the executable. If your particular distro does not include qt libraries, or is missing some, you will need to download and install them separately with the following command: sudo apt-get install <Qt library name> To find out which shared libaries are needed, change to the folder where AspeQt is located and type the following: ldd ./AspeQt As always other sources still provide binaries for older versions of AspeQt on various linux distros and for Mac OS X Edited June 13, 2014 by atari8warez 1 Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3010122 Share on other sites More sharing options...
flashjazzcat Posted July 15, 2014 Share Posted July 15, 2014 Has anyone compiled a 32-bit OS X binary? Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032106 Share on other sites More sharing options...
freetz Posted July 15, 2014 Share Posted July 15, 2014 It should work with the following command: qmake -spec macx-g++-32 This works fine in the beginning but then (probably predictably) throws endless pages of errors because Qt's libraries aren't 32-bit. This in turn would mean having to compile Qt manually (as the compiled versions on the website are all 64-bit) - and this takes hours if not days. What would be the advantage of having a 32-bit binary? Isn't Snow Leopard (which is probably the latest version that runs on older Macs) available in 64-bit? Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032134 Share on other sites More sharing options...
flashjazzcat Posted July 15, 2014 Share Posted July 15, 2014 It should work with the following command: qmake -spec macx-g++-32 This works fine in the beginning but then (probably predictably) throws endless pages of errors because Qt's libraries aren't 32-bit. This in turn would mean having to compile Qt manually (as the compiled versions on the website are all 64-bit) - and this takes hours if not days. What would be the advantage of having a 32-bit binary? Isn't Snow Leopard (which is probably the latest version that runs on older Macs) available in 64-bit? Thanks man. I'm installing QT under Snow Leopard as we speak. The hardware isn't [cough] Apple-certified and the kernel won't run in 64-bit mode, but after booting with -Force64, the 32-bit kernel at least allows the 64-bit QT installer to work. Unfortunately the 64-bit Aspeqt build crashes for me immediately on executing for reasons unknown. Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032136 Share on other sites More sharing options...
freetz Posted July 15, 2014 Share Posted July 15, 2014 Well, it took hours on my Mac Mini 2009 to compile Qt (and then I aborted, so don't know how long it would have taken in the end), so good luck with that . I wonder if in that case a Windows virtual machine running AspeQt would be the easier way? In any case, send me the binary once you get it up and running and I can put in on my site as well... Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032144 Share on other sites More sharing options...
flashjazzcat Posted July 15, 2014 Share Posted July 15, 2014 I'm keen to avoid compiling a 32-bit QT. I harboured some vain hope that simply recompiling Aspeqt itself might yield results, although there's no specific logic behind that assumption. I haven't tried running the Windows build of Aspeqt in Wine yet; that will probably work (the FTDI driver works fine, although SIO server will only work with single density ATRs using the OS SIO routine; SDX times out). Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032150 Share on other sites More sharing options...
freetz Posted July 15, 2014 Share Posted July 15, 2014 So what does the above mentioned qmake command with 32-bit option output for you? If this would support your other great projects, I'd have my Mac running overnight to compile Qt in 32-bit and then (hopefully) get a 32-bit AspeQt binary. But if this is more of a proof of concept kind of thing, I'd have my Mac better things to do ... Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032153 Share on other sites More sharing options...
flashjazzcat Posted July 15, 2014 Share Posted July 15, 2014 64-bit QT Creator installs but won't even open, so I'll try one of the older builds and test the qmake command. Yes: it's more of a proof-of-concept thing - totally non-critical - so please don't give your Mac any sleepless nights (thanks!). Just trying to broaden my coding horizons a bit. Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032155 Share on other sites More sharing options...
freetz Posted July 15, 2014 Share Posted July 15, 2014 Ok Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032157 Share on other sites More sharing options...
+DrVenkman Posted July 15, 2014 Share Posted July 15, 2014 Sounds like you guys have at least given this a shot already. Me, I'm just talking out of my ass and offering to give it a try, lol! It will probably be at least next week before I can give compiling it a try. If someone succeeds before then, please let me know! Also, just out of curiosity, has anyone tried yet with the Xcode 6 Beta? Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032201 Share on other sites More sharing options...
flashjazzcat Posted July 16, 2014 Share Posted July 16, 2014 Interesting: just tried the Mac OS X build of Aspeqt which Ray linked to a few posts back on the Intel laptop with OS X 10.6.8 and it worked fine. So the problem appears to be the AMD-friendly kernel on the desktop machine (rather than some peculiarity of the OS X version) causing Aspeqt and QT Creator both to crash on launch. Oh well: out-of-spec operation... I'll have to save up for an iMac. At least QT 5.2 will run on the laptop too, which might help (XCode 4.2 is the highest I can go, BTW). Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032345 Share on other sites More sharing options...
+DrVenkman Posted July 16, 2014 Share Posted July 16, 2014 Interesting: just tried the Mac OS X build of Aspeqt which Ray linked to a few posts back on the Intel laptop with OS X 10.6.8 and it worked fine. So the problem appears to be the AMD-friendly kernel on the desktop machine (rather than some peculiarity of the OS X version) causing Aspeqt and QT Creator both to crash on launch. Oh well: out-of-spec operation... I'll have to save up for an iMac. At least QT 5.2 will run on the laptop too, which might help (XCode 4.2 is the highest I can go, BTW). That is an interesting find. I have an AMD Radeon in this MacBook Pro, which is experiencing the repeated crashes. I'm currently running 10.10 DP3 and can't downgrade without completely wiping my drive, which I'm not inclined to do. Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032383 Share on other sites More sharing options...
flashjazzcat Posted July 16, 2014 Share Posted July 16, 2014 (edited) In my case it's an AMD CPU which seems to be at the root of the problem. I tried different kernels, clean user account, and even pulled the Radeon card out of the desktop PC, and anything QT-related still crashes on launch. Anyway: the OS X build of Altirra Aspeqt looks and works great on the Intel laptop. Edited July 16, 2014 by flashjazzcat Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032607 Share on other sites More sharing options...
freetz Posted July 16, 2014 Share Posted July 16, 2014 Whatwhatwhat? OSX Altirra build? Where? That would be too awesome! Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032609 Share on other sites More sharing options...
flashjazzcat Posted July 16, 2014 Share Posted July 16, 2014 Ahem... that should be Aspeqt. Just testing your reflexes. Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032611 Share on other sites More sharing options...
freetz Posted July 16, 2014 Share Posted July 16, 2014 Awwww Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032615 Share on other sites More sharing options...
+DrVenkman Posted July 16, 2014 Share Posted July 16, 2014 In my case it's an AMD CPU which seems to be at the root of the problem. I tried different kernels, clean user account, and even pulled the Radeon card out of the desktop PC, and anything QT-related still crashes on launch. Anyway: the OS X build of Altirra Aspeqt looks and works great on the Intel laptop. What processor and video card are you using on that laptop? Is that the 10.6.8 machine? I might install Aspeqt on my wife's Mac running 10.9 and see if still crashes. Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032643 Share on other sites More sharing options...
flashjazzcat Posted July 16, 2014 Share Posted July 16, 2014 OK: the laptop has a dual-core Pentium and (IIRC) X3100 Intel graphics, which happens to work OOTB with QE/CI. 10.6.8 installed, Aspeqt works fine, although QT has a problem installing "clang" and won't compile Aspeqt (can't locate OS X 8.xx SDK or something). Desktop PC has a Radeon 5750 (works OOTB) and AMD Llano CPU. Legacy kernel running in 32-bit mode with 64-bit user space, Aspeqt and QT Creator both crash on launch with an exception error - something to do with thread 0. I'm wondering if QT binaries have an absolute dependency on Intel CPUs. Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032653 Share on other sites More sharing options...
+DrVenkman Posted July 16, 2014 Share Posted July 16, 2014 (edited) Weird stuff. My Mac (MacBook Pro, early '11) is a Core i7, so it's not just possible Intel-dependency that's causing AspeQt to crash. Must be something in the 10.10 build that's killing it here. The crash logs are delightfully detailed but impenetrable to me (so far at least). The nutshell version is this: Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Application Specific Information: Assertion failed: (_consumed <= scratch_size), function _hb_coretext_shape, file src/hb-coretext.cc, line 764. Edited July 16, 2014 by DrVenkman Quote Link to comment https://forums.atariage.com/topic/154949-aspeqt-yet-another-sio2pcape-clone/page/30/#findComment-3032662 Share on other sites More sharing options...
Recommended Posts
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.