Steem SSE 3.9

A place to discuss current and future developments for STeem

Moderators: Mug UK, Steem Authors, Moderator Team

itaboy
Captain Atari
Captain Atari
Posts: 174
Joined: Sun May 04, 2014 6:24 pm

Re: Steem SSE 3.9

Postby itaboy » Wed Mar 01, 2017 8:05 pm

Thanks a lot!!

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Steem SSE 3.9

Postby Cyprian » Fri Mar 03, 2017 11:55 pm

thanks Steven,

Steven Seagal wrote:- Blitter:
In blit mode, the blitter can interrupt an operation between read and write.
The CPU can surrender bus control during an instruction.
Steem emulates this, but it's not 100% accurate.


this part is most interested for me. I have some CPU/Blitter interaction tests for HOG and BLIT mode. I'm curious results
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Sun Mar 05, 2017 5:22 pm

The "CPU can surrender bus control during an instruction" part seems to depend on instruction/addressing mode, which Steem doesn't test. But I'm not sure, it needs better test programs.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Steem SSE 3.9

Postby Cyprian » Sun Mar 05, 2017 11:12 pm

I did a first test it is almost ok. That test run blitting and MULU instruction in parallel (marked red), and it looks ok. Steem shows two more black stripes than real hardware. PRG and screenshot from real hardware you can find there:
http://www.atari-forum.com/viewtopic.php?p=96197#p96197
This is the first emulator which is able to emulate CPU/BLiTTER interaction. Congrats!
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Mon Mar 06, 2017 8:04 pm

Thx, I didn't know this test, it could help.
EDIT
Found the reason for the black lines, it's because the blitter starts when timing is computed, but before the action (here changing palette 0) is completed. It's a logical error.
On a test build I could correct it, but to make it general is more involved, yet necessary...
You do not have the required permissions to view the files attached to this post.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Steem SSE 3.9

Postby Cyprian » Mon Mar 06, 2017 11:16 pm

another tests for BLIT mode. The BLiTTER copies black color to the Shifter color register 0, also the CPU changes the Shifter color register 0 every 8 cycles (white/gray).
As you can see below, on the STE every BLiTTER pass starts every 130 bus cycles (black lines starts exactly at the left edge of white/grey stripes), in Steem it is 135 bus cycles (starts at the left edge and in the middle of white/gray stripes)
BLiT_H6a.JPG


I have a few other tests, one of them shows that the CPU can easily delay the BLiTTER in BLIT mode - that doesn't work in Steem
You do not have the required permissions to view the files attached to this post.
Last edited by Cyprian on Sun May 21, 2017 12:00 pm, edited 1 time in total.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Tue Mar 07, 2017 9:19 pm

Cyprian wrote:I have a few other tests, one of them shows that the CPU can easily delay the BLiTTER in HOG mode - that doesn't work in Steem


Yes, please post them too, I write some tests, but they tend to be rather basic and buggy :(

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Steem SSE 3.9

Postby Cyprian » Tue Mar 07, 2017 11:25 pm

How it works: in a BLIT mode the BLiTTER counts every memory access used by the CPU. And after 64th it takes the control over the bus if I remember correctly for 65 bus cycles (1 cycle for bus mastering, 63 for data operations and 1 for bus mastering), later it releases the bus and again counts every memory access used by the CPU, after 64th it takes the control... and so on

Following code uses exactly 64 bus cycles, and it delays the BLiTTER pass by about 8.5 raster lines (about 4456 CPU cycles):

Code: Select all

   move.w d6,(a3)            ; red to $FFFF8240      8 CPU cycles / 2 bus cycles
   move.w d3,(a3)            ; white to $FFFF8240      8 CPU cycles / 2 bus cycles
   REPT 30
         move.l   D6,D7            4 CPU cycles / 1 bus cycle
         divs.w   D5,D7            144 CPU cycles / 1 bus cycle
   ENDR


BLIT (black lines) mode delayed by DIVS.w:
BLiT_H6a4c.png
You do not have the required permissions to view the files attached to this post.
Last edited by Cyprian on Sun May 21, 2017 12:01 pm, edited 1 time in total.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Wed Mar 08, 2017 7:42 pm

Thx, I'll look at it.
But I guess you mean BLIT mode (hog bit=0)?

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Steem SSE 3.9

Postby Cyprian » Wed Mar 08, 2017 9:24 pm

yep, BLIT mode
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Thu Mar 09, 2017 10:51 am

Cyprian wrote:BLiT_H6a4c.png


Normally the first issue (black stripes) is fixed in the current dev build.
( viewtopic.php?f=94&t=25238&p=313391#p313391 )
About this picture (that doesn't appear...), it this a screenshot of Hatari, Steem? Is it supposed to be correct or wrong?

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Steem SSE 3.9

Postby Cyprian » Thu Mar 09, 2017 11:19 am

this is from a real hardware - 1040 STE (as previous screenshots posted here)
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Thu Mar 09, 2017 6:26 pm

Alright, I asked because it's a clean png without bending. :)

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Tue Mar 14, 2017 8:50 pm

Using your explanation (counting bus accesses, not cycles, how strange!) and bus arbitration inside instructions...

BLiT_H6a_Steem.png

Blitter starts before prefetch in instruction MOVE.

BLiT_H6a4c_Steem.png

Blitter restarts during DIV, parallel execution.

For the emulator, that means checking the blitter more often. It's a lot of work for a feature that is used only in test programs. :) All programs restart the blitter at once. But I noticed TOS 1.62 doesn't block the blitter during interrupts, so the blitter will restart on its own. Had a lot of crashes because of that.
You do not have the required permissions to view the files attached to this post.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Steem SSE 3.9

Postby Cyprian » Tue Mar 14, 2017 9:00 pm

agrhh!!! thats awesome!!!
this is The First ST emulator with the CPU/BLiTTER interaction emulation!
congrats and thanks!!!

now waiting for DevBuilds :)
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Tue Mar 14, 2017 9:10 pm

Your test programs help a lot, that's what I needed to improve this aspect of emulation. If you have others, please upload them.

Foebane
Atariator
Atariator
Posts: 21
Joined: Sat Jul 23, 2016 6:19 pm

Re: Steem SSE 3.9

Postby Foebane » Sun Apr 02, 2017 3:09 pm

Only just today discovered that Steem SSE has been updated! Better audio, yaaay!

Steven, what do you know about the 2715x1527 50hz imposed on my Fullscreen resolution settings? Is that a Steem alteration or is it just my Nvidia card trying to make things look better? It just seems like overkill on a machine whose maximum resolution was nowhere near 1080p, that's all.

(By imposed, I mean I ran 3.9.1 with an older configuration file for 3.9.0 with Fullscreen resolution set to 1920x1080 50hz, and it "upgraded" it, I suppose)

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Fri Apr 07, 2017 9:25 am

Depending on the build, Steem gives the choice between a few small resolutions (DirectDraw) or all available ones (Direct3D).
It's not overkill, it uses your full screen just like Windows does.

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Fri Apr 07, 2017 9:31 am

http://ataristeven.exxoshost.co.uk/Steem_392_coming_soon.htm

"Back for Justice and Emulation"

Sampling Rates
Image

You're not dreaming, Steem now manages more sampling rates, up to 384Khz!

If your soundcard isn't able to deliver such high rates, Steem will settle for the maximum available.

This improvement was ridiculously easy to do. I'm surprised it wasn't requested before.

It makes a difference in some cases where the emulated PSG vibrates faster than 22Khz. It does happen, as the max frequency is 125Khz! It can cause horrible aliasing.

Case in point: the introduction sample of Star Trek + sick bay sound.

Image
'How does it sound Dr McCoy?'
'Sounds like 96Khz.'



At 44.1Khz, the aliasing noise is just horrible.
At higher rates, it gets more bearable (don't claim it's accurate).

EDIT: insert lame joke
Last edited by Steven Seagal on Mon Apr 10, 2017 3:40 pm, edited 1 time in total.

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Fri Apr 07, 2017 9:38 am

Alternative YM2149 emulation

Image

Not many bragging rights on this one, this was lifted from MAME, but hacking emulations together has always been a lot of fun. Steem SSE already borrowed code for the IKBD emulation (6301), for disk drive emulation (WD1772), for some video tricks (GLUE), etc.

If option 'C2' (Chipset 2) is checked, an alternative, lower level YM2149 emulation based on MAME is used. Lower level in the sense that it explicitly uses chip cycles and internal counters.

C2 also modifies MFP emulation, but it has effect on only a few cases.

I did it that way because frankly, Steem's PSG emulation is hard to understand and modify. Therefore, improvements are more like hacks (eg quantize). But it is very good: some cases will sound worse with the new emulation, especially if you don't hike the sampling rate. :)

EDIT: reflects changes in options
Last edited by Steven Seagal on Mon Apr 10, 2017 3:33 pm, edited 1 time in total.

FedePede04
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: Steem SSE 3.9

Postby FedePede04 » Fri Apr 07, 2017 3:39 pm

you can add oversampling if the sound card can't reach high enough frequency, 44100 x 8 oversampling should be as good.
Last edited by FedePede04 on Fri Apr 07, 2017 4:04 pm, edited 1 time in total.
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

FedePede04
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: Steem SSE 3.9

Postby FedePede04 » Fri Apr 07, 2017 3:44 pm

one more thing the delay between changing the pulse (from up to down / down to up).
the delay is not a count down delay, the delay is counting up. (very important)
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Fri Apr 07, 2017 6:21 pm

FedePede04 wrote:you can add oversampling if the sound card can't reach high enough frequency, 44100 x 8 oversampling should be as good.


The advantage of higher SR is that it was very easy to add in Steem.

FedePede04 wrote:one more thing the delay between changing the pulse (from up to down / down to up).
the delay is not a count down delay, the delay is counting up. (very important)


Yes, the MAME code does precisely that:

Code: Select all

      m_count[abc]++;
      if(m_count[abc]>=TONE_PERIOD(abc))
      {
        m_output[abc] ^= 1;
        m_count[abc]=0;
      }


Notice >=, which also explains why 0==1.

FedePede04
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: Steem SSE 3.9

Postby FedePede04 » Fri Apr 07, 2017 7:58 pm

it was also easy for me to do 8x oversampling, you make the program run same speed as if you had a higher sampling speed, instead of inc the buffer, you add the data together on the same place for the number of times you oversample and div in the end. but i am sure that you know all this.

i look forward to try it, i had some errors with the old way, got some clicking on the sound when i was using a timer.

btw i am glad to see you are working on the YM emulations. could i get you to send me the latest beta, so i can test if it fix my problem, i think it should do that.
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

User avatar
Steven Seagal
Atari God
Atari God
Posts: 1983
Joined: Sun Dec 04, 2005 9:12 am
Location: Undisclosed
Contact:

Re: Steem SSE 3.9

Postby Steven Seagal » Sat Apr 08, 2017 6:14 am

I tried averaging the ST samples, but it sounded terrible. :(
Granted, it was just a little test.

The latest beta is not hard to find.
Please follow this link: http://sourceforge.net/projects/steemsse/files/DevBuilds/
Remember: for the alternative YM emu, options 'C2' and 'Sampled YM2149' are required.
You may change it live for comparison.


Social Media

     

Return to “Development”

Who is online

Users browsing this forum: No registered users and 2 guests