Jump to content

Richi_S

Members
  • Content Count

    55
  • Joined

  • Last visited

Everything posted by Richi_S

  1. Well, the summer is over and I'm back on the 2600... After playing around with game music and my sound system, I'm doing some mayor changes to it. I think following approach serves Atari 2600 music programming best: There are two Stella Tracks: Track 0: The Percussion Track Track 1: The Main Instrument Track First the Music designer can define the waveform of the Percussion Instruments (there can be up to 32 Percussion Instruments). Then the Main Instrument Waveform needs to be defined (Envelope, and Frequency Shift), the system will feature the the ADSR envelope known from the C64 SiD Chip. This allows a wide variety of Instruments and Sounds. Once the instruments are there, the Notes need to be punched into a sequencer table (this is done like in the old sound system). Various "Songs" shall be storable (Title Music, In Game, Game Over Screen,...). Every Song Points to three Beats in the Sequencer table: The "Song Start" Beat, The "Song End" beat, and the "Song shall loop to when it has reached the end" Beat. The Game Developer should be able to control the sound system: 1. The two tracks can be attenuated and muted separately from each other. When Muted the Progammer has got full control over the Audio Channel for the games sound effects for example. 2. There will be 4 Songs that can be defined (Title Music, In Game, Game Over Screen,...) the programmer can start them out of his program. This control are done via a control register (1 byte). The entire sound system will use 8 to 10 bytes of RAM, and it might be feasible to squezze it into the Vsync area. Enough Chit-Chat, how will it sound? This file has got a little Beat box with 7 different Percussion Instruments (the main Instrument is not finished yet). I'm trying out various beats here. Percussion.bin Please tell me your opinion!
  2. Thanks for helping me out! I definily missunderstood the documentation I was using... When reading this Documentation, it's clear how the zero flag works with AND. Great finding, roland p! The Docu is great.
  3. Thanks for the quick reply. Well, I was frustrated... I wasted a lot of time, because I thought it could be used with some wierd trick to test any bit of a byte (would save cycles). So I'm stuck with the typical coding: LDA Control_register AND #$08 EOR #$08 BNE Jumppoint ;Bit 3 is set Jumppoint Is there any way to streamline this code?
  4. Well, I'd say 3 to 5. I did not count them, or did any tests on that. While programming the code I started it as a part of a game. I did not use a timer like in the released code. I was just using STA WSYNC. In the Engine code, every now and than, five STA WSYNC commands had been placed and it worked fine.
  5. I would award the BIT Test instruction as the most useless command of the 6502. Ok... it comes right after RTI. http://www.obelisk.demon.co.uk/6502/reference.html#BIT Is there something usefull you can do with it? Like testing a Flag of every position of a Byte? Or even better; Testing a Flag of every position of a Byte whether the Flag is 0 or 1.
  6. Is there a need for In Game Music? Because I`m thinking of developing a simplified Batari version fo my In Game Sound engine.
  7. Please watch my new Topic: In Game Sound Engine
  8. Quickstart: How To use The In Game Sound System Some basic definitions: TV Frame: The TV Frame is the smallest unit (60Hz, NTSC). On every TV Frame the AUDFx and AUDVx registers are updated from the Special instrument tables, the Special Instrument pointer(Music_special_pointer_X) is increased. Note: Depending on the music timers prescaler (Music_timer, MUSIC_TIMER_PRESCALER) a defined number of TV Frames form one Note. If a new note is loaded the AUDFx_base register is loaded and the special instrument pointer (Music_special_pointer_X) is reloaded, the beat offset pointer is reseted (Music_beat_pointer_X_offset). Beat: Eight Notes form a Beat (Music_beatX_AUDF). To every Beat a Instrument (Tia Instrument and Special Instrument Modifier, Music_PatternX_Instrument) is assigned. Pattern: A Pattern is two Tables (Music_PatternX , Music_PatternX_Instrument ) that links to the Beats and assigns Instruments to the Beats. Song: A Song consists of two channels. It defines the starting Point and the end point and the Loop in Point of the Patterns (MUSIC_SONG_START, MUSIC_SONG_END, MUSIC_SONG_LOOP_TO). Channel: The Atari 2600 has got two channels. Every channels has got its own Pattern, Beats and Notes. The Pattern The pattern is played from Lesf to the right. There is defined A starting point (MUSIC_SONG_START) A End point (MUSIC_SONG_END) A point where the Song shall repeat after the pattern has reached the end point (MUSIC_SONG_LOOP_TO) The Notes The Pattern table points to a Address in the Music_beatX_AUDF table The values in the table are the Notes (AUDFx). #99 is Silence (Pause) The Beat Table is played from left to the right. If all eight notes of one beat are played, the next beat from the pattern table is loaded. The Instrument Every Patterns Beat has got its Instrument (Instrument Number in Music_PatternX_Instrument). The Instrument Number is divided in two Nibbles The Instrument Numbers Low Nibble is the TIA Instrument (AUDCx Register) The Instrument Numbers High Nibble is the Number of the Special Instrument. By using the Music_special_instrument_pointer the starting address of the Music_special_AUDV_table and Music_special_AUDF_table is identified. Every TV Frame the pointer to these tales is increased, the Tables are read from left to right. The AUDV register is updated every TV Frame with the value from the Music_special_AUDV_table. The AUDF register is updated every TV Frame with the value from the Music_special_AUDF_table plus the value of the note to be played.
  9. If you want to make your own music I recommend: SoundX__1994___Hozer_Video_Games__Ed_Federmeyer___WIP___a1_.bin So that you can hear how the instruments you choose might sound. The batari Basic Music and Sound Page To convert real notes in Atari 2600 values. And finally Anvil Studio A great freeware MIDI editor. It features a Mixer that lets you strip down existing midi files to two track Atari 2600 music, and a Piano Roll Editor, which enables even persons with limited musical talent (like myself) to generate nice music. It also displays the notes of a given Midi File very similar to the Pattern & Beat system I use.
  10. As I announced in the previous topic Yet another sound system, I finally release my In Game Sound Engine: IGSE.bin IGSE.txt Just rename it to IGSE.asm and have some fun. Please post Your opinion, bugs You found, and and Your suggestions!
  11. Hi, again some new demos... The demos are basically the same as moosic_01.bin only the special instruments are changed to experiment around: The first 5 seconds are the plain TIA instrument, followed by the special instruments. TIA Instrument 5 with different Frequency curves: moosic_02_lfo.bin TIA Instrument 5 with different Envelope curves: moosic_03_envelope.bin TIA Instrument 1 with different Envelope curves: Moosic_05_envelope.bin I've noticed two bugs in the demos... I'm going to fix them and put the code online subsequently.
  12. What about the initial State of the RAM? Which Initial values, after power on, are stored in the real 2600 RAM, and which initial values are stored in the emulators RAM?
  13. I would use the Colour Switch (PORTB - D3) to enable the user to switch between the emulator version of the game and the VCS version for the real TV.
  14. Hi B00daW, nice idea, in the next days I'm going to dissect the sound engine from the game code and publish it here. A short list this engine features: 1) A Sequencer 2) Every time a new TV frame is drawn the AUDF and AUDV registers are changed (almost like a Synthesizer does). The AUDF and AUDV value changes are stored in tables, a free runnind pointer is used. Once a new note is loaded the by the seqencer the pointer on the AUDF and AUDV table is reloaded. Every pattern in the sequencer can be assigned to a TIA Instriment and a Special Instrument. So it's basically a tracker without a sampler (Wikipedia has a nice article about it). A 30 second Demo: The song is derived from Contra. Instruments used for the two tracks: 1) TIA Instrument 1 and Sawtooth Envelope, Volume: Piano (done by special Instrument) 2) TIA Instrument 7 and Sawtooth Envelope, Volume: Forte (done byspecial Instrument) moosic_01.bin
  15. Unfortinately there wont't be much to read. One Page (A4) of Text takes about 2 KB. Even if you use just 32 Characters (5 Byte per character) its still 1250 Byte. When using a 32KB Cartridge its 25 Pages max. Not to forget the actual Programm... So, unless you are not using some sort of compression technique, I think 20 Pages is realistic.
  16. Great Idea! I like the In-Game-Menu. There aren't many Atari2600 games that have got such a high grade feature.
  17. Here is another sound demo. This time I'm making barely use of the special instruments. song2.bin I'm going to upload a demo the next days that shows the full capabilities of the sound system.
  18. So, what does it sound like... Here is some sound from my current project. The sound is derived from Contra. It is demonstrating the tracker Capabilities more than the Special Instrument capabilities. I'm goingt to upload a programm that demonstrates some of the Special Instruments which are possible.
  19. For my games I've developed a sound system trying to max out the TIA chip. It's based on two Ideas: A two channel tracker system like in *.MOD files (A Index Table pointing to the Note-patterns, Instrument Table used for teh pattern) So called "Special Instruments" that can be assigned to the Instrument used. This alows special waveforms. Every time a key is hit, the waveform is restated. This system can easily fit in the overscan area (about 5 scanlines needed). Due to the separation of the Tracker and the Instrument modification table a minimum of ROM space is needed. 16 Byte of RAM needed (could be optimized to 12 Byte) The Tracker: Based on the 60Hz TV Picture cycle a timer is used with a prescaler. This allows variable BPM. Music_Song0_Pattern -> Pointer To the Pattern to be played Music_Song0_Instrument -> Instrument of the Pattern (High Nibble: Special Effect, Low Nibble: TIA Instrument: AUDC0) Music_pattern0_AUDF -> The patterns "Music_Song0_Pattern" is pointing to. These values represent the Base frequency Loaded Music_Song0_Pattern ;Audio0: pointer to the Patterns (1 Pattern = 1 Beat) ; Intro Main ; | | ; 0 1 2 3 4 5 6 7 .byte #$00,#$00,#$08,#$08,#$10,#$10,#$18,#$18 Music_Song0_Instrument ;Audio0: "Instrument" of the Pattern ; 0 1 2 3 4 5 6 7 .byte #$01,#$01,#$11,#$11,#$21,#$21,#$01,#$01 Music_pattern0_AUDF ;Audio0: Frequency / Tone Base: 1/8 (0..31 = Tones, 99: Pause) ;Intro ;$00 - Pattern 0 .byte #15,#15,#15,#15,#15,#15,#15,#15 ;$08 - Pattern 1 .byte #14,#14,#14,#14,#14,#14,#14,#14 ;$10 - Pattern 2 .byte #13,#13,#13,#13,#13,#13,#13,#13 ;$18 - Pattern 3 .byte #12,#12,#12,#12,#12,#12,#12,#12 The Special Insrument: Every 60 Hz the Registers AUDFx and AUDVx are updated from the designated tables. If a new note is loaded from the Tracker tables, the Pointer for the special instrument tables is updated. The High Nibble of "Music_Song0_Instrument" is shifted 4x low. and used as a index for Music_special_instrument_pointer. Music_special_instrument_pointer -> The Start address in the Music_special_AUDF_table and Music_special_AUDV_table. Music_special_AUDF_table -> AUDFx Modifier: AUDFx = Music_pattern0_AUDF + Music_special_AUDF_table Music_special_AUDV_table -> AUDVx Modifier: AUDVx = Music_special_AUDV_table Music_special_instrument_pointer ;Special Instrument # (Pointer to: Music_special_AUDF_table / Music_special_AUDV_table) ; $0x $1x $2x .byte #0, #8, #16,#25 Music_special_AUDF_table ;Special Instrument Modifications: Frequency ; 0 1 2 3 4 5 6 7 8 9 .byte #0 ,#250,#250,#2 ,#2 ,#0 ,#0 ,#0 ,#0 ,#0 Music_special_AUDV_table ;Special Instrument Modifications: Volume ; 0 1 2 3 4 5 6 7 8 9 .byte #4 ,#5 ,#5 ,#5 ,#4 ,#4 ,#4 ,#8 ,#8 ,#8
  20. What a great Game! It's Simple and Fun, thats the Atati 2600 spirit.
  21. Yes, I've got it. But, isn't there more? I mean, back in the days, these programms had manuals about the weight of a brick.
  22. Is there a DASM Manual on the Web? Thanks
  23. I'm amazed, and really looking foreward to see the final game!
  24. Thank you Jeff! Now it works fine! starfield.bin starfield.txt
×
×
  • Create New...