Drag and drop issue

I use an emulator called Altirra, it emulates Atari 8bit computers.

The emulator supports drag and drop but if I try a drag and drop from an opus screen you get the no entry type icon, if then try the same thing from a windows explorer window it works perfectly. i have Opus set as a the exploroer replacement but for some reason it's refusing to play ball?

Windows 7 x64
All drivers up to date

Any idea's please?

You'll have to explain how to reproduce the problem. I downloaded Altirra and a random Atari 800 ROM but dropping the .atr, .cas or .zip file on Altirra doens't do anything at all even from Explorer.

Hi Leo, if you don't have the needed system roms the set then under system / Firmware set it to HLE Kernel, from there you should be able to d&d (or in this case not in Opus)

You need to explain what to download from where and then what to do with it. I have no clue about Atari 800 emulators, their ROMs, kernels, etc. :slight_smile:

FWIW, I used the "attach cartridge" menu item on the ROM I downloaded and it loaded the game fine, so it seems like it is working, but drag & drop does nothing from Explorer or Opus.

[quote="leo"]You need to explain what to download from where and then what to do with it. I have no clue about Atari 800 emulators, their ROMs, kernels, etc. :slight_smile:

FWIW, I used the "attach cartridge" menu item on the ROM I downloaded and it loaded the game fine, so it seems like it is working, but drag & drop does nothing from Explorer or Opus.[/quote]

Here's a link to the latest beta version (its very stable)

virtualdub.org/beta/Altirra-1.8-test12.zip

Get say this game from here

atarimania.com/game-atari-40 ... _s889.html

With that emulator unzipped just run it and only bother to change the System / Firmware to HLE kernal and theb drag and drop that zip file onto the running emulator, from Opus I get the circle with the line across ie no entry but doing it from an explorer window gets a little plus pointer and resets the machine and loads that game.

erm, resets the emulated machine that should have said..Oops, it does NOT reset the PC :slight_smile:

Using Altirra 1.8 beta seems to be the key, since 1.7 doesn't seem to respond to drag & drop at all (and always shows a drag cursor).

I see the same as you with the 1.8 you linked to. Do you know if the source code to that version is available? I only see binaries and source for 1.7 on the site for it. It'll probably be easy to see what's going wrong if I can see how it handles the drop stuff.

Thanks for looking, luckily he posts the sources..

virtualdub.org/beta/Altirra- ... 12-src.zip

Thanks for the help here, all other d&d emulators work from Opus.

Thanks for the link! I think I've found the problem.

I've just posted this over on the Altirra/VirtualDub blog as well, but I'll put it here as well for completeness:

[quote="I"]Hi,

I've debugged the drag & drop issue between Directory Opus and Altirra 1.8-test12 and I think I know where the problem is.

In ATUIDragDropHandler::DragEnter and ATUIDragDropHandler::Drop (both in uidragdrop.cpp), Altirra sets etc.lindex=0 before calling pDataObj->QueryGetData. Opus rejects this as invalid, expecting -1 to be passed, and returns DV_E_LINDEX.

My interpretation of MSDN is that -1 is the correct value for etc.lindex in this situation. However, Explorer allows both 0 and -1, and is what most people will test against, so Opus gains nothing from the stricter test.

(In fact, Opus already allows 0 for the GetData call; only the QueryGetData is problematic. Opus used to be strict about both but relaxed its GetData check after it was found to break drops on some tools. The strict check in QueryGetData was overlooked because it hadn't caused any (known/reported) problems until now.)

SUMMARY:

  • IMO, Altirra should change its DragEnter and Drag methods to set etc.lindex=-1 instead of 0.

  • Additionally, the next version of Opus should relax its checks and allow lindex=0. (An Opus update went out a few days ago so it might be a while before the next one, FWIW.)

  • While the problem will be fixed so long as either program is changed, it makes sense to change both as there are lots of other tools out there on both sides of drag & drops.

Leo[/quote]

Leo, thank you very much for the time and work here..

A star as always!

In the last minute Phaeron the Author of Altirra has released a fixed version and posted a thank you to you for the debug...

Cheers mate...