Jump to content
IGNORED

Multi-Sprite Trick Emulation Bug in Javatari.js?


Recommended Posts

I'm a fledgling Atari programmer, and for the past two days I've been trying and failing to get a working example of the multi-sprite trick with repeated writes to RESP0 and RESP1. I finally concluded that I'm running into a bug in the Javatari.js emulator that's built into 8bitworkshop.com! But this seems hard to believe. Could somebody please check my reasoning?

 

I've been following the discussion of the multi-sprite trick here:

But even when I copy-pasted the working code snippets that were posted by @shazz and @Omegamatrix in that thread, they didn't work for me in 8bitworkshop. The sprites never lined up quite right. Whenever the last sprite in a triplet wrapped around and appeared on the left side of the screen, its position was off by two pixels. But those two authors had both posted screenshots showing their code working with nice even spacing between all the sprites.

 

I then downloaded Omegamatrix's FullBalloonTest.bin that was posted in another thread, ran it in Stella, and it worked as advertised. Evenly spaced sprites. So I used distella to disassemble FullBalloonTest.bin and import the disassembled asm file back into 8bitworkshop, where it didn't work. The sprite spacing was glitchy, and the text at the bottom was also broken. To complete the test, I finally re-exported the new ROM from 8bitworkshop and opened it in Stella, just in case some kind of error had been introduced during the disassembly. The re-exported ROM looked good in Stella, with the correct sprite spacing.

 

When it comes to the multi-sprite trick, it sure looks like there's a bug (or a "difference in behavior") between Stella and 8bitworkshop's version of Javatari.js. Has anyone encountered this before, or know of a work-around? 

 

Here's the source file that I tested with, and the resulting ROM that's built from it. This is a just a disassembled and reassembled version of Omegamatrix's original ROM.

 

FullBalloonTest.asmballoons.a26

 

Here are two screenshots showing the ROM running in Stella and in Javatari.js

 

stella.thumb.png.62eb44b4a25da0e458b1b9ad0538bbde.png  javatari-8bitworkshop.thumb.png.2978dac58412dad1c86b9bf8059ba5d0.png

Link to comment
Share on other sites

6 hours ago, bigmessowires said:

When it comes to the multi-sprite trick, it sure looks like there's a bug (or a "difference in behavior") between Stella and 8bitworkshop's version of Javatari.js. Has anyone encountered this before, or know of a work-around? 

It's a flaw in 8bitworkshop's emulation unfortunately. The balloons case is caused by how the RESPx signal interacts with the signal that indicates the player should start drawing.

 

To my knowledge, there's no hardware version of the Atari2600 that exhibits this behaviour.

 

Personally, I wouldn't try to work around it and to use Stella (or Gopher2600 or 6502.ts) when exploring these more advanced ROMs. 8bitworkshop is awesome but these more advanced methods aren't always displayed correctly.

 

 

 

  • Like 2
Link to comment
Share on other sites

3 hours ago, JetSetIlly said:

8bitworkshop is awesome

 

I think 8bitworkshop is awesome too. I am a big fan of online IDEs, especially when they are updated regularly.

 

Unfortunately they are using a very very old version (v0.91) of javatari. I assume it is because they had to do some modifications to hook it to the IDE. The current version of javatari is v5.0.4

image.thumb.png.5252ee61e3290a04d51b4a205f05b7a5.png

 

Link to comment
Share on other sites

I can confirm the balloon demo works correctly in the latest version of Javatari 5.0.4 at https://javatari.org/ . So you're right, this is a problem with 8bitworkshop using an out-of-date Javatari version.

 

What IDE or workflow would you recommend for a beginner, if 8bitworkshop can't be trusted to show correct results? I really like the fact that it's web-hosted, and that the results of my code changes are reflected immediately with new behavior in the emulator. And all the integrated tools for debugging, code analysis, automatic cycle counting... it's really amazing. I would be sad to switch to a traditional code editor plus DASM plus Stella combination. I'll try contacting the 8bitworkshop admin and see if it would be possible to update the Javatari version they're using.

Link to comment
Share on other sites

52 minutes ago, bigmessowires said:

I can confirm the balloon demo works correctly in the latest version of Javatari 5.0.4 at https://javatari.org/ . So you're right, this is a problem with 8bitworkshop using an out-of-date

Javatari version.

 

The RESPx issue has been fixed in the latest version, but there's still another issue with the rendering at the bottom of the screen. Not sure what's causing this exactly but a quick look at the disassembly suggests it's NUSIZx related.

 

image.png.071cb5aac3b0906d477ec925248f55f6.png

 

52 minutes ago, bigmessowires said:

What IDE or workflow would you recommend for a beginner, if 8bitworkshop can't be trusted to show correct results?

If you want an emulation with which you can guarantee correct results, you should use one of the emulators I mentioned before. For your purposes I would recommend Stella.

 

For an IDE, a lot of people like using VSCode with Atari Dev Studio.

 

https://marketplace.visualstudio.com/items?itemName=chunkypixel.atari-dev-studio 

 

 

  • Like 3
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...