Jump to content

Photo

Virtual Jaguar and Atari workshop 'Illegal' exits...


6 replies to this topic

#1 Black_Art_Games OFFLINE  

Black_Art_Games

    Combat Commando

  • 2 posts

Posted Sun Apr 21, 2019 9:26 AM

Hi all, I've just been compiling some Atari Workshop stuff, part of Workshop series #1  - (My document is dated 8th Nov 1994 if its of interest)

Now, my problem isnt the compiling of code or even getting it to run. The problem I believe lies in the way the workshop code ends with 'Illegal', now reading a few other forums it seems that this was some magic way to use the alpine board.
The code runs but crashes on this piece of code.
Is there a way to create an infinite loop in ASM.

I did try the usual...

loop
       bra      loop

but it seems Virtual Jaguar crashed using a loop like this on both versions I use...
v2.1.2 and
GIT 20160613

I have other samples that use 'ILLEGAL' to exit and these crash also, sometimes ending VJ abruptly or causing a non-responsive attitude ;)

If I could get it to loop at least Id be able to see how it works and how to create loops. Maybe there is some specific way as opposed to simply infinite looping lol. Im all VERY new to ths and have literally just got into Workshop #1
I know 'SOME' assembly but my forte is Atari ST coding.

Any help would be much appreciated, a stable loop with an OPL and VBL would help greatly tbh :)
Scott

Attached Thumbnails

  • Capture.PNG


#2 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,862 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Sun Apr 21, 2019 9:39 AM

You need to rebuild or refresh the object list every frame or the system will crash.  You can't just dive into an infinite loop (Unless you have an interrupt rebuilding the list - usually tied to VI)



#3 Black_Art_Games OFFLINE  

Black_Art_Games

    Combat Commando

  • Topic Starter
  • 2 posts

Posted Sun Apr 21, 2019 9:44 AM

Thanks man, I'm literally just starting out on all this, so any and all help is appreciated tbh. Oh, and damn do you write some nice stuff for the Jag ;)



#4 dilinger OFFLINE  

dilinger

    Star Raider

  • 66 posts
  • Location:Montreal

Posted Sun Apr 21, 2019 1:59 PM

Beside the object list refresh, you can also keep the illegal and set his vector #4 in accordance and do whatever you want (infinite loop in your case).

 

Vector #, Address, Exception name, Trigger condition

  0, 000000, Reset SP, Not really a vector. Used to initialize the stack pointer.

  1, 000004, Reset PC, Reset/startup

  2, 000008, Bus error, Bus cycle couldn't complete properly.

  3, 00000C, Address error, Misaligned (odd) word or longword memory access.

  4, 000010, Illegal instruction, Tried executing an invalid opcode.


Edited by dilinger, Sun Apr 21, 2019 2:00 PM.


#5 Cyprian_K OFFLINE  

Cyprian_K

    Chopper Commander

  • 143 posts

Posted Mon Apr 22, 2019 2:33 PM

loop
       bra      loop


try
loop
       nop
       bra      loop


#6 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,862 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Mon Apr 22, 2019 6:05 PM

try

loop
       nop
       bra      loop

 

It's still going to crash once the Object list is trashed.



#7 Zerosquare OFFLINE  

Zerosquare

    River Patroller

  • 2,791 posts
  • Location:France

Posted Tue Apr 23, 2019 9:27 AM

I don't think it actually crashes, since the height of the bitmap objects ends up at zero after the OP is done. But of course, this means you'll get a blank screen, so...

Edited by Zerosquare, Tue Apr 23, 2019 9:27 AM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users