Jump to content

Tjoppen

Members
  • Content Count

    222
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Tjoppen


  1. Using the latest eeloader (eeloader_104e_PAL50.bin) and BIOS (hbios_105_PAL50.bin):

    When I program the Harmony with a 128 B ROM everything works as expected.

    If I instead use the menu loader (BIOS) I get various weird results (the console typically displays a black screen with gray bands).

    If I enlarge the ROM to 4k by simply concatenating 32 copies of it then it works fine.

    My guess is the BIOS simply doesn't mirror the ROM across the adress space properly.

     

    For the curious, the ROM in question is an experiment in generative "music", via this thread on pouet


  2. I'm using Ubuntu 11.04, though I doubt that's relevant.

     

    Are you using a 64bit Ubuntu? I think there's a bug in DASM that causes 64bit builds to not work properly. You should however be able to build a working 32bit binary.

     

    I used the source from dasm-2.20.11.tar.gz. On Ubuntu 11.01 you just have to

     

    - Install the g++-multilib: sudo apt-get install g++-multilib

    - Change the DASM Makefile: In src/Makefile replace CC= gcc with CC= gcc -m32

    - run the top Makefile

     

    The Nyan Cat compiled and ran fine for me with that.

    Thanks, that worked like a charm.

     

    If I'm able to fix DASM in 64-bit mode I may send patches to the guy maintaining it.

    Ooh, and I also saw dasm2 on sourceforge. Might check that out as well.


  3. Has anyone here rolled their own DASM on a GNU/Linux system and gotten it to work properly? Or know of a working binary anywhere?

     

    I grabbed the svn repo at http://sourceforge.net/projects/dasm-dillon/ (http://www.atari2600.org/DASM doesn't work any more) and tried both dasm-2.20.11 and trunk, but the resulting binaries seem to have problems with macros.

    I simply ran make on both the froehlich/dasm-2.20.11 tag and trunk and used the binaries.

    Thinking this was a line ending issue, I also tried "dos2unix *.h *.asm" but to no avail.

     

    I'm thinking DASM has a rather serious bug since it produces different errors every run.

    Can anyone confirm this? I might open a ticket on the SourceForge page, but I fear it's no longer maintained.

     

    Output from attempting to assembly this follows. dasm-2.20.11:

    ~/vcs/nyan$ ~/dasm-dillon/tags/froehlich/dasm-2.20.11/bin/dasm nyan.asm -f3 -onyan.bin

    RAM: $6 bytes left

    kernel.asm (50): error: Illegal character ''.

    char = '' 1 (-1: 48)

    kernel.asm (50): error: Syntax Error ''.

    MACRO ERROR: 'SLEEP': Duration must be > 1

    kernel.asm (50): error: ERR pseudo-op encountered.

    Aborting assembly

     

    ~/vcs/nyan$ ~/dasm-dillon/tags/froehlich/dasm-2.20.11/bin/dasm nyan.asm -f3 -onyan.bin

    RAM: $6 bytes left

    kernel.asm (50): error: Illegal character '��'.

    char = '�' -111 (-1: 40)

    kernel.asm (50): error: Illegal character '�'.

    char = '�' -9 (-1: -111)

    kernel.asm (50): error: Illegal character ''.

    char = '' 1 (-1: -9)

    kernel.asm (50): error: Syntax Error ''.

    MACRO ERROR: 'SLEEP': Duration must be > 1

    kernel.asm (50): error: ERR pseudo-op encountered.

    Aborting assembly

     

    ~/vcs/nyan$ ~/dasm-dillon/tags/froehlich/dasm-2.20.11/bin/dasm nyan.asm -f3 -onyan.bin

    RAM: $6 bytes left

    kernel.asm (50): error: Illegal character '�'.

    char = '�' -28 (-1: 81)

    kernel.asm (50): error: Illegal character ''.

    char = '' 1 (-1: -28)

    kernel.asm (50): error: Syntax Error ''.

    MACRO ERROR: 'SLEEP': Duration must be > 1

    kernel.asm (50): error: ERR pseudo-op encountered.

    Aborting assembly

     

    ~/vcs/nyan$ ~/dasm-dillon/tags/froehlich/dasm-2.20.11/bin/dasm nyan.asm -f3 -onyan.bin

    RAM: $6 bytes left

    kernel.asm (50): error: Illegal character ''.

    char = '' 2 (-1: 82)

    Unrecoverable error(s) in pass, aborting assembly!

     

    ~/vcs/nyan$ ~/dasm-dillon/tags/froehlich/dasm-2.20.11/bin/dasm nyan.asm -f3 -onyan.bin

    RAM: $6 bytes left

    kernel.asm (50): error: Illegal character '�'.

    char = '�' -19 (-1: 33)

    kernel.asm (50): error: Illegal character ''.

    char = '' 1 (-1: -19)

    kernel.asm (50): error: Syntax Error ''.

    kernel.asm (50): error: Syntax Error ''.

    MACRO ERROR: 'SLEEP': Duration must be > 1

    kernel.asm (50): error: ERR pseudo-op encountered.

    Aborting assembly

     

    trunk:

    ~/vcs/nyan$ ~/dasm-dillon/trunk/bin/dasm nyan.asm -f3 -onyan.bin

    VCS.H (198): warning: Segments must have a name!

    RAM: $6 bytes left

    kernel.asm (50): error: Invalid character '�-'!

    char = '�' -79 (-1: 48)

    kernel.asm (50): error: Invalid character ''!

    char = '' 2 (-1: 45)

    kernel.asm (50): error: Syntax error!

    MACRO ERROR: 'SLEEP': Duration must be > 1

    kernel.asm (50): ***panic***: ERR pseudo-op encountered, aborting assembly!

    dasm: main.c:1290: exit_handler: Assertion `Ifstack == ((void *)0)' failed.

    Aborted

     

    ~/vcs/nyan$ ~/dasm-dillon/trunk/bin/dasm nyan.asm -f3 -onyan.bin

    VCS.H (198): warning: Segments must have a name!

    RAM: $6 bytes left

    kernel.asm (50): error: Invalid character '��'!

    char = '�' -79 (-1: 48)

    kernel.asm (50): error: Invalid character '�'!

    char = '�' -125 (-1: -79)

    kernel.asm (50): error: Invalid character ''!

    char = '' 1 (-1: -125)

    MACRO ERROR: 'SLEEP': Duration must be > 1

    kernel.asm (50): ***panic***: ERR pseudo-op encountered, aborting assembly!

    dasm: main.c:1290: exit_handler: Assertion `Ifstack == ((void *)0)' failed.

    Aborted

     

    ~/vcs/nyan$ ~/dasm-dillon/trunk/bin/dasm nyan.asm -f3 -onyan.bin

    VCS.H (198): warning: Segments must have a name!

    RAM: $6 bytes left

    kernel.asm (50): error: Invalid character ':'!

    char = '' 17 (-1: 48)

    kernel.asm (50): error: Invalid character ':'!

    char = ':' 58 (-1: 17)

    kernel.asm (50): error: Invalid character ''!

    char = '' 2 (-1: 58)

    kernel.asm (50): error: Unknown mnemonic ''!

    MACRO ERROR: 'SLEEP': Duration must be > 1

    kernel.asm (50): ***panic***: ERR pseudo-op encountered, aborting assembly!

    dasm: main.c:1290: exit_handler: Assertion `Ifstack == ((void *)0)' failed.

    Aborted

     

    ~/vcs/nyan$ ~/dasm-dillon/trunk/bin/dasm nyan.asm -f3 -onyan.bin

    VCS.H (198): warning: Segments must have a name!

    RAM: $6 bytes left

    kernel.asm (50): error: Invalid character '�'!

    char = '�' -77 (-1: 97)

    kernel.asm (50): error: Syntax error in '0a�'!

    dasm: main.c:1290: exit_handler: Assertion `Ifstack == ((void *)0)' failed.

    Aborted

     

    I'm using Ubuntu 11.04, though I doubt that's relevant.


  4. Neat, more box art :)

    I already got some in a PM, and I think I prefer that design over this one. I'll leave deciding whether to post it in this thread up to that person.

     

    In other news, I've started poking at an NTSC port. It requires some surgery since I haven't used fixed point values for the fall speed of the bells or the velocity of the bird. There's also a few cases where the logic in the blanking takes too long, which means I have to do some of it during overscan.


  5. I've poked a little at an NTSC version, but there's something the causes the line count to fluctuate. This results in a slightly unstable picture in Stella.

    I'll see if I can get it sorted out. If not, I'll just post the source and let someone else do it. In fact, I'll probably post it anyway - I just want to take a stab at it myself first in order to learn :)


  6. I have a little VCS prod I've been working on since monday for Evoke that I need recorded.

    I'd prefer a PAL console with a composite output (or similar) and that you have a decent connection (to not have to wait for ages for uploads). RF output is probably OK, and NTSC is somewhat workable (but I'd rather have the extra scanlines).

    I can handle pretty much any digital video format on my end, but try to use a decent bitrate, say ~2 MBps or so.

    You can post your setup in this thread or in a PM, but bin/video exchange have to take place via PM or IM due to compo rules.

     

    As a backup plan, does anyone know a good way to record something from Stella?

    edit: Investigating MESS, via this thread: http://www.atariage.com/forums/topic/180852-how-can-i-record-a-video-in-stella/


  7. Watching the video, one thing that would make the game more difficult is slow the rabbit down. He does zip accross the screen rather fast... too fast in fact.

    It currently approaches the destination 1/8th of the way every frame. If you look closely you'll see that it does lag behind the "mouse pointer" a bit. One the other hand, if I lower it to 1/16th it moves way too slow.

    Somewhere in between would probably be good (say 3/32nds). Making the horizontal movement code do this would be a bit complicated - I've been putting off simplifying it, so maybe I should..


  8. I experimented a bit with having slightly random frequency, but the distance between them at F=4 is a bit large. It ended up being rather distracting.

     

    How about having a table of 4 or 8 good sounds (made in advance by you). If you increment an index into the table (AND it with #3 or #7 to wrap it around) during vblank you could play the bell sound based on the data at which the index is currently pointing. Its not truly random but because the number of vblanks between each hop will vary it should offer some sound variety.

    It already has a decent PRNG, so getting random values isn't a problem.

    The problem is not being able to vary the frequency since the sounds would end up being too dissimilar. Having thought about it a bit, one could perhaps vary the length and envelope of the effect -> some variation.

    I actually changed the bell effect quite near the deadline. It used to be about 50-60% longer, which was a bit much.

     

    I like this! It would potentially make a good "holiday cart".

     

    Some more sound variety would be cool (e.g. randomize bell frequencies). A bit more polishing and this should go on cart and in the AA store.

    What if the bells played a simple tune if you caught them all in order - like a music box? Just a thought.

    You actually don't want to take all the bells since that wastes time and leads to not having a "rescue buffer" in case you miss one. But as RevEng said, it could simply be delay based.

    There's very little ROM left for something like this (ROM which I need for fixes for an NTSC port), and it's quite a bit of a departure from the original.

     

    Also, the snowy landscape is a nice touch. It's almost too bad it scrolls off the screen at the beginning.

    I considered having some kind of background mixed in with the bells, but there's basically no time left in the kernel for that IIRC. It uses a two-part kernel at the moment.

    There's also the issue of not being able to do anything in the repositioning code, leading to a kind of artifact when scrolling. This is what causes the stars to twinkle (apart from changing their color), which is still OK.

     

    One other thing I've been considering is tweaking the difficulty a bit, such as dropping the bell width down to 1x instead of 2x (looks prettier too). That and small things like the bird speed and how often they occur.

     

    Thanks for the kinds words and constructive criticism so far :)


  9. I experimented a bit with having slightly random frequency, but the distance between them at F=4 is a bit large. It ended up being rather distracting.

     

    In related news, the results were just published - I placed fifth. I scored almost identical as the fourth place entry, so one could say shared fourth place:

    1:a 3365 Black Belt Sorvi Hero by Pizzalaatikko

    2:e 3016 Dibidogs - Rush by Kajak Games

    3:e 2958 Type Hard by Meatgrinder

    4:a 1408 Novawar: Epsilon Eridani by GDSH

    5:a 1393 Bell Hopper by Tjoppen

    6:a 1324 Assault Wing by Galactic Battlefront by Studfarm Studios

    7:a 944 eXtermination by PanicBomber

    8:a 931 Killspace by Ville Siuruainen

    9:a 910 Access Lumia by Ribbonya

    10:a 681 Evelent by Lumian, Andeye & Kitai

    11:a 629 Mushroom Crusher Extreme by Kajak Games

    12:a 471 Outnumbered by Lost Function

    13:a 467 Ratsack adventures by Andows and Capsizer

    14:a 417 Dungeon by The Tribe

    15:a 363 The Lair of Xar by Calistar

    16:a 179 Enmity by Kajak Games

    I'm actually surprised I placed so well.


  10. I participated in the Gamedev compo at Assembly Summer this year with my first ever VCS release :)

     

    The game is a demake/port of the flash game Winterbells [1].

    You steer using either a joystick or paddle (toggle using the color-B/W switch).

    Try to beat my score in the youtube video below - 8.14 * 10^19 :>

     

    It took about ten months to write from start to finish, including figuring out how this damn machine works.

    It's only PAL at the moment, but I've taken some measures to ensure an NTSC port shouldn't be too hard.

    I'll either get that done in the next couple of days or just put the code up here for someone to write a patch..

     

    57426.jpg

     

    Youtube clip of the video shown on the big screen (capped from real HW). The text was made brighter since then.

     

    Pouet page: http://pouet.net/prod.php?which=57426

    Download link: http://media.assembly.org/gamedev/2011/bell_hopper_by_tjoppen.zip (includes stella - .bin attached to post)

    Alternate link: http://www.acc.umu.se/~tjoppen/bell_hopper_by_tjoppen.zip (also includes stella)

     

    [1] http://www.ferryhalim.com/orisinal/g3/bells.htm

    Bell Hopper (PAL).bin

    • Like 13

  11. Hooray :)

     

    I see some tricks in there that I have yet to try, like early HMOVE.

    Here's some readability feedback, if anyone feels like fixing:

    * Consistent indentation would be nice.

    * Maybe use the "org" and "ds" directives to prettify the RAM declarations.

     

    Everything being in one file felt a little unusual. I use Visual Studio for my projects with dependencies on generators and include files to make things automagically generate/assemble when needed. Makes life easier.


  12. I haven't finished my analysis, but right away I started freaking out about what I'm seeing. For example, where I expected to see pulse waveforms, instead I'm seeing something that's more like a cross between a sawtooth waveform and a pulse waveform. In other words, it jumps up to a peak, but then starts decreasing like a sawtooth wave, then jumps down to a valley, then starts climbing back up like an inverse sawtooth, then jumps back up again.

    Just to chime in briefly on this: This happens to all square waves that go through DC unbiasing/decoupling, which for the VCS probably happens somewhere in the RF modulation circuitry or just before. For instance, you see this on the NES as well.


  13. Today I toyed around with a few 5-bit codec ideas. Something DPCM-like seemed like the best idea.

    After some experimentation I came up with a table driven ADPCM approach that gets down to a single bit per sample using a 62 byte LUT.

    In other words, for every sample value (0-30) one looks up the next value in the table depending on whether the current bit in the stream is set: next_sample = ADPCMTable[(sample << 1) | bit].

    The table could probably use some restructuring - I haven't written the decoder yet.

     

    I tried to attach some samples and code, but the forums have way too restrictive rules (seriously, I can't attach a .c file?). I uploaded here instead:

    http://www.acc.umu.se/~tjoppen/files/vcs/

     

    Anyway, the encoder does a fairly exhaustive search for values in the LUT.

    It obviously can't try every one of the 31^62 combination, so it starts with a decent guesstimate and does local optimization from there.

    Also, it lacks any sort of psychoacoustic model and only does a token attempt at noise shaping.

    It expects mono 16-bit PCM WAVs.

     

    Example table:

    ;62 entries
    ;1 bits per sample
    ;rms = 1.71
    ADPCMTable
    .byte 3
    .byte 16
    .byte 0
    .byte 5
    .byte 0
    .byte 6
    .byte 0
    .byte 7
    .byte 4
    .byte 8
    .byte 5
    .byte 9
    .byte 6
    .byte 11
    .byte 7
    .byte 11
    .byte 8
    .byte 12
    .byte 9
    .byte 13
    .byte 10
    .byte 14
    .byte 11
    .byte 15
    .byte 9
    .byte 13
    .byte 12
    .byte 16
    .byte 13
    .byte 9
    .byte 12
    .byte 16
    .byte 15
    .byte 20
    .byte 15
    .byte 18
    .byte 17
    .byte 20
    .byte 15
    .byte 18
    .byte 19
    .byte 22
    .byte 19
    .byte 22
    .byte 19
    .byte 22
    .byte 20
    .byte 18
    .byte 22
    .byte 26
    .byte 22
    .byte 29
    .byte 23
    .byte 26
    .byte 24
    .byte 30
    .byte 25
    .byte 30
    .byte 26
    .byte 30
    .byte 27
    .byte 30
    


  14. I don't know why I didn't think of this before, it's only 12 cycles, uses only the accumulator, and requires no branches or jumps:

     

      LDA #queue
      LSR
      STA AUDV0
      ADC #0
      STA AUDV1
    

    Michael

    That's a clever solution - put half in both AUDVx and adjust one of them using the low bit.

    My previous ideas was either the same "if (A & 0x10) AUDV1 = 0x0F;" as above, or something like "AUDV1 = -(A >> 4);L".

    I might steal that snippet for a demo this summer..

     

    I'd also consider dithering, which could increase the quality to something akin to 6- or 7-bit. Haven't done any preliminary calculations for that yet though.


  15. While browsing through the undocumented 6502 opcodes today I realized one should be able to replace all of one's BIT tricks with NOP tricks.

    After going through the tables I found two interesting characters (there appear to be duplicates):

     

    $80: NOP #Imm = 2 B, 2 cycles, affects no flags, aka DOP

    $0C: NOP Abs = 3 B, 4 cycles, affects no flags, aka TOP

     

    compared to the "normal"

     

    $24: BIT ZP = 2 B, 3 cycles, affects NVZ

    $2C: BIT Abs = 3 B, 4 cycles, affects NVZ

     

    NOP #Imm in particular is useful since it allows skipping one byte one cycle faster compared to BIT ZP.

    NOP Abs is useful mostly because it doesn't affect the status flags like BIT Abs does, which could be useful in some tightly optimized loop.

     

    Has anyone used either of these and found any problems with them? I tried searching around, but didn't come up with much.

    Luckily I haven't yet reached a state where I'd need either of these, but they could prove useful..

×
×
  • Create New...