Jump to content

Xuel

Members
  • Posts

    849
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Xuel

  1. Here's one way to fix it:

     

    10 REM ASSEMBLY CODE FROM HTTPS://WWW.ATARIARCHIVES.ORG/ALP/CHAPTER_8.PHP
    15 REM SEE LISTING 8.2
    20 GRAPHICS 0:POKE 752,1
    30 SETCOLOR 1,0,0
    40 DL=PEEK(560)+PEEK(561)*256
    45 REM READ IN ASSEMBLY CODE
    50 FOR I=0 TO 49:READ B:POKE 1536+I,B:NEXT I
    60 DATA 72,152,72,172,0,4,185,2,4,141
    70 DATA 10,212,141,24,208,238,0,4,173,0
    80 DATA 4,205,1,4,144,5,169,0,141,0
    90 DATA 4,104,168,104,64
    91 DATA 165,20,197,20,240,252,169,192,141,14,212,104,104,104,96
    95 REM MODIFY DIPLAY LIST FOR INTERRUPT
    100 FOR I=6 TO 27:POKE DL+I,PEEK(DL+I)+128:NEXT I
    110 FOR I=2 TO 3:POKE DL+I,PEEK(DL+I)+128:NEXT I
    195 REM READ IN BACKGROUND COLOR DATA
    200 POKE 1024,0:POKE 1025,24
    210 FOR I=0 TO 23:READ B:POKE 1026+I,B:NEXT I
    220 DATA 25,20,25,20,25,20,25,20,25,20,25,20
    230 DATA 25,20,25,20,25,20,25,20,25,20,25,15
    235 REM POINT TO DLI ON PAGE 6 AND ENABLE INTERRUPT
    240 POKE 512,0:POKE 513,6
    245 X=USR(1571)
    250 GOTO 250
     
    Result:

     

    post-21021-0-12224600-1542951849.png

     

    Line 91 adds a new assembly routine to set NMIEN to $C0 right after a vertical blank. This insures that the first DLI fires at the top of the screen instead of some random line.

     

    Line 50 adds 15 to the loop to account for the extra assembly code.

     

    Line 100 subtracts 2 from the loop to avoid setting the DLI flag on the Jump and Wait for Veritical Blank instruction.

     

    Line 110 adds another loop to set the DLI flag on the last blank line in the top margin and the LMS mode 2 instruction. The final display list looks like this:

     

    Altirra> .dumpdlist
      9C20: x2   blank 8
      9C22:      blank.i 8
      9C23:      mode.i 2 @ 9C40
      9C26: x22  mode.i 2
      9C3C:      mode 2
      9C3D:      waitvbl 9C20
    
    Note that the DLI fires on the last line of the lines implied by the modeline. That's why you want to put the first DLI on the last blank line, not the first mode 2 line.

     

    Line 230 uses 15 as the last color to demonstrate that the table is now properly synced to the screen. You can change it back to 20.

     

    Line 240 no longer POKES NMIEN.

     

    Line 245 calls the new assembly routine to set NMIEN=$C0 (192) after the vertical blank.

    • Like 2
  2. Not sure if it's my program behaving badly or a bug in ATXBasic but I'm seeing corruption when typing "LIST". Steps:

    1. ENTER "D2:CAV10AXB.LST
    2. LIST (OK Here)
    3. RUN
    4. Hit RESET
    5. LIST (Some corruption. Several hearts in listing.)
    6. RUN
    7. Hit RESET
    8. LIST (Major corruption)

    After step 2:

    post-21021-0-90472800-1539812456.png

    After step 5:

    post-21021-0-26501000-1539812464.png

    After step 8:

    post-21021-0-44840600-1539812471.png

  3. Very nice!

     

    I was able to get my ten-liners to work just by adjusting memory locations to avoid the A000-BFFF range.

     

    CAV10AXB.LST

    JUMPAXB.LST

     

    Cavern10 needs temp space to assemble the compressed data. I was able to move this from $A000 to $9000. This new version works on TBXL and AXB.

     

    Jump foolishly assumes the display list and screen are at fixed locations. So this new version only works on AXB and the original only works on TBXL.

    • Like 1
  4. Thanks for introducing me to the 6502/6510 disassembler. I tried to get that running under dos prompt in Wine (have a Mac) and so far no luck. However I have worked with Distella on the 2600 and got that to work. So with a bit more effort I should be able to get this to work too.

     

    On Mac, you should be able to run it from the shell. You don't need Wine. You may need to add execute permissions with "chmod +x dis". Then just type "dis".

    • Like 1
  5. Yeah, you're not looking for the sequence 82EA but rather looking the byte at that address. In the ROM it will be at location 2EA since the ROM starts at $8000.

     

    The sequence A9 11 is broken down as:

     

    A9 = LDA IMMEDIATE

    11 = VALUE

     

    And 8D 1B D0 breaks down as:

     

    8D = STA ABSOLUTE

    1B = Low byte of absolute address

    D0 = High byte of absolute address

     

    Here you can see that PRIOR is located at address $D01B.

     

    You can kinda break down the instruction bytes like you showed since generally all opcodes that start with A are some kind of LD instruction, e.g. LDA, LDX, etc. and all opcodes that start with 8 are some kind of ST instruction. But that's doesn't fully generalize. For example $A8 is TAY, i.e. transfer register A to register Y. This is a single-byte, 2 cycle instruction whereas LD instructions are all at least 2 bytes and 3 cycles.

     

    The Altirra Hardware Reference Manual is the definitive guide. Trevin's page is a decent quick reference.

     

    To get the players to blend you need to set bit 6 of PRIOR but note players 1&2 blend only with each other and likewise for players 3&4.

    • Like 2
  6. The strange thing is, this error does not always happen (e.g. it does NOT happen every second conversion), normally just every 10th or 20th conversion. Today I converted approx. 5 music files and then the error showed up again (but using the reconvert button worked fine before!). Went to the web-developer options in Firefox and under debugger, inspector, etc. I could see some sources, but not the line where it spilled out the error; a button named JS showed "uncaught exception: out of memory"...

     

    Cleared the cache in Firefox (under extras, setup), but when I reloaded Fuji Convert, it still refused to convert the music file. So I closed Firefox and then executed C-Cleaner (which removes trash, temp files, etc.) and when I started Firefox and Fuji Convert again, it converted the same music file without any problems...

     

    P.S.: When the error shows up, it does not matter then if I use "browse" or "reconvert" to try to convert the file once more - the error shows up again...

     

    OK, the "out of memory" error strongly suggests a memory leak. Closing Firefox and restarting every so often should be sufficient. No need to clear cache as this is purely a RAM issue.

  7. Well,

     

    I always convert MP3 or WAV into mono 44khz first, then into stereo 22khz using the "reconvert" button (the program automat. sets the sample rate to 22khz when I choose stereo, still wondering if a higher sample rate would be possible in stereo). The error only happened when I tried to convert into stereo (with reconvert) and it always happened after loading, when it should "decode and resample"... it suddenly spilled out "Error: Undefine..."

     

    And errm, I currently use only one tab and do not open any other tabs while converting the music into PDM. When I opened other tabs some weeks ago and made them active while converting, the converting process stopped until I came back (and made Fuji convert active again). So that is why I only open one tab - the Fuji Convert and don't do anything else in the meanwhile (okay, watching tv on my LCD tv and coming back to the PC when converting is finished). When the error happened, I simply loaded another website, but when I came back several minutes or hours later, Fuji Convert still showed my settings and the name of the last converted file, so when I tried converting again, the error still came up. Converting one day later worked then - guess I have to clear the cache or something like that ?!?

     

    Besides, I am using an old and outdated OS on the PC, also known as WIN XP (32Bit with SP3), Firefox 52.9.0 esr (32Bit) and Java 7 (update 45)... ;-) Or do I need a newer Java version, e.g. Java 8 ?!?

     

    OK, I see. I suspect that there might be memory leak involving javascript Blobs. I suggest reloading the page after you've saved the mono 44kHz version and then converting to stereo 22kHz using "Browse..." again. In other words, avoid the "Reconvert" button when converting large files.

     

    BTW, the version of Java shouldn't matter since FujiConvert only uses Javascript (which is totally different than Java).

  8. Well,

     

    every now and then Fuji Convert (or the Browser?) spills out an "Error: Undefine..." when converting a WAV or MP3 into PDM (PCM 4+4) format. You may think then, that this music file cannot be converted into PDM format - but thats not the case! All you have to do is wait and try the same file a few hours or a day later and suddenly it works...

     

    So maybe the Error should look like this: "Too busy! Try again later..." ?!? Having converted approx. 250 music files into PDM format right now, I got the mentioned error more than 10 times. When I got it for the first time, I converted the MP3 into WAV one day later and it suddenly worked. When I got the error again I converted MP3 into WAV once more, but at the same day (just a few minutes later) and the error still came up, so it had nothing to do with the music format. When I tried both formats one day later, both converted fine, so I guess, that whenever this error shows up, the converter is too busy or something else went wrong and its all good when you try again at a later time. So, to make a long story short: Don't give up, if converting your music file into PDM fails, try again one day later and it may work fine then...

     

    (For example, I converted "Shine On You Crazy Diamond by Pink Floyd into PDM mono yesterday and it worked, converting into PDM stereo gave the "Error: Undefine..." message; tried it again today and the music file converted fine into PDM stereo. Since the result is approx. 28MB in length, I have to try if it works fine with the PDM player or not. The 23MB PDM file of "November Rain" by Guns N'Roses worked fine, so I have yet to see if I have a 24MB or 48MB file limit for playback with my AVG cart and 16GB Sandisk SD card...)

     

    Still wishing for a PDM player by FJC that can play PDM in stereo and several musics in one go (aka a playlist), etc. - that would be really great !

     

    If that message happens again, can you open up the console and see what file and line number it says the code failed on? When exactly does it occur? When you click on "choose file" or "reconvert"? During the conversion? During page loading?

     

    Maybe the javascript didn't finish downloading when you tried it. There's a 6MB json file, players.js, that contains all of the player code. Or maybe the browser ran out of memory. Closing the tab and reopening might help.

     

    BTW, all of the conversion happens on your local machine. So github's server is only busy while you're downloading the page. From that point on, everything is running in the browser.

  9. Thanks for the new release.

    One feature request: Could you please add a keyboard shortcut for muting sound?

     

    P.S.: I know this is low priority, but I just wish you used the updated app icon that I had sent you over a year ago :-)

     

    This already exists:

    1. Tools -> Keyboard Shortcuts
    2. Select Audio.ToggleMute from the Available commands list
    3. Click on the text input box above the "Key up" box
    4. Press the key that you want to bind (for example I use Page Down)
    5. Click on Add
    • Like 1
  10. FujiConvert 0.2.4:

    • Fixed issues found by Microsoft Edge

     

     

     

    it do not work in my browser :( I change settings as i need, and nothing happens after mp3 choose. than i click to reconvert and stil nothing happens. and in the version desription in the left down corner i have only version X.X. iam using Edge, win10 (and it do not work on Chrome and IE too:( )

     

    It works for me in Chrome, Firefox and Edge on Windows 10. Are you using the github.io site or running a local copy? If running locally, Chrome doesn't allow web workers when using the file:// interface so you'll need to use an HTTP server or run Chrome with --disable-web-security. If it still doesn't work for you, can you open the developer console and see if it reported an error?

    • Like 3
  11. FujiConvert 0.2.2:

    • Added sinc resampling (super slow)
    • Added SIC! cart support
    • Added preview wave file (always 8-bit regardless of method)

    I'm using Ron Nicholson's Quick & Dirty Simple Slow ReSampling technique which is indeed brute-force and slow as advertised. Set resampling effort to "None" to disable.

     

    Using "High" effort is enough to get a pretty clean chirp with a pretty clean cutoff. "Ultra" does a bit better. I'm using the sample from the Chirp Wikipedia page.

     

    Linchirp.ogg.zip

    Linchirp pcm4+4 mono 7800Hz sic pal high.zip

    Linchirp pcm4+4 mono 7800Hz sic pal ultra.zip

    The resampling effort just determines the window size for the sinc convolution:

    • Low = 16
    • Medium = 128
    • High = 256
    • Ultra = 1024

    The cutoff frequency is hard-coded at 0.45 * output sample rate.

     

    I would love (easy) suggestions for how to speed this up.

     

    I added the preview wave file download to verify that the resampling was working. Playing the result in the browser via WebAudio ("Play" and "Stop" buttons) doesn't give a true picture because WebAudio doesn't resample so you get artifacts. That's the whole reason that I added explicit resampling in the first place. See also this post.

    • Like 6
  12. Here is a video of M.I. by E. converted with Fuji Convert by me into a (alas, extremely noisy) PDM file, intentionally shortened, so the record companies cannot complain. Is the amount of noise normal for a PDM (PCM 4+4) file ?!? Or did I choose wrong settings in Fuji Convert ?

     

    attachicon.gifM_I_as_PDM_file.zip

     

    video container: AVI with MPEG4 / XVID

    I suspect two things are happening for soft clear tones like this: 1) 8-bits is not enough dynamic range and 2) The imperfections of PDM are accentuated.

     

    Even Covox has some noise. Compare these stereo conversions:

     

    imm-trim pcm4+4 stereo 31200Hz atarimax pal.zip

    imm-trim covox stereo 31200Hz atarimax pal.zip

    • Like 1
  13. Is this right place for Altirra related questions ?

    I need to log memory writes .. just PC, destination address, and value. I found how to log tons of thing, but not this.

    Thanks !

    You can use the bx command. For example, this will log all writes to ANTIC:

     

    bx "write>=$D400 and write<=$D4FF" "r; g"
    

    Example output during Self-Test:

     

    (200:105, 17) A=20 X=2C Y=00 S=FA P=35 (   I C)  50E6: 8E 0A D4  L50E6   STX WSYNC    [$D40A]
    (200:112, 79) A=00 X=7A Y=00 S=FA P=37 (   IZC)  50E6: 8E 0A D4  L50E6   STX WSYNC    [$D40A]
    (200:128, 74) A=00 X=7A Y=00 S=FA P=37 (   IZC)  50E6: 8E 0A D4  L50E6   STX WSYNC    [$D40A]
    (200:144, 75) A=00 X=7A Y=00 S=FA P=37 (   IZC)  50E6: 8E 0A D4  L50E6   STX WSYNC    [$D40A]
    (200:248, 51) A=00 X=00 Y=00 S=F9 P=76 ( V IZ )  C026: 8D 0F D4          STA NMIRES   [$D40F]
    (200:249, 73) A=51 X=F9 Y=00 S=F9 P=75 ( V I C)  C13A: 8D 03 D4          STA DLISTH   [$D403]
    (200:249, 81) A=34 X=F9 Y=00 S=F9 P=75 ( V I C)  C140: 8D 02 D4          STA DLISTL   [$D402]
    (200:249, 89) A=21 X=F9 Y=00 S=F9 P=75 ( V I C)  C146: 8D 00 D4          STA DMACTL   [$D400]
    (200:251,105) A=E0 X=FF Y=00 S=F9 P=F1 (NV   C)  C178: 8D 09 D4          STA CHBASE   [$D409]
    (200:251,113) A=02 X=FF Y=00 S=F9 P=71 ( V   C)  C17E: 8D 01 D4          STA CHACTL   [$D401]
    
    Type ".help bx" for more info.
    • Like 4
×
×
  • Create New...