From mint-bounce@lists.fishpool.fi Thu Jun 11 15:29:43 2009 Subject: Re: [MiNT] Corruption of high TPA From: Petr Stehlik To: mint@lists.fishpool.fi In-Reply-To: <1244731278.15756.109.camel@jetpack.demon.co.uk> References: <4A2ED03D.1090600@freesbee.fr> <4A2F7B9F.3010100@freesbee.fr> <4A30FE49.3050404@freesbee.fr> <1244725809.15756.100.camel@jetpack.demon.co.uk> <4A310791.2020709@freesbee.fr> <1244728568.15756.106.camel@jetpack.demon.co.uk> <4A311332.90806@freesbee.fr> <1244731278.15756.109.camel@jetpack.demon.co.uk> Content-Type: multipart/mixed; boundary="=-Xew1REG5UPo+WqiCcutB" Date: Thu, 11 Jun 2009 21:25:27 +0200 Message-Id: <1244748327.4731.8.camel@joy> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: pstehlik@sophics.cz Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: --=-Xew1REG5UPo+WqiCcutB Content-Type: text/plain; charset="ISO-8859-2" Content-Transfer-Encoding: quoted-printable Alan Hourihane p=ED=B9e v =C8t 11. 06. 2009 v 15:41 +0100: > > The crash occurs only when the OS loads the program at some memory=20 > > location where there is an invalid read address just after. For examp= le,=20 > > at the end of the FastRam (like EmuTOS). I guess that with the right=20 > > memory protection parameters, the space just after the TPA is marked = as=20 > > unreadable, it is probably what happens on my setup. >=20 > This is the same tst.s I compiled before and it works here. Maybe you just forgot to set its "Load to Alt RAM" flag so you were testing your videoram. Please try running the attached executable and post your results. BTW, it's crashing in plain TOS 4.04 :-) EmuTOS seems to be the only OS that can run it without crash :) Hopefully FreeMiNT will be the next one. Though I am not sure who's going to fix TOS so the MiNTlib will need some sort of SP adjustment, anyway :-) Petr --=-Xew1REG5UPo+WqiCcutB Content-Disposition: attachment; filename="print_sp.s" Content-Type: text/plain; name="print_sp.s"; charset="ISO-8859-2" Content-Transfer-Encoding: 7bit move.l 4(sp),a0 | get basepage move.l 4(a0),d0 | get _base->p_hitpa and.l #$fffffffc,d0 | align on lower 4 bytes move.l d0,sp | this is the new stack move.l d0,d4 pea msg move.w #9,-(sp) | Cconws() trap #1 addq.l #6,sp move.l d4,d0 bsr printnum pea eol move.w #9,-(sp) trap #1 addq.l #6,sp move.w #8,-(sp) | Cnecin() trap #1 addq.l #2,sp clr.w -(sp) | Pterm0() trap #1 printnum movem.l d0-d3/a0-a3,-(sp) move.l d0,d1 moveq #7,d2 lea .prtend(pc),a0 .prloop move.l d1,d0 asr.l #4,d1 and.l #$0F,d0 add #'0',d0 cmp #'9',d0 ble .pr2 add #('A'-'9'-1),d0 .pr2 move.b d0,-(a0) dbf d2,.prloop pea (a0) move #9,-(sp) trap #1 addq #6,sp movem.l (sp)+,d0-d3/a0-a3 rts ds.b 8 .prtend dc.b 0 even msg: dc.b "Hello! SP=$",0 eol: dc.b 13,10,0 --=-Xew1REG5UPo+WqiCcutB Content-Disposition: attachment; filename="print_sp.tos" Content-Type: application/octet-stream; name="print_sp.tos" Content-Transfer-Encoding: base64 YBoAAACUAAAAAAAAAAAAAAAqAAAAAAAAAAMAACBvAAQgKAAEAoD////8LkAoAEh5AAAAhD88AAlO QVyPIARhAAAcSHkAAACQPzwACU5BXI8/PAAITkFUj0JnTkFI5/DwIgB0B0H6ADggAeiBAoAAAAAP BkAAMLB8ADlvAAAEXkARAFHK/+RIUD88AAlOQVxPTN8PD051AAAAAAAAAAAAAEhlbGxvISBTUD0k AA0KAJBlb2wAAAAAAKIAAAAAkG1zZwAAAAAAogAAAACEcHJpbnRudW2iAAAAAEAAAAAUFAA= --=-Xew1REG5UPo+WqiCcutB--