Jump to content
phaeron

Altirra w/VBXE emulation

Recommended Posts

I got a bit jealous of all the threads with people playing with Video Board XE equipped Ataris and in a fit of insanity started emulation support for it in my emulator, in case anyone's interested:

 

http://www.virtualdub.org/beta/Altirra-1.5-test8.zip

http://www.virtualdub.org/beta/Altirra-1.5-test8-src.zip

 

System > Video > VBXE to enable. It's still missing a lot of support (no scrolling, minimal blitter, no IRQs, no priorities or collision, partial attribute map support), but I was able to get the few demos I found floating around here like Jet Set Willy VBXE working. LR/SR/HR and 80Text modes are implemented, though. The emulation is based off of the docs for the FX1.2 core and the VBXE is anchored at $D6xx.

Share this post


Link to post
Share on other sites

Coolies.

 

It'll be handy to have (even partially functional) for development. Maybe Heaven can now get going on his VBXE Gridrunner while waiting for his machine to be fixed.

Share this post


Link to post
Share on other sites

Brilliant stuff. I've been dragging my feet over several VBXE projects owing to lack of emulator support. There'll be no excuse now! Keep up this great work. :)

Share this post


Link to post
Share on other sites

I've just had a bit of time to test this out and it's completely awesome, to put it mildly! :) KMK's 80 column notepad had strange characters on the screen, but it still worked and the slideshow demo seems to run perfectly. Altirra will become my preferred emulator within the next couple of releases, I'll wager. I've yet to try out the excellent input mappings option, but I'm hoping I can customize the PC/Atari keyboard translation to my liking. I'd also like to see the emulator remember the last selected disk image/cart when it loads up: it's unclear if this is possible at the moment. But I find the progress you've made on this brilliant program over the last few months quite breathtaking. I can't wait to start using it regularly and developing VBXE apps on it.

Share this post


Link to post
Share on other sites

How does one attach an SDX cartridge image? I can't see any place where one defines such cart, but I can see a snapshot of SDX running under Altirra here: http://www.virtualdu...s/altirra-3.png

 

EDIT: it also seems to "forget" what ATR files have been attached to disk drives, when it is exited. Also, the number of disk drives is limited to 4, I see no reason why they're not at least 8 (or simply the max., i.e. 15).

Edited by drac030

Share this post


Link to post
Share on other sites

Cool, I have been looking for someone to do some accurate emulation for VBXE so I do not have to do my programming and testing on my Atari 130XE. I am still awaiting parts to complete my 130XE MB repair and installation. I am hoping the people who were doing Atari800Win Plus would do something, but understand they are no longer working on it.

 

I see it is from the same person who does VirtualDub and that is an useful application to edit & convert videos captured with a webcam. I have been using it for years.

Share this post


Link to post
Share on other sites

How does one attach an SDX cartridge image? I can't see any place where one defines such cart, but I can see a snapshot of SDX running under Altirra here: http://www.virtualdu...s/altirra-3.png

 

EDIT: it also seems to "forget" what ATR files have been attached to disk drives, when it is exited. Also, the number of disk drives is limited to 4, I see no reason why they're not at least 8 (or simply the max., i.e. 15).

 

You attach it as a regular cart -- Altirra doesn't currently support SDX pass-through. It's also possible that Altirra might not support the mapper mode for the specific cart image you're using; I've only tried an updated version that goes onto an AtariMax cart.

 

Currently Altirra doesn't remember mounted disks/carts on restart; right now you'll have to specify them via the command line.

 

As for disk drives, I didn't see a reason to support more than four seeing as though I never use more than two at most myself.

Share this post


Link to post
Share on other sites

Updated version:

http://www.virtualdub.org/beta/Altirra-1.5-test10.zip

http://www.virtualdub.org/beta/Altirra-1.5-test10-src.zip

 

This version adds the missing patblt support that was screwing up the notepad app, and I fixed the bug in overlay palette switching through the attribute map that was screwing up colors in Mr.Proper. Still need to figure out what's going on with the blits, though, because Mr.Proper seems to be double-rendering the screen one tile off for some reason.

Share this post


Link to post
Share on other sites

hey Phareon, you got small bug in narrow overlay mode (256 pixels wide) - one vertical stripe is visible on the right side of the screen - that doesn't happend on real hardware (scroll.com from vbxe package)

 

could You see 1200xl rainbow logo it seems altirra is missisng blits, if you need the source - let me know, its unfinished, but at least working on real hardware

Edited by candle

Share this post


Link to post
Share on other sites
Altirra doesn't currently support SDX pass-through. It's also possible that Altirra might not support the mapper mode for the specific cart image you're using; I've only tried an updated version that goes onto an AtariMax cart.

 

The "updated" version has several builds and the AtariMax build is rather a demo with limited functionality (e.g. you can't use a hardware clock). I tried the main build, i.e. the intSDX 4.42 (4.42d to be specific) and it simply did not work (black screen, no nothing).

 

Currently Altirra doesn't remember mounted disks/carts on restart; right now you'll have to specify them via the command line.

 

That's bad, so I can't give up A800Win for now (too much hassle with mounting all disk images again and again).

 

As for disk drives, I didn't see a reason to support more than four seeing as though I never use more than two at most myself.

 

I use 8, 32 MB each.

Share this post


Link to post
Share on other sites

 

As for disk drives, I didn't see a reason to support more than four seeing as though I never use more than two at most myself.

 

I use 8. Please consider supporting 8.

Share this post


Link to post
Share on other sites

http://www.virtualdub.org/beta/Altirra-1.5-test11.zip

http://www.virtualdub.org/beta/Altirra-1.5-test11-src.zip

 

Changes:

  • Number of disk drives increased to 8.
  • Mounted cartridges and disks are persisted across runs.
  • Blitter loads data for first blit as soon as BLITTER_START is hit.
  • Implemented PAL artifacting when VBXE is enabled. Note that this can produce different colors due to clamping in RGB space.
  • Implemented blitter modes 2-6.
  • Implemented blitter zooming.
  • Implemented blitter IRQ.
  • Implemented overlay horizontal scrolling.
  • Implemented hires mode of attribute map.
  • Implemented hires portion of xcolor bit (VIDEO_CONTROL bit 1).

 

JSW VBXE and Mr. Proper look much better now.

 

Some things about VBXE I still don't know:

  • Whether the blitter IRQ can be signaled (IRQ_STATUS bit 0) when disabled (IRQ_CONTROL bit 0). This isn't possible in POKEY, but it looks like it is possible in VBXE and that's the way it's currently implemented.
  • How blitter collision detection works. There are two conflicting definitions in the en docs: one says that the upper bits select the relevant bit in the collision mask, the second is in the modes themselves and shows a simple AND operation. They are especially in conflict for HR overlay mode (mode 6), regarding collision mask partitioning.
  • When BLT_COLLISION_CODE is cleared.
  • Cycles per byte for various blitter modes. Altirra is not cycle exact for blits but I can easily adjust the cycle accounting.
  • How vertical scrolling works. VBXE does not have vertical scroll enable bits like ANTIC, so it is unclear when the row counters for the overlay and attribute map are reset.

 

could You see 1200xl rainbow logo it seems altirra is missisng blits, if you need the source - let me know, its unfinished, but at least working on real hardware

 

Yeah, it's because when I read the documentation about the blitter busy bits I was under the impression you guys were going to use them:

(3706: 11,  3) PC=647E A=09 X=05 Y=60 S=F3 P=35 (   I C)  647E: AD 53 D6         LDA $D653 [$D653] = $00
(3706: 11,  4) PC=6481 A=00 X=05 Y=60 S=F3 P=37 (   IZC)  6481: D0 FB            BNE $647E
(3706: 11,  6) PC=6483 A=00 X=05 Y=60 S=F3 P=37 (   IZC)  6483: A9 01            LDA #$01
(3706: 11,   PC=6485 A=01 X=05 Y=60 S=F3 P=35 (   I C)  6485: 8D 53 D6         STA $D653 [$D653] = $00

 

You're overwriting the blitter list before checking if BLITTER_BUSY.BCB_LOAD is set. :roll:

 

Altirra currently only runs blits at the end of a scanline, which is why this is much more likely to occur. It turns out this was what was breaking Mr.Proper as well. I'll probably have to go to a better cycle accounting system to accommodate the, um, creative way you guys are using the blitter. I tried to figure out if there was a way that this could break on real hardware, but it looks like there's enough bandwidth to go around. Even with an HR display (50%), highest resolution attribute map (25%), and the CPU executing directly through MEMAC (12.5%) that still means that the blitter can read the first entry in the blit list in 21 machine cycles, assuming that the VBXE hardware processes it at full speed. You'd have to be issuing blits very quickly to overrun that.

Edited by phaeron

Share this post


Link to post
Share on other sites

Nice stuff, great to see so much work around Christmas.

 

With attribute map, they are in force for whatever number of scanlines you have in the repeat parameter. VScrol should work the same as per Antic VScrol. Rather than selectively enabling it though, you'd tend to split the XDL into multiple parts if e.g. you wanted 32 scanlines scrollable attributes then 16 lines non-scrolling - of course they'd both be scrollable but you can elect not to move the second instance around.

 

HScrol is the opposite to the way Antic does it, ie it'll pull left rather than shifting right.

 

Also, with both types of scrolling, you tend to get "unexpected" results if you have an out of range scrolling value.

 

Unsure here about the IRQ handling - I've played with blits a bit but didn't bother using IRQs. I did a few quick/dirty benchmarks, and yes the speed is different dependant on what else is needing access to VBXE RAM at the same time.

 

 

A request for future release - could you implement real Interlace (480i) emulation? I'd have to write up some means you could easily detect if software is attempting to generate the mode.

Share this post


Link to post
Share on other sites

blitter uses every spare cycle it gets from clock manager inside FX core, busy flag is set as soon as you start the blitter, and blitter loads one element of blitter list to its internal registers before starting the blit, so there is no possibility for 6502 to modify blitter list that blitter is trying to read

a good way out, would be to implement fifo that would copy blitter list from emulated vbxe memory into "blitter space" and continue with the blits from there

 

ps. vbxe clock = 14.18/14.31mhz, cpu clock when accessing vbxe memory or registers = always 1/8 of this, so 6502 has 3 cycles to overrun blitter

Edited by candle

Share this post


Link to post
Share on other sites

These updates are great: VBXE emulation is probably already at the stage where I can use it for the bulk of my development. As draco said, practically speaking it would be nice to see the program remember its settings, such as mounted ATRs and carts. Since the cursor keys still seem quirkily mapped out to me (shift+ctrl+down arrow works, but shift+down arrow produces the same keyscan code), I'm hoping I can customise the keyboard to my liking. However, I'm assuming the key assignments won't be remembered between sessions yet.

 

 

 

Share this post


Link to post
Share on other sites

  • Number of disk drives increased to 8.
  • Mounted cartridges and disks are persisted across runs.

Thanks :) I was imprecise, though: I use 8 images on A800Win just because it does not support more. But on the real hardware I have 15 disks mounted, so could you please add 7 more so cover all the possible SIO units

 

EDIT: Altirra does not seem to be able to correctly open 32 MB ATR files (65535 sectors, 512 bytes each, like the one I posted in the "ATR extension" thread). Since it is not very complicated (sectorsize = $200, all sectors of the same size), could you please consider adding that?

 

Also, it does not seem to like a 16 MB DD (256-bytes-per-sector) image. It's length is 16776336 bytes (65534 sectors * 256 bytes - (3 * 128) + 16), the header values are: $96 $02 $E0 $FF $00 $01 $0F ... (zeros). A800Win opens and accesses it w/o problem, on Altirra the SDX is not able to read/write this disk (error 139 occurs). Could you please verify, what's wrong?

Edited by drac030

Share this post


Link to post
Share on other sites

  • Number of disk drives increased to 8.
  • Mounted cartridges and disks are persisted across runs.

Thanks :) I was imprecise, though: I use 8 images on A800Win just because it does not support more. But on the real hardware I have 15 disks mounted, so could you please add 7 more so cover all the possible SIO units?

 

Which SIO devices support 15?

Share this post


Link to post
Share on other sites
Which SIO devices support 15?

 

KMK/JŻ/IDEa harddisk. Besides, excluding device 0, 15 devices is SIO's maximum, so why limit it?

Share this post


Link to post
Share on other sites
Which SIO devices support 15?

 

KMK/JŻ/IDEa harddisk. Besides, excluding device 0, 15 devices is SIO's maximum, so why limit it?

 

I agree. Isn't that a parallel device?

Share this post


Link to post
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.

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