Jump to content
IGNORED

Altirra 2.40 Final out..


Mclaneinc

Recommended Posts

There might be an issue with MaxFlash+IDE emulation. The official SDX 4.46 MyIDE+Flash ROM, when converted to bootable ATR programmer using the MaxFlash studio software, identifies a 1Mbit flash ROM on real hardware. In Altirra, however, it identifies a 4Mbit cartridge and fails.

 

Altirra set-up is as follows:

  • Hard Disk: MyIDE (External)
  • Attach special cartridge: Empty 1Mbit MaxFlash cartridge (MyIDE banking)
MyIDE+Flash's banking range starts at $D520? (unsure of that, and of the "switch off" location, yet; IDE registers start at $D500). However, it's not possible to put the emulated chip into a flash state. The AtariMax flasher is getting $FF,$FF for Manufacturer and Device IDs.

 

The MyIDE+Flash SDX 4.46 ROM has also been crashing at startup, even when attached directly (via Attach Cartridge as MyIDE+Flash), bypassing the programming stage.

 

To be clear: standard MaxFlash 1Mbit, 8Mbit, and MyIDE II appear to be working perfectly.

Edited by flashjazzcat
Link to comment
Share on other sites

Was reporting the wrong flash device ID for the MaxFlash 1MB+MyIDE cart (Am29F040B instead of Am29F010B) -- fixed:

 

http://www.virtualdub.org/beta/Altirra-2.50-test37.zip

http://www.virtualdub.org/beta/Altirra-2.50-test37-src.zip

 

And yes, the cartridge banking registers start at $D520 for that cartridge type.

 

The cart emulation is split in Altirra -- the flash cart portion is set up from the cartridge side, and the IDE emulation from the hard disk side. It's set up this way because I don't have an internal infrastructure that can support combined devices cleanly. Therefore, to get proper emulation, you need to set up both the MF1MB+MyIDE cartridge and the IDE emulation in MyIDE External ($D500) mode. However, the flasher doesn't care about the MyIDE portion.

Link to comment
Share on other sites

Hmm, maybe this needs a bit more research.

 

I did some work on moving the MaxFlash emulation onto the unified flash code, and ran into the problem that switching to one of the modern flash chip types caused the 1MB+MyIDE detection to fail again. What the Atari-based flasher tries to do is to try to put the flash chip into autoselect mode with the 1MB banking registers ($D000-D01F), and if that fails, to try again with the 1MB+myIDE registers ($D020-D03F). Problem is, current flash chips only validate A00-A10 for the unlock sequence, and so this autodetection strategy doesn't work. The only way I can get this detection algorithm to work is to use the old non-B versions of the flash chips (Am29F040 instead of Am29F040B or M29F040B). So either the 1MB+myIDE cartridge was only produced with old flash chips, or there is extra circuitry on the cartridge gating flash writes.

 

Anyone know exactly what chips are in either the MaxFlash 1MB or MaxFlash 1MB+myIDE cartridges?

Link to comment
Share on other sites

The AtariMax carts - judging by what I have here - mostly use ST and Bright chips, and occasionally AMD. From memory, I think my 1Mbit Flash has an AM29F010, while the MyIDE+Flash has an M29F010B. My 8Mbit cart has two Bright BM29F040 chips. Of course the PLCCs are socketed, so it's entirely possible that I've exchanged chips from cart to cart. However, I'll check tomorrow to be sure, since the chips in the carts allow the official flashers to correctly identify the hardware.

 

The reason I've been messing around with the AtariMax carts is to enable UFLASH to program them all. Studying the behaviour of the AtariMax flasher was a means to an end, and obviously threw up some anomalies along the way. I originally assumed that Tucker's flasher was tailored to the target cart (1Mbit, 8Mbit, etc), but as you say this isn't actually the case and it tries to probe the hardware.

 

I can say that the latest Altirra test version you provided does appear to produce expected results with Tucker's flasher, so perhaps it's best to stick to the current chip assignments as per the non-unified flash code.

 

While the tool I'm writing allows manual selection of the hardware, it does test that the hardware is present by attempting to bank the flash memory in and out using the hardware registers and seeing if RAM is revealed. If it is, it then IDs the chip; the chip type therefore has no bearing on the assumed cart type (only the storage capacity, so a 256KB Sic! cart can be distinguished from a 512KB Sic!, for example), but I'll know better in a day or so if this is unambiguous. The tool also does a complete scan for every supported cart at start-up in an attempt to auto-detect the hardware. This is successful with Ultimate, Sic!, SIDE, etc, as long as the order of testing is carefully chosen (since the register which deactivates flash memory with one device might enable it with another). I haven't ran the auto-detection code against MaxFlash 1Mbit, 8Mbit, and MyIDE+Flash at the same time on real hardware yet, but I'll be doing so tomorrow.

Edited by flashjazzcat
Link to comment
Share on other sites

Figured it out... the problem was that I hadn't enabled CCTL reads for the 1MB and 1MB+myIDE cartridge types. The Atarimax flasher does a read from $D530 to disable the 1MB+myIDE cart before it does the 1MB detection. Cart.txt's a little incomplete here -- should say access, not write.

 

http://www.virtualdub.org/beta/Altirra-2.50-test38.zip

http://www.virtualdub.org/beta/Altirra-2.50-test38-src.zip

 

Also, I got the MaxFlash emulation moved over to the common flash module and switched the 1MB+Flash cart over to the M29F010B. The Am29F010 device ID was also wrong, was $21, now $20, and it was allowing too long for multiple sector erase commands (was 80us, now 50us). Still need to switch over the 8MB cart... have one on order, so we'll see if I get a different one. Seems like flash chips commonly get changed on different runs of devices... fine for whole reprogram, bad if you're trying to do sector erase.

Link to comment
Share on other sites

Excellent: looking forward to trying this. :)

 

I was quite wrong about some of the chips in my carts, now I've looked. For interest, here's what I've got:

MyIDE (2008):	M29F010B (ST)
1Mbit (2003):	M29F010B (ST)
1Mbit (2003):	AM29F010 (AMD)
1Mbit (2008):	AM29F010 (AMD)
8Mbit (2003):	AM29F040B (AMDx2)

There are also a lot of 8Mbit carts using pairs of Bright BM29F040 chips.

 

Regarding the AM29F010 device ID: I encountered that, and changed my ID table in haste before checking that $01,$20 was a valid ID. Probably should have mentioned it, but you spotted it anyway. :)

 

64KB sectors aren't such a problem with most external carts, since one commonly does a complete chip erase anyway, but they were also the reason behind writing a tool which caches whole 64KB sectors, edits bits of them, and then writes the whole lot back.

Link to comment
Share on other sites

  • 2 weeks later...

Feature request: Could a menu option be added to permit the disabling of rendering either the Playfield or Player/Missile graphics (said another way, just view PMs or the playfield)? Would be fun to 'see' how demos/games/g2f/rastaconverter programs are done. Note that this could also have a distinction between showing the PMs both 'as-is' and how they result from the playfield interaction.

  • Like 1
Link to comment
Share on other sites

Many thanks for this Avery!!!

 

I'm not doing a lot of Atari'ing at the moment, but I try to keep up with the maintenance releases every month or so. Before I broke off I was just starting to get interested in programming in ASM for cartridges, so all the work you have been doing recently is very interesting. One thing about the Atari - and maybe all retro hardware up to, say the early Acorn RISC machines - is if you really knuckle down and grind through the learning process it is possible to actually master the platform in your mind. I think the same is totally out of the question for modern computing with so many hardware variations and constant new releases - how many people for example truly 'get' programming for shaders and parallel cores on modern graphics cards? Very few I suspect. They rely on buggy and slow 'middleware'.

 

That is one of the reasons I enjoy Altirra so much - it provides a rock solid and convenient window to the old world.

 

...and after a little exploring I notice you have done some work on the dreaded cassette emulation... Will it record properly now or is that still 'somethin we dinna care speak abute'?

Edited by morelenmir
Link to comment
Share on other sites

There isn't a way to disable P/M graphics rendering right now, but there is a GTIA visualization mode that will change the colors so you can tell playfield vs. sprites. The sprite rendering is integrated with the collision detection, so the former can't be disabled right now without breaking the latter.

 

No work on cassette recording as of yet. The work that I just did on cassette was so I could tell where I was in the #$* tape when trying to debug tape read problems. It's 2014, I ain't doing the equivalent of writing down tape counter numbers.

 

The older computers are simpler and easier to get your head around, sure. I like working with them when I'm tired of debugging C++ template morasses and multithreaded code. But then I go back to the modern world when I get bored of writing my own divide routine and trying to squeeze three bytes of space out of an 8K ROM.

  • Like 2
Link to comment
Share on other sites

Oh... You touched a sore spot there Avery! I utterly and totally HATE templates in C++! I think they are the worst feature of the language - the very fact you have to declare AND define them within a header-file is such a colossal failure, at least in VS. Maybe that fault does not occur in other implementations of C++.

 

I totally refuse to use the standard template library also. I don't understand why it exists. Its like the chaps at HP found themselves with a lot of time on their hands and thought up a programming exercise as make-work - 'What can we do with this new template feature? I know, we'll invent a criminally obscure and completely counter-intuitive function library, offering utterly confounding entities like 'Vectors', 'Queues' and 'Bitset's." I mean... WTF??? Just the names... I have been programming in C++ off and on since 1996 and I simply do not understand how to use the STL. I NEVER have, not once. I don't 'get' them at all. You shouldn't have to take an IT bachelor's degree to be able to programme in a language - that is ALSO a failure, a failure to make your work accessible. Functions should be named intuitively so they describe what they do and how to use them. I think the STL is the most 'elitist' aspect of C++.

 

It makes me grind my teeth.

Edited by morelenmir
Link to comment
Share on other sites

Is it possible to play the "Bomb Jake" ROM using Altirra? I see it detects the ROM as a Corina cartridge. It will display the GR8 Software logo, and the Bomb Jake splash screen. But when it gets to the start screen, it looks like below. The background music plays, but hitting the fire button has no effect.

 

post-6369-0-15582600-1399446579_thumb.png

Link to comment
Share on other sites

I remember this being discussed in the Altirra 1.7 release thread, if memory serves me it was to do with an extra line in a DLI and a bug in the OS. Avery will no doubt explain it properly in course but its a known item...

Link to comment
Share on other sites

similar error is encountered well as when loading the game. 'Yie Another Kung-Fu".

he also has a mapper Corina.

 

Ah, yeah, I forgot about that one. You can actually get into the gameplay for it in Altirra, but there is flicker and some sprite problems.

 

Yie Another was released with a special version of Atari++ that will automatically load and run the ROM. So it can be run from there. I don't know, maybe they've updated Atari++ to be able to handle these natively by now. What I found out a few minutes ago though, is that you can just rename the Bomb Jake ROM to the default name for Yie Another Kung Fu -- "kung_cart.bin" -- and it will run from the special version of Atari++ also. So at least there is a way to run them both. But it would be nice to run from Altirra, since this is the emulator I use 99% of the time.

Link to comment
Share on other sites

The problem with both of these cartridge images is that I've identified emulation problems in the bundled modified version of Atari++ that allow things to work that shouldn't. The cartridge image for Bomb Jake takes too many cycles to bank switch in a DLI routine at the top and runs over WSYNC, due to the bundled emulator missing some refresh cycles on narrow width playfields. This knocks all the DLIs out of whack. I replicated the DLI on real hardware and hit the same timing results there. The Yie Another Kung Fu image has double-buffered display lists that are too long and have a hires mode line at scan line 247. Unfortunately, because these images require Corina hardware, I can't currently do full cross-test on a later fixed version of Atari++, Atari800, or on real hardware. I did find an issue in Altirra's Corina emulation that was causing Bomb Jake to intermittently fail to start -- EEPROM emulation issue -- but it doesn't affect the title screen.

Link to comment
Share on other sites

Phaeron,

 

Any idea when there will be a final, both the blog and this thread go on for ever :)

 

Anything you are working on you want to say about :)

 

As always, you are da boss so its a final when you say it is, just asking..

Link to comment
Share on other sites

  • 2 weeks later...

Hello phaeton,

 

Can you be kind to adjust program within Altirra to output print. When I clicked output print below Altirra screenshot. It does print in output BUT very very smallest fonts ! It is more like point 3 or 2 ! Will sent an images soon. And can you be kind to add newest feature that does print out in Atari 1020 printer (plotter) in both virtual and real printer via PC USB port.

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