Jump to content
IGNORED

AspeQt: Yet another SIO2PC/APE clone


cyco130

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by flashjazzcat
Link to comment
Share on other sites

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 by atari8warez
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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 ;)...

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by flashjazzcat
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by DrVenkman
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...