Jump to content
IGNORED

Altirra 2.30 released


phaeron

Recommended Posts

  • 2 weeks later...

Took a crack at XEP-80 emulation:

 

http://www.virtualdu...-2.40-test9.zip

http://www.virtualdu...0-test9-src.zip

 

Enable in system menu, toggle from View menu. You must load an XEP-80 E: handler from disk to actually use it. Current versions of SpartaDOS X come with an XEP80.SYS handler on CAR: that can be used. Currently the emulation is hardwired to use joystick port 2.

 

The XEP-80 is one weird beast, starting with it hooking up to the joystick port and then to the way the NS405 chip works. I don't actually have an XEP-80, so I had to cobble together everything from available sources. Emulation notes:

  • No ROM images are needed, but I drew the character set manually so a couple of chars may be off, particularly in 50Hz mode when they are 13 scanlines tall instead of 10.
  • Alt+Shift+X is the default shortcut to toggle the screen. I've also put in rudimentary support for automatic switching to/from the 80-column view -- goes to 40 on reset, back to 80 when data is sent to the XEP-80.
  • Partial undocumented command support: $E1-E6, $ED, $EE, $F0, $F2, $F4, $F6, $F7, $F9, $FA.
  • Overscan is currently not emulated in the UI layer, so you can see everything. The XEP-80 has massive overscan.
  • The XEP-80 screen editor acts similarly but not quite the same as the standard Screen Editor. In particular, the Screen Editor works via a logical line start bitfield, whereas the XEP-80 actually stores EOLs in the framebuffer. I've attempted to emulate this behavior.
  • The pixel aspect ratio is a guess based on the timing chain parameters. This is hard to determine because the XEP-80 appears to produce a video signal that is pretty far out of spec (16.3KHz horizontal??).

Things I could use help with:

  • Screenshots from the real hardware of the patterns produced by the internal character generator within the NS405. There's no information about the character set in the internal 7x11 ROM.
  • Screenshots from the real hardware of the last part of the ATRIBUTE.BAS program from the XEP-80 disk where block graphics is activated. From what I've been able to tell, this can't work properly the way the program sets it up because the character set ROM generator is still active when block graphics is selected, which I wouldn't mind confirming.
  • Any programs that have unusual usage patterns of the XEP-80, particularly: NS405 block graphics (hardware, not just the special ATASCII block graphics chars), custom underline/cursor settings, hardware scrolling in graphics mode, custom baud rates, mixed standard and international charsets on the same screen, or non-standard screen sizes or character widths/heights.
  • An indication if anyone cares at all about the printer support. (The people in Atari's peripheral hardware division must have had some strange illness that made them add a parallel printer port to every device they made.)

  • Like 5
Link to comment
Share on other sites

Things I could use help with:

  • Screenshots from the real hardware of the patterns produced by the internal character generator within the NS405. There's no information about the character set in the internal 7x11 ROM.
  • Screenshots from the real hardware of the last part of the ATRIBUTE.BAS program from the XEP-80 disk where block graphics is activated. From what I've been able to tell, this can't work properly the way the program sets it up because the character set ROM generator is still active when block graphics is selected, which I wouldn't mind confirming.

Here we go:

post-9299-0-91696200-1372593740_thumb.png

post-9299-0-54214600-1372593758_thumb.png

post-9299-0-62270400-1372593772_thumb.png

post-9299-0-31022800-1372593785_thumb.png

post-9299-0-71083500-1372593796_thumb.png

post-9299-0-51294600-1372593847_thumb.png

 

so long,

 

Hias

Link to comment
Share on other sites

Well, well, well... What can I say? THANK YOU AVERY!!!!

 

A VERY cool present to find on a Sunday morning!!!

 

And printer support... CERTAINLY! Anything which adds to Altirra's feature set - although as ever, no rush. In your own time and when you feel you have any other bugs squashed.

 

Was there a reason you didn't use the original firmware?

 

And you weren't kidding about the over-scan Phaeron! You do have to pretty much run full-screen to get a readable image, at least on my monitor. Wow... Why did they make it so huge?

Edited by morelenmir
Link to comment
Share on other sites

Well, after I figured out (via step tracing) that the SDX XEP80 driver uses a few locations in the upper half of page zero, I got something working:

 

post-21964-0-64158100-1372611282_thumb.png

 

Few problems, though:

  • Naturally it's pretty damned slow. Would it be quicker to use the "S:" device than "E:"?
  • Related to the above: the driver seems to want to scroll every line below y if you put a character at 79,y. Would using "S:" solve this problem?

  • Like 1
Link to comment
Share on other sites

Fix for burst mode not working properly, and improved logging support (lfe xepdata / lfe xepcmd):

 

http://www.virtualdu...2.40-test10.zip

http://www.virtualdu...-test10-src.zip

 

The communication protocol for the XEP-80 is pretty slow. The protocol is 9 data bits at 15.7KHz, so it takes 11 scanlines to push out a byte. The computer then has to wait for one or more cursor bytes to come back, one if X changes and two if both X and Y change. I've heard that there are hardcoded delays in the default handler that slow it down further. From what I've been able to tell, it is possible to change the baud rate using command $FA, but it would require surgery on the handler too.

 

Don't use S: to try to work around E:. SDX's XEP80.SYS simply doesn't hook S:, and the Atari handler is even worse in that it just sends an escape ($1B) character before every byte! Setting DSPFLG and using E: is faster as then only $D1 (set list flag) and $D0 (clear list flag) commands are sent when you switch modes. With Atari's handler you can also speed up transmission a bit by switching to burst mode with XIO 21 with AUX2=$01 if you can forgo cursor updates, but this may complicate moving the cursor.

 

Here we go:

post-9299-0-54214600-1372593758_thumb.png

 

HA! I was right, Atari's attribute test program is wrong and generate hieroglyphics instead of block chars.

 

Thanks a lot for the caps. Were the character dumps done in ATASCII mode? The character set I'm missing is the one inside of the NS405 chip itself, the one that is selected with XIO 20,#2,12,214,"E". In theory, this should allow the block graphics to work, but EOLs will probably be screwed up.

 

For those with real hardware... here's an experiment to try to hack the XEP-80 with undocumented commands. It attempts to toggle the charset address lines on a per-row basis. If it works, the top third will show the normal charset, the middle third will show the int'l charset, and the bottom third will show garbage (charset ROM bypassed).

 

10 XIO 21,#2,12,0,"E"
20 PRINT CHR$(125);
30 XIO 22,#2,12,194,"E"
40 XIO 21,#2,12,1,"E"
50 POKE 766,255
60 FOR X=0 TO 3
70 PRINT CHR$(36+X);
80 XIO 20,#2,12,225,"E"
90 PRINT CHR$(X+4+32);
100 XIO 20,#2,12,229,"E"
110 NEXT X
120 FOR X=0 TO 3
130 PRINT CHR$(40+X);
140 XIO 20,#2,12,225,"E"
150 PRINT CHR$(X+8+64);
160 XIO 20,#2,12,229,"E"
170 NEXT X
180 POKE 766,0
190 XIO 20,#2,12,0,"E"
200 GOSUB 1000:GOSUB 1000:GOSUB 1000
210 END
1000 POKE 766,255
1010 FOR C=0 TO 63:PRINT CHR$(C);:NEXT C:PRINT
1020 FOR C=64 TO 127:PRINT CHR$(C);:NEXT C:PRINT
1030 FOR C=128 TO 154:PRINT CHR$(C);:NEXT C:PRINT " ";
1040 FOR C=156 TO 191:PRINT CHR$(C);:NEXT C:PRINT
1050 FOR C=192 TO 255:PRINT CHR$(C);:NEXT C:PRINT
1060 POKE 766,0
1070 RETURN

Link to comment
Share on other sites

Don't use S: to try to work around E:. SDX's XEP80.SYS simply doesn't hook S:, and the Atari handler is even worse in that it just sends an escape ($1B) character before every byte! Setting DSPFLG and using E: is faster as then only $D1 (set list flag) and $D0 (clear list flag) commands are sent when you switch modes. With Atari's handler you can also speed up transmission a bit by switching to burst mode with XIO 21 with AUX2=$01 if you can forgo cursor updates, but this may complicate moving the cursor.

 

Cool - thanks Avery. This info will save me wasted time. XEP80 support might in fact be more of a novelty than anything else, but it's quite cheap to add to the text editor and might be useful to some. Those tips for additional speed are really appreciated. :)

Link to comment
Share on other sites

Thanks a lot for the caps. Were the character dumps done in ATASCII mode? The character set I'm missing is the one inside of the NS405 chip itself, the one that is selected with XIO 20,#2,12,214,"E". In theory, this should allow the block graphics to work, but EOLs will probably be screwed up.

Ah, my bad, I captured in default (ATASCII) mode. Haven't really used my XEP-80 at all.

 

Funny thing: XIO 20,#2,12,214,"E" sets the background character to "ä" and clearing the screen doesn't change anything :-)

 

Here are new caps:

 

post-9299-0-30579000-1372626238_thumb.png

post-9299-0-89041200-1372626257_thumb.png

 

For those with real hardware... here's an experiment to try to hack the XEP-80 with undocumented commands. It attempts to toggle the charset address lines on a per-row basis. If it works, the top third will show the normal charset, the middle third will show the int'l charset, and the bottom third will show garbage (charset ROM bypassed).

Seems to work fine!

 

post-9299-0-65006700-1372626332_thumb.png

 

so long,

 

Hias

Link to comment
Share on other sites

Sweet, it's all finally beginning to make sense...

 

Fix for scrolling issue with tall logical lines, internal charset support, and better of emulation of unusual charset addressing modes:

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

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

 

The reason for all the ä characters when the internal charset is enabled is that the EOL ($9B) characters in the framebuffer are drawing normally. Atari used an ugly hack where $80-FF in the character ROM are inverse characters except for $9B, which is a blank. It took me a while to figure this out as the reason why all high-bit characters use attribute latch 1 (AL1) except for $9B. When the internal charset is enabled, this hack goes away and you can see all of the hidden EOLs.

 

In theory, with the $F6 and $F7 commands, it is possible to reprogram the timing chain registers. This would allow alteration of the character row/column count and height and possibly allow for a shorter, less overscanned display. NTSC would need some truncation, but PAL has extra lines that could be removed. I'd have to work out what timing parameters to try, though.

Link to comment
Share on other sites

Update to allow copying text out of the XEP-80 screen, and with added support for custom video modes:

 

http://www.virtualdub.org/beta/Altirra-2.40-test12.zip

http://www.virtualdub.org/beta/Altirra-2.40-test12-src.zip

 

Commands $F6 and $F7 can now be used to reprogram the NS405 timing chain. Here's a program that attempts to switch the XEP-80 to a modified NTSC mode with only 9 scanlines per row:

 

10 PRINT CHR$(27);CHR$(0);
20 XIO 20,#2,12,246,"E"
30 FOR I=0 TO 7
40 READ X
50 PRINT CHR$(27);CHR$(X);
60 XIO 20,#2,12,247,"E"
70 NEXT I
80 DATA 108,79,82,95,128,28,24,2

 

In the process of looking into this, I think I discovered why the XEP-80 was designed with such awful overscan. The NS405 chip has an unfortunate limitation where it can only place vertical sync on the first blanked character row immediately after the display region. This makes it difficult to generate a video signal for a format that requires a tall blanking region. As a result, if the program above works on a real XEP-80, it will likely result in a display that is too far up on the screen. That means in order to generate a properly centered display, it's necessary to put in blank lines in the active region. The built-in firmware isn't set up to do this, but I think that through reprogramming of the vertical interrupt (VINT) register via command $F8 it should be possible to get the status row repeated on the top to get one blanked row.

Link to comment
Share on other sites

  • 4 weeks later...

Hi, greetings from Venezuela. Thanks for this great piece of software. I turned back in time 30 years ago!! Thanks. I downloaded Altirra 2.30 in a Windows 8 64 bits Lenovo Yoga 13. It ran nicely Karateka (Broderbund :-) ), but I can't figure how to use the arrow keys to emulate joystick ... I can toggle run/attack mode (Space bar), and in attack mode can punch/kick low/mid/high with the QAZ WSX keys, but don't know how to use the joystick emulation.

 

Of course I set the mapping for arrow keys, but still don't work, any clues?

 

Thanks again for this great great job!!

ATARI (Yes, that's mi nickname from 30 years ago :-)

Link to comment
Share on other sites

This may be helpful: http://atariteca.blogspot.com/2011/07/configurar-el-joystick-en-el-emulador.html

 

Regards,

 

- Y -

 

Hi, greetings from Venezuela. Thanks for this great piece of software. I turned back in time 30 years ago!! Thanks. I downloaded Altirra 2.30 in a Windows 8 64 bits Lenovo Yoga 13. It ran nicely Karateka (Broderbund :-) ), but I can't figure how to use the arrow keys to emulate joystick ... I can toggle run/attack mode (Space bar), and in attack mode can punch/kick low/mid/high with the QAZ WSX keys, but don't know how to use the joystick emulation.

 

Of course I set the mapping for arrow keys, but still don't work, any clues?

 

Thanks again for this great great job!!

ATARI (Yes, that's mi nickname from 30 years ago :-)

Link to comment
Share on other sites

Small update:

 

http://www.virtualdub.org/beta/Altirra-2.40-test13.zip

http://www.virtualdub.org/beta/Altirra-2.40-test13-src.zip

 

Fixes a crash and a couple of small emulation bugs with XEP80 support, adds XEP80 support for error hovers, adds some on-screen indicators for display changes, and adds an "extract boot sectors" command for use with bootable virtual folders.

 

Did some tests with joystick support, but wasn't able to reproduce the joysticks suddenly stopping working. One thing that would be useful to know is if the people who are experiencing this problem are using input maps that are bound to a specific game controller, or if the input maps are just set to Any controller (default for all built-in maps).

 

Hi, greetings from Venezuela. Thanks for this great piece of software. I turned back in time 30 years ago!! Thanks. I downloaded Altirra 2.30 in a Windows 8 64 bits Lenovo Yoga 13. It ran nicely Karateka (Broderbund :-) ), but I can't figure how to use the arrow keys to emulate joystick ... I can toggle run/attack mode (Space bar), and in attack mode can punch/kick low/mid/high with the QAZ WSX keys, but don't know how to use the joystick emulation.

 

Input > Port 1 > Arrow Keys -> Joystick (port 1).

Link to comment
Share on other sites

Hi, thanks for your feedback, I tryied the Great American Cross Country Road Race and it worked like a charm. Of course using Karateka, I tryied all the possible settings (Cooked or raw keyboard, map to another key and back to arrow key, and other combinations), but can't make this works ... I'm using a Lenovo Yoga 13 with Windows 8 64 bits, and tryied the 32/64 bits of Altirra 2.30.

 

Thanks,

ATARI

Link to comment
Share on other sites

 

(...)

 

Of course using Karateka, I tryied all the possible settings (Cooked or raw keyboard, map to another key and back to arrow key, and other combinations), but can't make this works ... I'm using a Lenovo Yoga 13 with Windows 8 64 bits, and tryied the 32/64 bits of Altirra 2.30.

 

(...)

 

 

 

...Tried Karateka on Altirra 2.30, running on Windows 7-64bits, running on Studio 1440z, dual-screen mode, HDMI-output, and Logitech Dinovo-Edge keyboard, connected via 1440z's internal/wireless BlueTooth interface card.

 

It works perfectly.

Link to comment
Share on other sites

Hi, thanks for your feedback, I tryied the Great American Cross Country Road Race and it worked like a charm. Of course using Karateka, I tryied all the possible settings (Cooked or raw keyboard, map to another key and back to arrow key, and other combinations), but can't make this works ... I'm using a Lenovo Yoga 13 with Windows 8 64 bits, and tryied the 32/64 bits of Altirra 2.30.

 

Thanks,

ATARI

 

If you say its working on other games but not Karateka then I'd suggest its a broken image, maybe a bad crack, try a different one..

 

Oh and just a wild random thought, are you using the real OS roms or just the built in HLE settings, its does not come with the rom images for obvious reasons. I doubt very much that Avery's own OS would be the issue but just trying to make sure its running Karaeka as close to an original machine as possible.

Edited by Mclaneinc
Link to comment
Share on other sites

Looked at the colors issue, but don't know what it could be -- Altirra definitely does use PF2 in artifacting calculations, even in standard mode.

 

Fix for XEP80 view settings not saving properly, adds .WAV recording, and supports per-monitor DPI on Windows 8.1 preview:

http://www.virtualdub.org/beta/Altirra-2.40-test14.zip

http://www.virtualdub.org/beta/Altirra-2.40-test14-src.zip

 

The .WAV recorder uses a more aggressive audio filter with a sharper cutoff than the regular playback path, so I'd be interested in thoughts on whether it is more or less authentic.

Link to comment
Share on other sites

Hello,

 

First of all, congratulations, your emulator is awesome!

If i'm not doing something wrong, I just wanted to report that the game rom for Atari 5200 "Joust" doesn't work, I tried a lot of Atari 5200 roms, and just that one refuses to work, I tried with Altirra 2.3 and 2.4 test 14.

 

Thanks!

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