AtariNerd Posted September 6, 2009 Share Posted September 6, 2009 Looks to be shaping up quite nicely, indeed. I see you have the GTIA sound working on this. I'll have to make time to give it a proper spin soon. (I've been kind of preoccupied on the Texas Instruments front of all things. Gotta give love to the other quirky little beasts) Quote Link to comment Share on other sites More sharing options...
andym00 Posted September 7, 2009 Share Posted September 7, 2009 (edited) Stupid question, but how can I reset its saved settings ? I inadvertently closed the graphics output window this morning after starting it up, thinking it was an already running instance of Altirra.. Now when I start it up I get no graphics display, just the empty white main window.. Everything seems to be working best I can tell, but the display doesn't appear.. Alt+1 (view->display) doesn't change anything.. How can I get it back ? edit: Okay, I found the settings in the registry, but nothing related to enabling the graphics display.. Okay, I have it now The registry key virtualdub.org->Altirra->Pane layouts->Standard is set to empty when I close Altirra with the graphics window closed.. It never opens again after that.. Deleting the pane layouts key and exiting restores it to its 'normal' value of (1,4,0.00000) and it all works again.. Edited September 7, 2009 by andym00 Quote Link to comment Share on other sites More sharing options...
phaeron Posted September 7, 2009 Share Posted September 7, 2009 Stupid question, but how can I reset its saved settings ? I inadvertently closed the graphics output window this morning after starting it up, thinking it was an already running instance of Altirra.. Now when I start it up I get no graphics display, just the empty white main window.. Everything seems to be working best I can tell, but the display doesn't appear.. Alt+1 (view->display) doesn't change anything.. How can I get it back ? edit: Okay, I found the settings in the registry, but nothing related to enabling the graphics display.. Okay, I have it now The registry key virtualdub.org->Altirra->Pane layouts->Standard is set to empty when I close Altirra with the graphics window closed.. It never opens again after that.. Deleting the pane layouts key and exiting restores it to its 'normal' value of (1,4,0.00000) and it all works again.. Okay, that's a bug... it was reported before, but I didn't realize that the View > Display command wasn't bringing back the window. I'll fix it. Quote Link to comment Share on other sites More sharing options...
phaeron Posted September 7, 2009 Share Posted September 7, 2009 I installed it and it looks real good... however, the first program I ran on it bombed... This is a utility I wrote earlier this year which runs fine on a800winplus and real hardware... MMG compiled Atari Basic... I figured out the problem -- your program is using a disk command that isn't supported by a stock 810 or 1050 disk drive ($4E, Read PERCOM Block) and it bombs when Altirra's disk emulator sends back a NAK. When I hacked this support into the emulator, the program ran fine. Quote Link to comment Share on other sites More sharing options...
phaeron Posted September 7, 2009 Share Posted September 7, 2009 @Phaeron, hope you didn't mind the Altirra promotion, as you know I'm a real fan of the emu and nag you daily on the blog Nah. Actually I'm glad you did it, because I don't like to toot my own horn on someone else's website. Quote Link to comment Share on other sites More sharing options...
Mclaneinc Posted September 7, 2009 Author Share Posted September 7, 2009 @Phaeron, hope you didn't mind the Altirra promotion, as you know I'm a real fan of the emu and nag you daily on the blog Nah. Actually I'm glad you did it, because I don't like to toot my own horn on someone else's website. My pleasure, it's a great emulator and with your work and more input can only get better. Oh, please please save the window size Quote Link to comment Share on other sites More sharing options...
mimo Posted September 7, 2009 Share Posted September 7, 2009 does this support USB joysticks? I tried but could not get my Legacy USB classics to work Quote Link to comment Share on other sites More sharing options...
+bf2k+ Posted September 7, 2009 Share Posted September 7, 2009 I installed it and it looks real good... however, the first program I ran on it bombed... This is a utility I wrote earlier this year which runs fine on a800winplus and real hardware... MMG compiled Atari Basic... I figured out the problem -- your program is using a disk command that isn't supported by a stock 810 or 1050 disk drive ($4E, Read PERCOM Block) and it bombs when Altirra's disk emulator sends back a NAK. When I hacked this support into the emulator, the program ran fine. Yes I use the 'read Percom block' as do a lot of programs. Are you planning to support it in future versions of Altirra? Quote Link to comment Share on other sites More sharing options...
Mclaneinc Posted September 7, 2009 Author Share Posted September 7, 2009 does this support USB joysticks? I tried but could not get my Legacy USB classics to work It supports my USB Xbox360 pad.. Quote Link to comment Share on other sites More sharing options...
phaeron Posted September 7, 2009 Share Posted September 7, 2009 does this support USB joysticks? I tried but could not get my Legacy USB classics to work It does... sort of. I started controller support and didn't get that far on it before I shifted to other things. The controller has to be plugged in when the emulator launches, and only axes mapped to the "POV hat" input in Windows will work (i.e. not analog sticks). Buttons 0-3 all map to the trigger. Quote Link to comment Share on other sites More sharing options...
miker Posted September 9, 2009 Share Posted September 9, 2009 Great project, Phareon! Just some suggestion. some games (and even programs) use both joystick and cursor keys (some even use these keys without Control pressed). Would you make some "bypassing" key for arrows when joystick is selected? I though about using ie. ALT+arrows to bypass joystick or use Scroll Lock key as switch for it. It was IMHO the main missing feature in PLus (which alas never has been done). Quote Link to comment Share on other sites More sharing options...
andym00 Posted September 10, 2009 Share Posted September 10, 2009 It would appear that opcode $CB is missing any kind of implementation in cpu6502ill.cpp AXS (SBX) [sAX] ~~~~~~~~~~~~~~~ AND X register with accumulator and store result in X regis- ter, then subtract byte from X register (without borrow). Status flags: N,Z,C Addressing |Mnemonics |Opc|Sz | n ------------|-----------|---|---|--- Immediate |AXS #arg |$CB| 2 | 2 Quote Link to comment Share on other sites More sharing options...
Mclaneinc Posted September 10, 2009 Author Share Posted September 10, 2009 It would appear that opcode $CB is missing any kind of implementation in cpu6502ill.cpp AXS (SBX) [sAX] ~~~~~~~~~~~~~~~ AND X register with accumulator and store result in X regis- ter, then subtract byte from X register (without borrow). Status flags: N,Z,C Addressing |Mnemonics |Opc|Sz | n ------------|-----------|---|---|--- Immediate |AXS #arg |$CB| 2 | 2 Yeah, there's a few opcodes that seem to be not emulated but Phaeron is hacking his way through them, btw, i's always worth making a mention of this on his blog, I suspect that gets checked first. http://www.virtualdub.org/blog/pivot/entry.php?id=262&message=Your+comment+has+been+stored.&w=phaerons_weblog#message Quote Link to comment Share on other sites More sharing options...
andym00 Posted September 10, 2009 Share Posted September 10, 2009 Yeah, there's a few opcodes that seem to be not emulated but Phaeron is hacking his way through them, btw, i's always worth making a mention of this on his blog, I suspect that gets checked first. http://www.virtualdub.org/blog/pivot/entry.php?id=262&message=Your+comment+has+been+stored.&w=phaerons_weblog#message Ah, okay, I'd missed the blog part there.. I'll add it myself, it seems simple enough to add a kStateAdd (that does the add without borrow) which is what it seems to need to implement that instruction, or at least implement that stage of the instruction.. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted September 10, 2009 Share Posted September 10, 2009 any real use for the illegal opcodes? except for a potential LAX i have not seen any use? Quote Link to comment Share on other sites More sharing options...
Rybags Posted September 11, 2009 Share Posted September 11, 2009 Some games use them in their protection - mainly to confuse potential hackers since many native Asm/Disassemblers don't decode them. Personally, I don't bother with them. Especially now you also get the issue that you'd likely have compatability issues with accelerator upgrades or the 65c02. So really, not worth the effort. Quote Link to comment Share on other sites More sharing options...
andym00 Posted September 11, 2009 Share Posted September 11, 2009 (edited) any real use for the illegal opcodes? except for a potential LAX i have not seen any use? I just use them as matter of course on the 64.. SBX is a little gem.. How else can you add immediate values to X nice and quickly ? DCP is incredibly useful.. SAX as well.. Other than that, the others I hardly use.. In this particular case using SBX gave me above a 4 cycles advantage over not using it in a a loop that took ~52 cycles and had to be run 32 times.. It's an advantage I figure Anyway, that's the least of my worries considering the vast differences I get running on Atari800Win and Altirra and playing with the Timers edit: And of course LAX which is an absolute diamond of an instruction.. Edited September 11, 2009 by andym00 Quote Link to comment Share on other sites More sharing options...
andym00 Posted September 11, 2009 Share Posted September 11, 2009 Some games use them in their protection - mainly to confuse potential hackers since many native Asm/Disassemblers don't decode them. Personally, I don't bother with them. Especially now you also get the issue that you'd likely have compatability issues with accelerator upgrades or the 65c02. So really, not worth the effort. Hmmm, if that's the case I'll add some CPU detection to anything serious I'd write for the Atari, and support 6502C, 65C02 and 65816.. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted September 11, 2009 Share Posted September 11, 2009 can you send me some light on the practical use of the opcodes you mentioned? ok, forgot about DCP.... but the rest? Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted September 11, 2009 Share Posted September 11, 2009 btw... the HARD demo Joyride f.e. use illegal opcodes esp in the landscape dot part and btw it has a nice sprite multiplexor to in the scroller above the amiga animation... Andy, Pete...did you know that one of the coder is the inventor of the sidcard? Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted September 11, 2009 Share Posted September 11, 2009 http://atari.fandal.cz/detail.php?files_id=3590 Quote Link to comment Share on other sites More sharing options...
andym00 Posted September 11, 2009 Share Posted September 11, 2009 (edited) can you send me some light on the practical use of the opcodes you mentioned? ok, forgot about DCP.... but the rest? I meant add in my previous post about SBX.. So, okay, I mean to add or subtract an immediate value from X.. I mean in the exact thing that brought this up, there's code that looks like this, where I'm computing the delta values for all the Timer4 interrupts down the screen, and pre-calculating how many to reload on each line, rather than use VCOUNT directly.. It was a test to see which will actually perform better, one block of solid code doing the preparations (and possible timer fixing live down the screen), or doing it all live in the interrupts.. Anyway.. At the end of this routine, I need carry to be clear, and also to add 4 to X, and branch back possibly.. Can you see a quicker way than using sbx ? And bear in mind the carry will be set from the previous sbc.. lda .y_base+4,x sbc .y_base+0,x sbc #1 sta .d_base+0,x lda #3 sta .g_base,x lda #-4 sbx #-4 bmi .loop rts I only set A to -4 because that's me It could be #$ff or any value, as long as it doesn't clear any set bits in X, and very often you find you have just the right value in A a lot of the time.. Of course you can set A to other values, so in the above example I could set a to $f which'd then be (X&15) - 4 which is useful as well at times.. I'm sure you can see the possiblities Anyway, job done, and since it ignores the carry flag in its operation (but sets it correctly) it's nice and quick, and open other avenues to how you might structure code.. There's other cases as well, but it's handy when you want to and a value and then add or subtract from it.. More often than not you find a use for it that you didn't expect.. A good real world example would be this from a speech synthesiser I was playing with that synthesised 5 waveforms for the speech synthesis.. It was just a test because I was curious what sine waves used for speech synths would sound like, and like the idea of having them morph into tones.. Anyway.. ; Osc #0 lda #$ff ; 2 .phs0 ldx #0 ; 2 .f0_0 sbx #$ff ; 2 .v0_0 ldy sine_00,x ; 4 sty .s00+1 ; 4 .f0_1 sbx #$ff ; 2 .v0_1 ldy sine_00,x ; 4 sty .s01+1 ; 4 .f0_2 sbx #$ff ; 2 .v0_2 ldy sine_00,x ; 4 sty .s02+1 ; 4 .f0_3 sbx #$ff ; 2 .v0_3 ldy sine_00,x ; 4 sty .s03+1 ; 4 stx .phs0+1 ; 4 (48) Yes the tuning was slightly wonky, but it did the job, and with an average of 12 cycles per sample per oscillator I couldn't see any faster way of doing it.. SAX is a bugger, there's few times it's that useful, but if you want to write stuff to memory, and'ed with a constant which you'll have in either A or X it's a time saver.. Edited September 11, 2009 by andym00 Quote Link to comment Share on other sites More sharing options...
andym00 Posted September 11, 2009 Share Posted September 11, 2009 (edited) btw... the HARD demo Joyride f.e. use illegal opcodes esp in the landscape dot part and btw it has a nice sprite multiplexor to in the scroller above the amiga animation... Andy, Pete...did you know that one of the coder is the inventor of the sidcard? Reading the blog for Altirra it seems a lot of stuff uses illegal opcodes.. It appears (to me anyway) that he's only implementing stuff as and when he finds something that doesn't work, which seems to be the process with the illegals at least, and that it'll get added when something doesn't work with it, which is a fair enough approach.. But no worries, I'm quite happy changing Altirra locally here and adding the opcode(s) myself, once I figure out what not to break in the process edit: I get nothing from Altirra opening Joyide.. Open Image->Joyride - Disk 1.atr and then it just sits there with nothing happening Ah but it works in Atari800Win AH! Did it really have to have the Joyride music in it! Edited September 11, 2009 by andym00 Quote Link to comment Share on other sites More sharing options...
phaeron Posted September 11, 2009 Share Posted September 11, 2009 Reading the blog for Altirra it seems a lot of stuff uses illegal opcodes.. It appears (to me anyway) that he's only implementing stuff as and when he finds something that doesn't work, which seems to be the process with the illegals at least, and that it'll get added when something doesn't work with it, which is a fair enough approach.. But no worries, I'm quite happy changing Altirra locally here and adding the opcode(s) myself, once I figure out what not to break in the process edit: I get nothing from Altirra opening Joyide.. Open Image->Joyride - Disk 1.atr and then it just sits there with nothing happening Ah but it works in Atari800Win AH! Did it really have to have the Joyride music in it! There are a couple of reasons that I do this. One is that I have several instruction lists for illegal opcodes and they sometimes have errors or are missing information. It's much easier to deal with this when I have a program that uses the opcode because then the CPU emulation immediately flags the missing opcode and if it's not emulated correctly I know immediately which opcodes to check. If I implement them all at once then I have to trawl through thousands of opcodes of history to figure out what failed. I ran into a problem like this with the DCP opcode and it took me the better part of a day to track down the problem. As for Joyride, I have to take a look, because the version of Joyride that I have works fine. I ran into similar problems with Numen, where it turned out that some versions had a disk loader that was bombing. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted September 11, 2009 Share Posted September 11, 2009 (edited) Thanks Andy... Re: Hard... I was actually in contact many times with one of the coder and we were somehow discovering HIP at that times in 1996... exciting times at that time... Hard got blaimed from the polish scene simply because of the usual "they stolen code from c64, they using SIDs & logos etc) but that's mainly because of Sanyi did his own "sid"-emulator and was coming from c64 scene... the other production of them is using Out Run-Sid-Digi soundtrack... but look... Joyride uses sio-trackloader, every RAM and was imho nicely (non-polish style at that time) done... but it was only me... Edited September 11, 2009 by Heaven/TQA Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.