Jump to content

Photo

Altirra 2.30 released


232 replies to this topic

#51 phaeron OFFLINE  

phaeron

    River Patroller

  • Topic Starter
  • 2,252 posts
  • Location:USA

Posted Sat May 25, 2013 12:05 AM

Hmm... not sure what to make of that. Definitely a missing byte, but not sure why.

Do you have a test case I can look at? Otherwise, can you dump out ANTIC and display list state after this happens? This is done through the .antic and .dlhistory commands. I want to see if there is any DMA happening from that region.

#52 willyvmm OFFLINE  

willyvmm

    Star Raider

  • 57 posts
  • jmp $e477
  • Location:Copenhagen, .dk

Posted Sat May 25, 2013 2:37 AM

I prepared test case. Inside the rar file You will find everything that is neccessary to replicate bug.
Please read test.txt to replicate bug.

Attached Files



#53 phaeron OFFLINE  

phaeron

    River Patroller

  • Topic Starter
  • 2,252 posts
  • Location:USA

Posted Sat May 25, 2013 2:49 PM

This is indeed caused by a runaway display list pointing ANTIC into the $D5xx region. The missing byte was eaten by playfield DMA:

Altirra> .dumpdlist
BDEF:	 mode 9 @ 00CF
BDF2: x13 blank 1
BDFF:	 mode.h 9 @ C900
BE02:	 mode.i F @ D500
BE05:	 mode.i F @ C900
BE08: x2 blank 1
BE0A:	 mode.i B @ 00D5
BE0D:	 blank.i 1
BE0E:	 mode.i.h 9 @ C900
BE11:	 mode.i F @ 5900
BE14:	 mode.i.h 9 @ 5642
BE17:	 mode.i 9 @ 00CF
BE1A: x13 blank 1
BE27:	 mode.i.h 5 @ 4CD5
BE2A:	 mode B @ D5D5
BE2D:	 mode.i.h 5 @ D5D5
BE30: x2 mode.i.h 5 @ 4CD5
BE36: x2 mode B @ 4CD5
BE3C:	 mode B @ D5D5
BE3F:	 mode C @ 004B
BE42: x454 blank 1

The reason for this appears to be a problem in the SIDE Loader's initialization prior to loading the executable. The program itself has an OK load pattern for its first segment:
EXE: Loading program 0006-006F to BDD7-BE40
EXE: Loading program 0074-0078 to 02C4-02C8
EXE: Loading program 007D-0080 to B000-B003
EXE: Loading program 0085-0088 to 02E0-02E3
EXE: Jumping to B000

It overwrites part of the OS screen but does not overwrite the display list. The SIDE Loader, however, clears the entire screen area at $BC00-$BFFF without disabling display list DMA, causing the display list to cycle around that region; since the I flag is set, VBI stage 2 cannot reset the display list address back to SDLSTL/SDLSTH. This then allows ANTIC to start reading into the areas that the program has overwritten and then execute bogus LMS instructions to hit the IDE hardware.

My recommendation would be to clear only up to MEMTOP after reopening Gr.0. This allows Lasermania to load with the SIDE Loader.

#54 willyvmm OFFLINE  

willyvmm

    Star Raider

  • 57 posts
  • jmp $e477
  • Location:Copenhagen, .dk

Posted Sun May 26, 2013 11:16 AM

Thanks for explanation. That makes sense now :)

#55 phaeron OFFLINE  

phaeron

    River Patroller

  • Topic Starter
  • 2,252 posts
  • Location:USA

Posted Wed May 29, 2013 12:08 AM

Small update with a number of fixes to floating-point handling:

http://www.virtualdu...-2.40-test4.zip
http://www.virtualdu...0-test4-src.zip

This fixes a couple of issues with the floating-point acceleration feature and a lot of issues with the LLE OS's mathpack, enough to get the Ahl benchmark working. (Researching accurate series expansions for LOG and EXP sucks, btw.)

#56 Xuel OFFLINE  

Xuel

    Dragonstomper

  • 605 posts
  • Location:US

Posted Wed May 29, 2013 1:32 PM

phaeron, any chance you could fix the alignment of the ANTIC visualization (Shift-F8) when Extended PAL Height is enabled?

#57 morelenmir OFFLINE  

morelenmir

    Stargunner

  • 1,457 posts
  • Location:West Yorkshire, Great Britain

Posted Thu May 30, 2013 9:27 AM

Would it be possible to have the H7-H9 host device deal with the unicode BOM in text files? In fact, I have never considered before how Altirra handles utf8 input! Presumably it doesn't?

#58 drac030 OFFLINE  

drac030

    Stargunner

  • 1,819 posts
  • Location:Warszawa, Poland

Posted Thu May 30, 2013 10:24 AM

Many bug fixes to 65C816 emulation. In particular, cross-bank indexing is now emulated, which is a major cause of 65C816-incompatible code that uses only legal 6502 opcodes.


I can see that enabling 65C816 emulation also enables a 256k "linear" RAM space. It seems to me that this amount is fixed an cannot be changed. If so, could you make this configurable or at least enlarge the fixed amount to 1 MB?

#59 morelenmir OFFLINE  

morelenmir

    Stargunner

  • 1,457 posts
  • Location:West Yorkshire, Great Britain

Posted Thu May 30, 2013 7:17 PM

I have a - reasonable I think! - feature request for Avery, Could you please make read-only/read-write to be 'per drive' in the 'Host Device' settings. I have now twice accidentally overwritten a text source it has taken me over an hour to type in. Being able to set the individual drives as read-only would make this carelessness on my part impossible.

A maybe less reasonable request is that Altirra remember the size of its window.when in debugging mode My reason for this is to remove the moderately irritating necessity to drag up the main window when the extra debugging panels are present and then 'Adjust Window Size' it back down when you are finished. Not world shattering, but definitely a 4 on the irritometer!

Edited by morelenmir, Thu May 30, 2013 7:37 PM.


#60 phaeron OFFLINE  

phaeron

    River Patroller

  • Topic Starter
  • 2,252 posts
  • Location:USA

Posted Fri May 31, 2013 12:34 AM

Turned out there was an ugly bug in the MMU that caused all of the 65C816 high pages to alias together, so here's a fixed and more configurable version:
http://www.virtualdu...-2.40-test5.zip
http://www.virtualdu...0-test5-src.zip

I've also fixed the ANTIC visualization.

Having a UTF-8 BOM in a file you're exchanging via H: is odd, as there's no point in writing a BOM for a file that's 7-bit clean, and anything that's non-ASCII had better be ATASCII or it's just going to be garbage to the Atari. Altirra currently doesn't deal with Unicode in files on H: at all and simply passes through all bytes except for EOL bytes, which are translated if on H6-H9:. I'm not sure I want to deal with whether the code point U+25E2 should map to Ctrl+H.

You can undock all of the debugger panes from the main window to achieve something similar to what you're looking for. The main restriction is that you cannot stack undocked panes.

#61 drac030 OFFLINE  

drac030

    Stargunner

  • 1,819 posts
  • Location:Warszawa, Poland

Posted Fri May 31, 2013 4:19 AM

Thanks a lot. In meantime I found a bug in 65C816 CPU emulation: Altirra thinks that TYX (opcode $BB) is an illegal instruction.

#62 morelenmir OFFLINE  

morelenmir

    Stargunner

  • 1,457 posts
  • Location:West Yorkshire, Great Britain

Posted Fri May 31, 2013 6:52 AM

Fair enough. I have used unicode for all my text files since quite a few years now - but I think I see what you mean Avery, Basically if a text file does not contain any characters above the standard ASCII set then it doesn't need a BOM. I think the reason I have been getting one is because I have set EditPad to include one by default. It is easy to overcome this however and I have now set assembler source to be windows 1252 encoded.

Is the per drive RO/RW settings a possible though?

#63 serj OFFLINE  

serj

    Chopper Commander

  • 206 posts
  • Location:Russia, Omsk city.

Posted Fri May 31, 2013 6:53 AM

Thanks for the update, Avery.
glad that the emulator is getting better and better.
I want to ask what kind of compatibility with processors "6502C" and "65C816"?
I have noticed that some games refuse to work under the processor "65C816".
such as playing "River raid" refuses to run.
and in the game "Alley cat" on the screen c rubbish bins is distorted and fuzzy images.
this is the way it should be or is it an error in emulation?

#64 drac030 OFFLINE  

drac030

    Stargunner

  • 1,819 posts
  • Location:Warszawa, Poland

Posted Fri May 31, 2013 10:40 AM

The compatibility is good as long as programs are cleanly written, i.e. without the use of illegal 6502 opcodes. Surprisingly, the vast majority of Atari programs are clean in this respect. Some list is here: http://drac030.krap....patybilnosc.php

Since this list has been put together, some programs listed as incompatible have been revindicated to the proper side and are now running on 65C816. These are:

1) http://drac030.krap....ley_cat_816.zip Alley Cat (of course, also runs on 6502)

2) http://drac030.krap....tor-updated.arc Inspektor

River Raid works on 65C816 here.

#65 serj OFFLINE  

serj

    Chopper Commander

  • 206 posts
  • Location:Russia, Omsk city.

Posted Fri May 31, 2013 11:49 AM

and even so, is not working correctly.
apparently this is a bug in the emulator.
See the video:

Edited by serj, Fri May 31, 2013 12:31 PM.

  • w1k likes this

#66 phaeron OFFLINE  

phaeron

    River Patroller

  • Topic Starter
  • 2,252 posts
  • Location:USA

Posted Fri May 31, 2013 11:24 PM

65C816 fixes:

http://www.virtualdu...-2.40-test6.zip
http://www.virtualdu...0-test6-src.zip

The issue with Alley Cat was that the JMP (abs) instruction was running too fast in 65C816 mode, which caused one of the DLIs to hit HSCROL too early. Interestingly, this means that while this particular build of Alley Cat is 65C816 compatible, it isn't accelerator compatible.

Re: individual read/write on H: devices -- sorry, leaning no at the moment since it's a lot of UI work. Also, why are you assembling in emulation instead of cross assembling??

#67 Shannon ONLINE  

Shannon

    Born To Be Insane

  • 7,765 posts
  • Pac-man Fever
  • Location:Arcade

Posted Sat Jun 1, 2013 1:24 AM

Got a question about frame blending... Is it essentially some form of filter?

Or is it blending two frames into one (thus half the normal updates per second)?

Hope my question makes sense... :lol:

#68 serj OFFLINE  

serj

    Chopper Commander

  • 206 posts
  • Location:Russia, Omsk city.

Posted Sat Jun 1, 2013 1:27 AM

not disappear from the screen explosions in the game "Gyruss", the effect is observed only when "65C816".
when choosing processor "6502C" this effect is not observed.
error in the emulation.

Edited by serj, Sat Jun 1, 2013 1:30 AM.


#69 phaeron OFFLINE  

phaeron

    River Patroller

  • Topic Starter
  • 2,252 posts
  • Location:USA

Posted Sat Jun 1, 2013 2:02 AM

Frame blending blends current frame with previous. You still get 50/60 fps, but with blur between frames. If a frame drop occurs, display doesn't resume until two frames later so you never see an unblended frame.

Tried Gyruss in both 6502 and 65C816 modes, and I'm afraid I can't see a difference -- you'll have to describe in more detail or post a screenshot. The game also doesn't appear to use any undocumented 6502 instructions.

#70 serj OFFLINE  

serj

    Chopper Commander

  • 206 posts
  • Location:Russia, Omsk city.

Posted Sat Jun 1, 2013 2:22 AM

Video of the current display error.


and a screenshot of the error.
Posted Image

Edited by serj, Sat Jun 1, 2013 3:13 AM.


#71 morelenmir OFFLINE  

morelenmir

    Stargunner

  • 1,457 posts
  • Location:West Yorkshire, Great Britain

Posted Sat Jun 1, 2013 5:20 AM

Because I don't actually know what 'cross-assembling' means!!

I take your point about the ui work... I can sort of envisage what would be required, but that sort of thing can be fiddly.

And as a general point to anyone interested. I have FINALLY worked out how to clear the printer screen. Assign 'Toggle Debugger' to an easy to reach F key and then just a quick double press before each print. A clean page each time!

An update - Ahhhh... Cross assembling is to use a native windows tool that will produce object code that can be used inside Altirra. Certainly interesting! A quick look at a few assemblers for 6502 seems to find mainly DOS ones though. I don't suppose anyone has translated the assembler editor into a windows binart have they? That would be cool.

Edited by morelenmir, Sat Jun 1, 2013 5:26 AM.


#72 flashjazzcat OFFLINE  

flashjazzcat

    Quadrunner

  • 12,641 posts
  • Location:United Kingdom

Posted Sat Jun 1, 2013 5:42 AM

You could set up an IDE which transparently calls the assembler (which by nature will usually be command line based). I use Eclipse and WUDSN with the MADS assembler, and it's easy to set up.

#73 morelenmir OFFLINE  

morelenmir

    Stargunner

  • 1,457 posts
  • Location:West Yorkshire, Great Britain

Posted Sat Jun 1, 2013 6:10 AM

ATasm sounds a likely cross-assembler, although I have studiously avoided the mac/65 assembler!!! In 'Atari Roots' it managed to sound simultaneously very complicated AND cheating to use .SBYTE! Is ATasm what most people recommend?

I was joking earlier when I suggested a windows version of 'Assembler Editor' but I don't suppose there actually is one by any chance?

Has anyone put together a tutorial document for using Altirra's built-in debugger? I would prefer to use it rather than 'BUG', but got a little lost in the help file!

#74 flashjazzcat OFFLINE  

flashjazzcat

    Quadrunner

  • 12,641 posts
  • Location:United Kingdom

Posted Sat Jun 1, 2013 9:15 AM

Atasm has the annoying quirk of stopping on the first error so it can be a monumental pain clearing out compilation errors on a newly imported project. For that reason alone I can't recommend it. MADS is only complex when you need it to be. No cheating in use of .SBYTE, either... Directives like those are valuable tools.

#75 drac030 OFFLINE  

drac030

    Stargunner

  • 1,819 posts
  • Location:Warszawa, Poland

Posted Sat Jun 1, 2013 9:44 AM

There seems to be a problem with 16-bit X register in native mode. This code:

	 clc
	 xce
	 rep #$10
	 .iw
	 ldx #$0000
loop:	 inx
	 bpl loop
	 stx $0600
	 sep #$10
	 .ib
	 sec
	 xce
	 rts

stores $0080 instead of $8000 at $0600, i.e. the loop stops after 128 iterations instead of going up to 32768 iterations. When the Y register is used instead, the result seems correct.

Edited by drac030, Sat Jun 1, 2013 9:45 AM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users