Jump to content

Photo

Stella 4.1 released

stella debugger

48 replies to this topic

#26 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • 23,972 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Thu Sep 18, 2014 4:54 AM

To me, if there was going to be an initialization slowdown, it would happen at first, not later.

Exactly. And since it doesn't behave like this, something odd must be happening.

Something else to try: download the official SD2.dll from http://libsdl.org an...any difference.

Makes no differences. The versions are identical anyway.

#27 iesposta OFFLINE  

iesposta

    River Patroller

  • 3,889 posts
  • Retro-gaming w/my VCS
  • Location:Pennsylvania

Posted Sat Sep 20, 2014 11:11 PM

I took a quick look at the new version of Stella.
I have a question about the memory areas that SpiceWare added.
It shows the DPC+ memory and mentions the 1K frequency table, and what is accessible to/from the 6507.
In batari Basic, which SpiceWare doesn't use, we have a "256K basic stack" where values and ranges of values can be pushed and pulled.
Is this basic Stack shown on the data map?

In DK Arcade 2600 we use it to push out the score and pull in the countdown timer, then we push out the timer and pull the score back. It is just 3 bytes out of the 256 available, but it is a start at using it.

#28 SpiceWare ONLINE  

SpiceWare

    Draconian

  • 12,687 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Mon Sep 22, 2014 7:42 PM

In batari Basic, which SpiceWare doesn't use, we have a "256K basic stack" where values and ranges of values can be pushed and pulled.
Is this basic Stack shown on the data map?


Yes, it's somewhere in the Display Data, the first 4K ($0000 - $0FFF) of RAM that's displayed. I took a look in bB11d (I have that on my Mac from when I ported my sound effect driver to bB) and in keywords.c I can see where the stack commands are processed:
    else if (!strncmp(statement[1],"push\0",5)) do_push(statement);
    else if (!strncmp(statement[1],"pull\0",5)) do_pull(statement);
    else if (!strncmp(statement[1],"stack\0",6)) do_stack(statement);
 
 
in statements.c: you can see do_push, do_pull and do_stack. the function do_stack converts the bB stack command to 6507 assembly like this:
void do_stack(char **statement)
{
  removeCR(statement[2]);
  printf("	lda #<(STACKbegin+%s)\n",statement[2]);
  printf("	STA DF7LOW\n");
  printf("	lda #(>(STACKbegin+%s)) & $0F\n",statement[2]);
  printf("	STA DF7HI\n");
}
 
 
So somewhere there's a constant defined as STACKbegin that'll tell you where in Display Data the stack is located.  It looks like it's on line 194 of DPCplusbB.h, but it's defined based on what comes before it:
STACKbegin = BKCOLS + 256
 
 
One of the options for DASM is to output a symbol listing. When I compile my projects I do so like this:
dasm draconian.asm -f3 -v0 -sdraconian.sym -ldraconian.lst -odraconian.bin

the -s requests a symbol file, which is named draconian.sym. I believe bB is already requesting the symbol file as I see one for my sfx_demo. If you have the *.sym file you should find the location of STACKbegin in there.

Edited by SpiceWare, Mon Sep 22, 2014 7:44 PM.


#29 ericitaquera OFFLINE  

ericitaquera

    Combat Commando

  • 3 posts

Posted Fri Sep 26, 2014 8:12 PM

First of all: thank you very much for your work in Stella.

 

I´m having problem by launching 4.1 from command line passing a rom as argument.

H:\HyperSpin\Emulators\Stella\Stella-4.1\64-bit\Stella.exe "H:\Emulators Roms\Atari 2600\ROMS\3-D Tic-Tac-Toe (1980) (Atari).a26"  -fullscreen 1 -fullres auto

It crashes imediatelly. I´ve tried 32-bits, tried to remove "-fullscreen 1 -fullres auto" from commandline. Tried all "-video" possible options.

 

I have version 3.1.2 and 3.7.2 and both work like a charm.

 

I´m using windows 7 64 bits (all windows updates applied), processor AMD Athlon X2, GPU ATI HD3850.

 

Please let me know if you need further details to check this.

 

Thanks in advance!



#30 stephena OFFLINE  

stephena

    River Patroller

  • Topic Starter
  • 3,360 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Sat Sep 27, 2014 6:25 AM

I will look into this.  Does it run correctly when launching from the icon?



#31 SpiceWare ONLINE  

SpiceWare

    Draconian

  • 12,687 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sat Sep 27, 2014 10:40 AM

Is this basic Stack shown on the data map?

 

Any luck tracking down the value for STACKbegin?



#32 iesposta OFFLINE  

iesposta

    River Patroller

  • 3,889 posts
  • Retro-gaming w/my VCS
  • Location:Pennsylvania

Posted Sat Sep 27, 2014 11:28 AM

  • Stack seems to be set up or cleared in the DPCstartup.asm
  • My game's sym says:
  • SQUARE_WAVE_VOL4         008a                 
    SQUARE_WAVE_VOL5         0089                 
    stack1                   00f6              (R )
    stack2                   00f7              (R )
    stack3                   00f8                 
    stack4                   00f9                 
    STACKbegin               dca5              (R )


#33 SpiceWare ONLINE  

SpiceWare

    Draconian

  • 12,687 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sat Sep 27, 2014 12:57 PM

    STACKbegin               dca5              (R )

 

Not a value I would have expected.  DPC does mask the address with $0fff though, so try monitoring addresses $0ca5 thru $0da4 on the Cartridge RAM tab.



#34 ericitaquera OFFLINE  

ericitaquera

    Combat Commando

  • 3 posts

Posted Sat Sep 27, 2014 9:13 PM

I will look into this.  Does it run correctly when launching from the icon?

 

It crashes only from command line. It works perfectly if the game is launched by the rom launcher screen.



#35 Trebor OFFLINE  

Trebor

    River Patroller

  • 4,716 posts

Posted Sun Sep 28, 2014 7:38 AM

Running Windows 7 32-bit Profession and 64-bit Home Premium, I launch Stella 4.1.1 with a ROM from a command line without issue.

 

The 32-bit install has an Intel HD graphics chip within a Core i5 laptop. The 64-bit install has a ATi Radeon HD 5670 card within a Core i7 desktop. 

 

Note: I do have a basedir.txt file in place under the Stella folder which specifies the aforementioned folder for storing the *.ini files.

 

ericitaquera, have you tried the following?:

 

Windows XP/Vista/7/8:  Open Windows Explorer and type '%appdata%\stella' into the address bar. This will bring you to the directory where Stella stores its settings. Find and delete/rename the file named 'stella.ini'.

 

Source: http://stella.sourceforge.net/faq.php



#36 ericitaquera OFFLINE  

ericitaquera

    Combat Commando

  • 3 posts

Posted Sun Sep 28, 2014 8:45 AM

ericitaquera, have you tried the following?:

 

Windows XP/Vista/7/8:  Open Windows Explorer and type '%appdata%\stella' into the address bar. This will bring you to the directory where Stella stores its settings. Find and delete/rename the file named 'stella.ini'.

Just tried. Nothing changed. Tnx!



#37 Nathan Strum OFFLINE  

Nathan Strum

    Quadrunner

  • 8,359 posts
  • Enjoying a sandwich
  • Location:Newhall, CA

Posted Fri Oct 10, 2014 7:11 PM

Space Instigators is intermittently broken in the current version of Stella (it looks like it was broken as of at least 3.9.1, which it the oldest version I still have around). The title screen is garbled, as are some of the game graphics, and collision detection is way off (you shoot an invader, and a different one disappears).

 

But this doesn't happen on every launch. Relaunch the game, and sometimes it works just fine.

 

http://atariage.com/...areLabelID=2369

 

Space Instigators (Public Release 2) (06-01-2003) (CT).png   Space Instigators (Public Release 2) (06-01-2003) (CT)_1.png

 

Space Instigators (Public Release 2) (06-01-2003) (CT)_2.png   Space Instigators (Public Release 2) (06-01-2003) (CT)_3.png

 

Space Instigators+ has the same problems in-game (although it no longer has a title screen, apparently).

 

http://atariage.com/...ce-instigators/

 

Sp+.png

 

Sp+_1.png


Edited by Nathan Strum, Fri Oct 10, 2014 7:17 PM.


#38 Omegamatrix OFFLINE  

Omegamatrix

    Quadrunner

  • 6,233 posts
  • Location:Canada

Posted Fri Oct 10, 2014 8:33 PM

I know this doesn't mean anything to you Nathan, but I will give a quick explanation of what is happening here (with Space Instigators, I didn't try the + version).

 

 

Space Instigators is not clearing the decimal flag at power on. It should really clear this flag. The new version of Stella randomizes the state of some of the flags upon power-up to help authors catch dependent behaviour like this. I don't know whether or not the decimal is truly randomized or clear at start up, but its easy enough to include a CLD instruction  into a rom. I will leave it up to the original author to do this. Somebody should shoot him a PM.

 

 

Also, I did write a rom that shows most of the state of the 2600 at power-up. It could be somewhat useful for developing Stella in this area. Looking at Stella now it appears that the SP is never randomized, and I think it probably should be.

 

 

 



#39 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • 23,972 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Sat Oct 11, 2014 12:50 AM

Space Instigators is not clearing the decimal flag at power on. It should really clear this flag. The new version of Stella randomizes the state of some of the flags upon power-up to help authors catch dependent behaviour like this.

Maybe we should use a "developer" flag for this. Because it seems that on the real hardware, the flag is usually (but maybe not always) clear at startup.
 

Looking at Stella now it appears that the SP is never randomized, and I think it probably should be.

That's hardly forgotten by any developer. :)

But of course you are right, if we randomize, we should randomize everything.

#40 stephena OFFLINE  

stephena

    River Patroller

  • Topic Starter
  • 3,360 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Sat Oct 11, 2014 6:27 AM

The issue is indeed randomization of CPU registers that is enabled by default.  You can go into the debugger, and under I/O (de)-select "Randomize CPU registers (A/X/Y/PS)".  Turning this off allows Space Instigators to work.  Also, for some reason I didn't include 'SP' in the randomization; it's even reflected in the description (there's no SP there).  I will add this for the next release.



#41 LS_Dracon OFFLINE  

LS_Dracon

    Dragonstomper

  • 778 posts

Posted Sat Oct 11, 2014 7:33 AM

Maybe we should use a "developer" flag for this. Because it seems that on the real hardware, the flag is usually (but maybe not always) clear at startup.
 
That's hardly forgotten by any developer. :)

But of course you are right, if we randomize, we should randomize everything.

Not Aways. I didn't put CLD on Bee-Ball and sometimes it do not initialize well.

I thought was a cart connection problem at first, removing the cart, plug again and turning on it works. But it is the missing CLD, perhaps just turning power switch off-on gonna work.

Still a rare event, would say 1 out of 50.

Naturally I'm aways clearing D flag now. That was a beginner mistake.

The Stella should keep random cld at start.


Edited by LS_Dracon, Sat Oct 11, 2014 7:35 AM.


#42 seemo OFFLINE  

seemo

    Chopper Commander

  • 178 posts

Posted Thu Oct 23, 2014 7:33 AM

Calling Stella 4.1.1 from Crimson Editor (via the User Tools keyboard shortcut) does not show the Emulator Window... a process (named Stella.exe) is shown in the Task Manager list, but no entry appears in the Applications tab (I am on Windows 7 32bit).

Calling Stella 4.1.1 from an explorer window opens up the emulator without any problem.

 

Version 3.9.3 works without any problem in Crimson Editor.



#43 stephena OFFLINE  

stephena

    River Patroller

  • Topic Starter
  • 3,360 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Thu Oct 23, 2014 1:48 PM

This issue seems to be related to reports of Stella not opening from the commandline (which is essentially what Crimson Editor is doing).  I still can't duplicate this on my system, so for now I'm at a loss as to what's happening.  I will try Crimson Editor and see if it happens for me.  I can't fix this if I can't duplicate it ...

 

One thing to try is downloading the Visual Studio 2013 runtimes, located here.



#44 seemo OFFLINE  

seemo

    Chopper Commander

  • 178 posts

Posted Thu Oct 23, 2014 2:30 PM

I just tried typing the same exact call that is issued from Crimson Editor inside a command window (ver. 6.1.7601) and Stella 4.1.1 starts without any problem.

As about the runtimes, I had already installed them, as the execution of the downloaded file in your link (vcredist_x86) prompted me to either repair or uninstall them.

Anyway I went with 'repair', to see if something needed fixing, but even after the repair procedure (which ended without errors) I still could not call Stella from Crimson Editor.



#45 Nathan Strum OFFLINE  

Nathan Strum

    Quadrunner

  • 8,359 posts
  • Enjoying a sandwich
  • Location:Newhall, CA

Posted Thu Oct 23, 2014 2:38 PM

For the record, Bee-Ball also has the same issue as Space Instigators.

 

Normal:

 

Bee-Ball_NTSC_Final_1.png

 

Glitched:

 

Bee-Ball_NTSC_Final.png



#46 stephena OFFLINE  

stephena

    River Patroller

  • Topic Starter
  • 3,360 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Thu Oct 23, 2014 2:45 PM

For the record, Bee-Ball also has the same issue as Space Instigators.

 

This is the same issue as before (CPU registers are randomized).  The upcoming release will have randomization of CPU registers disabled by default, and also allow to selectively enable randomization for each one.



#47 seemo OFFLINE  

seemo

    Chopper Commander

  • 178 posts

Posted Fri Oct 24, 2014 6:51 AM

Just to add that Stella 4.1.1 window does not appear if called from Programmer's Notepad (v2.3.4.2350-charles), too.

Unfortunately, windows event registry does not show any error/message.



#48 stephena OFFLINE  

stephena

    River Patroller

  • Topic Starter
  • 3,360 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Sat Oct 25, 2014 8:56 AM

Just to add that Stella 4.1.1 window does not appear if called from Programmer's Notepad (v2.3.4.2350-charles), too.

Unfortunately, windows event registry does not show any error/message.

 

Can you describe exactly how you set up this editor with Stella, so that I can duplicate your setup?  Feel free to move this to PM if you like.



#49 stephena OFFLINE  

stephena

    River Patroller

  • Topic Starter
  • 3,360 posts
  • Stella maintainer
  • Location:Newfoundland, Canada

Posted Tue Oct 28, 2014 11:57 AM

The issue with Crimson Editor and Programmers Notepad above are caused by an incompatibility between Stella output and the apps' capturing the output.  Disabling this functionality in the editors works for now, but I'll continue to research why it's happening.

 

Also, Stella 4.2 has been released, so please move all discussion to that thread.







Also tagged with one or more of these keywords: stella, debugger

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users