Jump to content

Photo

HCM & HARDBASS tools


35 replies to this topic

#1 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • 43 posts
  • Location:Dublin, Ireland

Posted Tue Dec 12, 2017 6:20 AM

I thought I'd put these into the programmer section as I presume not many ppl will browse my entire source repo in seek of information:

 

HCM Converter examples and sources:

 

tiger.png darthvader.png parrot.png

tut1.png tut2.png orca.png

 

About HCM: https://bitbucket.or...c/master/HCM.md

Converter Sources (Java): https://bitbucket.or...d/hcm-converter

Viewer Example (Atari): https://bitbucket.or...-viewer-example

 

The (VERY) experimental HARDBASS tracker I made for Android looks like this:

 

Screenshot_20171120-203646.png Screenshot_20171120-203714.png

 

About HARDBASS: https://bitbucket.or...ter/HARDBASS.md

Tracker Sources (Android): https://bitbucket.or...tracker-android

Player Example (Atari): https://bitbucket.or...-player-example


Edited by Sandor / HARD, Tue Dec 12, 2017 6:43 AM.


#2 R0ger OFFLINE  

R0ger

    Moonsweeper

  • 351 posts
  • Location:Olomouc, Czech Republic

Posted Wed Dec 13, 2017 10:33 AM

I'm loving it ! Still few things I don't understand. Mainly 64kHz source. You say you are realigning the IRQ every frame .. is it enough to prevent IRQ/DLI conflict ? Well since it's once per 8 lines, I guess it is, but I want to know more.

Also the demo is stereo pokey right ? I mean you need 2 channels for IRQ, and even if you share synth with RMT, the music is clearly more then 2 channels .. right ?

Thanks for making everything public !



#3 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Wed Dec 13, 2017 11:25 AM

I'm loving it ! Still few things I don't understand. Mainly 64kHz source. You say you are realigning the IRQ every frame .. is it enough to prevent IRQ/DLI conflict ? Well since it's once per 8 lines, I guess it is, but I want to know more.

Also the demo is stereo pokey right ? I mean you need 2 channels for IRQ, and even if you share synth with RMT, the music is clearly more then 2 channels .. right ?

Thanks for making everything public !

Hi R0ger,

 

Thanks for your questions and your nice comment on YouTube!

 

Let me address each of your questions inline:

 

You say you are realigning the IRQ every frame .. is it enough to prevent IRQ/DLI conflict ? Well since it's once per 8 lines, I guess it is

 

Ok, so I demonstrated two different approaches to propagate the generated sample buffer to the sample register.

 

1. HCM based screens

This is the approach that's by far the easiest to implement as DLIs and IRQs never run at the same time.

24 updates are written into the sample register from the HCM screen kernel (that's a good thing about the small & generic HCM screen kernel - it leaves you a little time to perform tiny tasks in it in a predictable way).

15 updates are handled via IRQ. (that's covering the areas outside of the DLIST)

There's no conflict therefore.

The once-per-frame realignment happens via setting the timer freq to 0 at the beginning of the screen kernel (when we don't need the IRQs anyways).

Then we kick off our IRQs at the end of the screen kernel and it gets kicked off in a re-initialized / realigned state since our last IRQ has long ran out.

To keep the IRQ from drifting away constantly during a single frame there's a timer pattern in the code that's being followed by the IRQ code to even out the inherently unalignable 64KHz timer vs scanline difference.

That - in theory - makes the timer aligned to the same position where it started each 7th character line (if I remember my calculations correctly :)).

 

 

2. Twister-Scroller

This one's doing IRQ+DLI based sample updates.

Now this approach (like I also say in the player example code) can be a hit and miss situation.

DLI and IRQ conflicts and order issues must be expected unless you come up with some clever stuff or you're simply lucky.

I think I was lucky as it worked out nicely with my display list and the order in which IRQs and DLIs kick in on that screen turned out to be consistent.

I'm re-aligning the IRQs in DLI code and I also modify the IRQ code from DLI code so that IRQs take the samples from the correct position in the correct buffer.

Again, this could have been a lot more complex depending on the screen layout / DLIST / DMA setup.

If you choose to go down this route, you'll have to design a system that works for your screen.

You can start out from mine and debug the DLI & IRQ code to see what's happening and when.

 

There are more possible approaches than these two, but I didn't have more screens in REHARDEN :)

(something to explore / flesh out: 24 DLI based updates instead of screen kernel based ones, then 15 IRQ based updates outside of the DLIST area)

 

Also the demo is stereo pokey right ? I mean you need 2 channels for IRQ

 

No, it's made for stock 64K XL/XE.

 

It's using channel #4 only for both the IRQ and the sample register.

 

 the music is clearly more then 2 channels .. right ?

 

Correct. You have all 4 POKEY channels in RMT and HARDBASS will only consume Channel #4 when RMT is not using it. (when channel #4 volume = 0 in RMT -OR- when channel #2 volume = 0 when channel #4 serves as a filter for channel #2)

It's completely dynamic and automatic.

For example, the bass sound I'm using most consists of a highest pitch (pitch=0) RMT instrument noise sound for a frame followed by pulse-width modulated HARDBASS bass. Along with a fully RMT drum instrument. All in Channel #4, mixed automatically.

 

Feel free to ask if something doesn't make complete sense :)


Edited by Sandor / HARD, Wed Dec 13, 2017 11:30 AM.


#4 R0ger OFFLINE  

R0ger

    Moonsweeper

  • 351 posts
  • Location:Olomouc, Czech Republic

Posted Wed Dec 13, 2017 11:57 AM

Sorry if I sound uninformed, I'm kinda new to Atari, and all my experience with this is one attempt to make sample playback. I understand all your explanation about synchronization.

 

Still .. you say you use 1 channel for both IRQ source AND synth output ? And one channel only ? Didn't think you can do that. I can and will check the source codes, but maybe you can explain a bit here ? How exactly do you setup the channels ?



#5 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Wed Dec 13, 2017 12:04 PM

Sorry if I sound uninformed, I'm kinda new to Atari, and all my experience with this is one attempt to make sample playback. I understand all your explanation about synchronization.

 

Still .. you say you use 1 channel for both IRQ source AND synth output ? And one channel only ? Didn't think you can do that. I can and will check the source codes, but maybe you can explain a bit here ? How exactly do you setup the channels ?

 

No worries. There's not much to this part really. You put the sample data into the audio control register for the channel and the timer freq goes into the audio frequency register for the channel. This just works.



#6 R0ger OFFLINE  

R0ger

    Moonsweeper

  • 351 posts
  • Location:Olomouc, Czech Republic

Posted Wed Dec 13, 2017 2:47 PM

I tried to modify my test project, which used 16kHz IRQ source, to 64kHz, and indeed, with reset Done in DLI, I can sync it even at 4kHz. Char mode + DLI, no visible conflict.

The sample playback is not as clean as 64kHz, but it's still quite clean. And it means I still have 3 channels to do whatever I want ! Still sample playback is both memory and time hungry, not sure I will use it in the end (it's like a puzzle game, secret, obviously).

 

And btw. I actually used the same channel for IRQ source and output already :-D

 

I was thinking about trying some full softsynth for Atari .. but using it only for bass is great idea. And you could also try sampled drums, as they don't need high sample rates.


Edited by R0ger, Wed Dec 13, 2017 2:48 PM.


#7 JAC! OFFLINE  

JAC!

    Stargunner

  • 1,767 posts
  • Always looking for GFX and MSX for my demos
  • Location:Lebach, Germany

Posted Wed Dec 13, 2017 4:10 PM

Looks like it's time to change your avatar from GR. 9 to HCM ;-)



#8 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Wed Dec 13, 2017 5:03 PM

Sorry if I sound uninformed, I'm kinda new to Atari, and all my experience with this is one attempt to make sample playback. I understand all your explanation about synchronization.

 

Still .. you say you use 1 channel for both IRQ source AND synth output ? And one channel only ? Didn't think you can do that. I can and will check the source codes, but maybe you can explain a bit here ? How exactly do you setup the channels ?

 

Yeah, making it higher and higher quality won't be difficult, but it loses the point then as you won't be able to afford it.

In its current form it's very affordable and still gives you a bass you didn't have before. In any case, do as you wish, it's all up to what do you want for your product.

BTW most types of drums do need high sample rates because of the noise component in them. That's why the 64KHz Pokey mode is essential for proper sounding drums and that's one of the reasons HARDBASS is not based on the much more straightforward and scanline aligned 15KHz mode. (as that'd impose the very limiting 15KHz requirement on all channels)


Edited by Sandor / HARD, Wed Dec 13, 2017 5:24 PM.


#9 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Wed Dec 13, 2017 5:05 PM

Looks like it's time to change your avatar from GR. 9 to HCM ;-)

 

Good point!

I just don't have the original photo and my current face is worse than that I'm afraid :)



#10 _The Doctor__ OFFLINE  

_The Doctor__

    Quadrunner

  • 5,847 posts
  • Location:10-0-11-00:02

Posted Wed Dec 13, 2017 7:27 PM

You forget, you're a part of the Atari scene and that's a whole 'nother world.... some one has that photo somewhere somehow someway.  These things manage to turn up over time. Unless you just made the screen and dumped the photo in the bin.... Then sadly you will have to photoshop your current face ....

 

Looks like this is really working out... everyone I've shown this to really likes it (that miraculous all by itself)... You kinda get that double take when they realize it's coming from the old computer, cause they don't sound like that.

 

Nice Job.


Edited by _The Doctor__, Wed Dec 13, 2017 7:36 PM.


#11 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Thu Dec 14, 2017 2:40 AM

You forget, you're a part of the Atari scene and that's a whole 'nother world.... some one has that photo somewhere somehow someway.  These things manage to turn up over time. Unless you just made the screen and dumped the photo in the bin.... Then sadly you will have to photoshop your current face ....

 

Looks like this is really working out... everyone I've shown this to really likes it (that miraculous all by itself)... You kinda get that double take when they realize it's coming from the old computer, cause they don't sound like that.

 

Nice Job.

 

That's great to hear! I never had anybody around me who knew what an Atari was, so I can't show it to anybody who'd appreciate any of it :)

 

BTW, it appears to me that HARDBASS stole all the spotlight from HCM. I hope ppl will start seeing the use cases for HCM as well in a decade or two ;)



#12 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 11,045 posts
  • Location:Baden-Württemberg, Germany

Posted Thu Dec 14, 2017 4:22 AM

Sandor... what's the best way to run the hardbass "tracker"?



#13 R0ger OFFLINE  

R0ger

    Moonsweeper

  • 351 posts
  • Location:Olomouc, Czech Republic

Posted Thu Dec 14, 2017 4:39 AM

BTW. I just noticed .. the filtering on lead voice in Reharden demo is somewhat good. Doesn't sound like normal RMT filter .. any tricks to it ?



#14 _The Doctor__ OFFLINE  

_The Doctor__

    Quadrunner

  • 5,847 posts
  • Location:10-0-11-00:02

Posted Thu Dec 14, 2017 5:02 AM

Who will be the first to make a Christmas or New Years HCM and Hard Bass displayed for our eyes and ears?

 

I know it's a very busy time with travel, friends, family. There will be more time as winter break and a some days off come along.

 

I'm curious and wonder if a some of the rasta converted images would translate nicely into HCM. Since the images are optimized already it might make for some decent screens.

 

My wife is going to kill me, I stayed up all night reading the Hard repository...


Edited by _The Doctor__, Thu Dec 14, 2017 5:44 AM.


#15 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Thu Dec 14, 2017 6:44 AM

Sandor... what's the best way to run the hardbass "tracker"?

 

Hey Heaven, I'm afraid you'll need to use an Android phone. I had RMT running on a PC on speakers and the HARDBASS tracker running on my phone with headphones. It sort of worked :) ...this stuff needs to get integrated into RMT via some black magic reverse-engineering... That's when it'd get comfortable & easy to use. Up until then you'll need a lot of dedication and patience to get something done. ..but it's doable once you get the grip on it. I did that tune in like 2-3 days in total.


Edited by Sandor / HARD, Thu Dec 14, 2017 6:45 AM.


#16 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Thu Dec 14, 2017 6:46 AM

BTW. I just noticed .. the filtering on lead voice in Reharden demo is somewhat good. Doesn't sound like normal RMT filter .. any tricks to it ?

 

No, that's 100% Raster's achievment. Pure stock RMT.



#17 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Thu Dec 14, 2017 6:53 AM

Who will be the first to make a Christmas or New Years HCM and Hard Bass displayed for our eyes and ears?

 

I know it's a very busy time with travel, friends, family. There will be more time as winter break and a some days off come along.

 

I'm curious and wonder if a some of the rasta converted images would translate nicely into HCM. Since the images are optimized already it might make for some decent screens.

 

My wife is going to kill me, I stayed up all night reading the Hard repository...

 

Well, Rasta converter is such a brilliant tool. Only mono-tone (greyscale/etc...) images would be comparable or better in HCM.

Color photos will be shoulders down bettern via Rasta converter.

The main strengths of HCM are the small size (8k vs 20-22k) and the fact that you can manipulate the image in real time + you can do a small task in the kernel at predictable times in a predictable way (updating HARDBASS say).

So it will never replace or rival Rasta converter for colorful photo images. It could for other use cases though.


Edited by Sandor / HARD, Thu Dec 14, 2017 6:53 AM.


#18 _The Doctor__ OFFLINE  

_The Doctor__

    Quadrunner

  • 5,847 posts
  • Location:10-0-11-00:02

Posted Thu Dec 14, 2017 1:19 PM

I was thinking the Rasta color images would look nice coverted to HCM, much of what looks nice on rasta is detail and alignment achieved by size manipulation with the color processed/optimized. With that excellent source material for HCM color mode, it may just be what is needed to give it that ever so slight bump up. and that's could be a nice surprise.

 

It's not to compete or replace, but to get an optimized source. The better the source the better the output. :) Not sure if it will diffuse or look like a copy of a copy, but it shouldn't. Something to play with and see what the affect is

 

@Stephen, Does Picard Play the Bass? Love to see and hear that one!


Edited by _The Doctor__, Thu Dec 14, 2017 1:32 PM.


#19 fox OFFLINE  

fox

    Moonsweeper

  • 255 posts
  • Location:Poland

Posted Fri Dec 15, 2017 5:29 PM

I have added HCM to http://recoil.sourceforge.net/



#20 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Sat Dec 16, 2017 5:37 AM

I have added HCM to http://recoil.sourceforge.net/

 

WOW, you're fast! Thank you, I'll check it out on Win 10.



#21 fox OFFLINE  

fox

    Moonsweeper

  • 255 posts
  • Location:Poland

Posted Sat Dec 16, 2017 5:39 AM

 

WOW, you're fast! Thank you, I'll check it out on Win 10.

Either build from Git or wait for a release. :)



#22 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Sat Dec 16, 2017 5:46 AM

Either build from Git or wait for a release. :)

 

Ah, so that's why it didn't support HCM :)

I'll wait for the release then and will try it on Win10 & Android & HTML5.


Edited by Sandor / HARD, Sat Dec 16, 2017 5:48 AM.


#23 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Sat Dec 16, 2017 5:56 AM

Either build from Git or wait for a release. :)

 

I attached the example files I'm going to try your viewer with. It's a mix of HCM Mode 0 and Mode 2 pics.

 

Attached File  hcmpics.zip   28.49KB   55 downloads



#24 fox OFFLINE  

fox

    Moonsweeper

  • 255 posts
  • Location:Poland

Posted Sat Dec 16, 2017 9:11 AM

 

I attached the example files I'm going to try your viewer with. It's a mix of HCM Mode 0 and Mode 2 pics.

 

attachicon.gifhcmpics.zip

Thanks, I already found them in your repo. I updated the HTML5 viewer, so you can try it: http://recoil.source...tml5recoil.html



#25 Sandor / HARD OFFLINE  

Sandor / HARD

    Space Invader

  • Topic Starter
  • 43 posts
  • Location:Dublin, Ireland

Posted Sat Dec 16, 2017 9:20 AM

Thanks, I already found them in your repo. I updated the HTML5 viewer, so you can try it: http://recoil.source...tml5recoil.html

 

It works very nicely, thank you!






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users