Jump to content

SpiceWare

+AtariAge Subscriber
  • Content Count

    15,935
  • Joined

  • Last visited

  • Days Won

    10

SpiceWare last won the day on October 10 2017

SpiceWare had the most liked content!

Community Reputation

5,337 Excellent

6 Followers

About SpiceWare

  • Rank
    Draconian
  • Birthday 11/09/1966

Contact / Social Media

Profile Information

  • Custom Status
    Medieval Mayhem
  • Gender
    Male
  • Location
    Planet Houston

Recent Profile Visitors

82,283 profile views
  1. Ran across this: Which is a followup to some rather old discussions we've had here in the blogs:
  2. Great hack! You asked about Frosty's colors shifting during the live stream - COLUP0 is getting updated at cycle 36, so well after the scanline has started to be drawn. Arrow at top-left shows where the electron beam is when the color was changed. I cover why that occurs here using the sheared snowball in Stay Frosty 2 as an example. The Berzerk font also looks out of place, maybe a search on frosty font would give you some ideas.
  3. To see how long routines run I set up the 6507 code to send time remaining (from RIOT register INTIM) to the C code. The C code can then display it using the score. I'll most likely cover that in Part 4 or 5 of the CDFJ tutorial. If you don't want to wait that long you can check out this blog entry to see how I did it for DPC+. Do note it's a bit messed up (specifically the code blocks) due to the recent forum upgrade, but if you download the source you can see it. Look for TimeLeftOS and TimeLeftVB in the 6507 code. Also note the DPC+ registers start with DF instead of DS. That's a misnomer because Data Fetcher implies read-only even though they can also be used to write data. This is because the names come from DPC where the only thing you could use them for was to fetch values from Display Data. In DPC+ these registers evolved to also include the ability to write to Display Data.
  4. The regular data streams are 0-31, DSCOMM is 32. The addresses for regular data streams can only be set by the C code. The address for DSCOMM is set by 6507 code using DSPTR, though could also be set by C code. DSWRITE only writes to DSCOMM. If Display Data is set like this: _DS_TO_ARM: _SWCHA: ds 1 ; controller state to ARM code _INPT4: ds 1 ; firebutton state to ARM code _DS_FROM_ARM: _COLUBK: ds 1 ; background color from ARM code Then the 6507 can send the values to the ARM, call the ARM code which calculates background color based on the joystick, then get the calculated background color by doing this: ldx #<_DS_TO_ARM stx DSPTR ldx #>_DS_TO_ARM stx DSPTR ldx SWCHA ; read state of both joysticks stx DSWRITE ; written to _SWCHA ldx INPT4 ; read state of left joystick firebutton stx DSWRITE ; written to _INPT4 ldx #$FF ; flag to Run ARM code w/out digital audio interrupts stx CALLFN ; runs main() in the C code lda #DSCOMM ; read value in _COLUBK sta COLUBK ; set the background color
  5. CDFJ is built around data streams. A data stream is a sequence of data elements made available over time - basically a list of values such as: 10 55 20 25 ... The data stream will auto-advance so that the first time you read it you'd get 10, the next time you'd get 55, then 20 and so on. Data streams are very helpful during the kernel as you can update any TIA register in just 5 cycles: LDA #DS0DATA STA GRP0 General Purpose Data Streams There are 32 general purpose data streams named DS0DATA thru DS31DATA. Each data stream has an increment value associated with it for the auto-advance feature. Example increments: 1.0 for 1LK player graphics 0.20 to repeat chunky playfield graphics over 5 scanlines 2.0 for interlaced bitmap graphics (for 96 and 128 pixel displays) Communication Data Stream There is a dedicated communication data stream named DSCOMM used for transferring data between the 6507 and ARM processors. Jump Data Streams There are 2 data streams for jumps named DSJMP1 and DSJMP2. These override JMP $0000 and JMP $0001 respectively, providing 3 cycle flow control within the kernel. This means instead of counting scanlines and branching your kernel would look something like this kernel from Draconian: ; data stream usage for game screen DS_GRP0 = DS0DATA DS_GRP1 = DS1DATA DS_HMP0 = DS2DATA DS_HMP1 = DS3DATA DS_MISSILE0 = DS4DATA ; HMM0 and ENAM0 DS_MISSILE1 = DS5DATA ; HMM1 and ENAM1 DS_BALL = DS6DATA ; HMBL and ENABL DS_COLOR = DS7DATA ; color change for players and ball only DS_SIZE = DS8DATA ; size change for all objects NormalKernel: ; 20 lda #DS_SIZE ; 2 22 <- just to keep stream in sync nk1: lda #DS_COLOR ; 2 24 2 33 from Resm0Strobe28 <- just to keep stream in sync lda #DS_HMP0 ; 2 26 sta HMP0 ; 3 29 lda #DS_HMP1 ; 2 31 sta HMP1 ; 3 34 lda #DS_MISSILE0 ; 2 36 tax ; 2 38 stx HMM0 ; 3 41 lda #DS_MISSILE1 ; 2 43 tay ; 2 45 sty HMM1 ; 3 48 lda #DS_BALL ; 2 50 sta HMBL ; 3 53 sta ENABL ; 3 56 lda #DS_GRP0 ; 2 58 sta GRP0 ; 3 61 lda #DS_GRP1 ; 2 63 sta WSYNC ; 3 66/0 sta HMOVE ; 3 3 sta GRP1 ; 3 6 <- also updates GRP0 and BL DIGITAL_AUDIO ; 5 11 stx ENAM0 ; 3 14 sty ENAM1 ; 3 17 jmp FASTJMP1 ; 3 20 ExitKernel: ... Resm0Strobe23: ; 20 sta RESM0 ; 3 23 lda #DS_SIZE ; 2 25 sta NUSIZ0 ; 3 28 <- changes missile size jmp nk1 ; 3 31 Resm0Strobe28: ... The data stream DSJMP1 is initially filled with addresses for NormalKernel, and ends with the address for ExitKernel. The player, missile and ball reuse routines will change individual values in DSJMP1 to jump to reposition kernels such as Resm0Strobe23. Audio Data Stream Lastly there's an audio data stream named AMPLITUDE. It will return a stream of data to play back a digital sample, or to play back 3 voice music with custom waveforms. The macro DIGIT_AUDIO in the above Draconian kernel is defined as: MAC DIGITAL_AUDIO lda #AMPLITUDE sta AUDV0 ENDM 6507 Interface From the Atari's point of view CDFJ only has 4 registers defined in the cartridge space. DSWRITE at $1FF0 DSPTR at $1FF1 SETMODE at $1FF2 CALLFN at $1FF3 DSPTR is used to set the Display Data address for the DSCOMM data stream - basically setting the RAM location the 6507 code wishes to write to. Write the low byte of the address first, then the high byte. DSWRITE writes to the address set by DSPTR. After writing, DSPTR advances to the next RAM location in preparation for the next write: ; define storage in Display Data _DS_TO_ARM: _SWCHA: ds 1 ; controller state to ARM code _SWCHB: ds 1 ; console switches state to ARM code _INPT4: ds 1 ; firebutton state to ARM code _INPT5: ds 1 ; firebutton state to ARM code ... ldx #<_DS_TO_ARM stx DSPTR ldx #>_DS_TO_ARM stx DSPTR ldx SWCHA ; read state of both joysticks stx DSWRITE ; written to _SWCHA ldx SWCHB ; read state of console switches stx DSWRITE ; written to _SWCHB ldx INPT4 ; read state of left joystick firebutton stx DSWRITE ; written to _INPT4 ldx INPT5 ; read state of right joystick firebutton stx DSWRITE ; written to _INPT5 SETMODE controls Fast Fetch Mode and Audio Mode. Fast Fetch mode overrides the LDA #immediate mode instruction and must be turned on to read from the data streams. Audio Mode selects between digital sample mode or 3-voice music mode. CALLFN is used to call the function main() in your C code. The value written to CALLFN determines if an interrupt will run to periodically update AUDV0. The interrupt is needed when playing back digital samples or 3-voice music. ldy #$FE ; generate interrupt to update AUDV0 while running ARM code sty CALLFN ldy #$FF ; do not update AUDV0 sty CALLFN C Interface From the C code a number of functions have been defined to interact with CDFJ and Display Data: setPointer() setPointerFrac() setIncrement() setWaveform() setSamplePtr() setNote() resetWave() getWavePtr() getWavePtr() getPitch() getRandom32() myMemset() myMemcpy() myMemsetInt() myMemcpyInt() This section will be expanded upon later.
  6. What controller will you be using? My sister finds it significantly easier to play with a multi-button gamepad. I dragged my ladder in and set up my extra monitor, like I did for Stella-thon, so I can watch your last show of the year live.
  7. Made some progress for Part 3. It's Part 7 of the DPC+ tutorial converted to CDFJ. I've also updated it to be built with a make file that automatically transfers variable values from the 6507 code to the C code. Also have a very rough draft for Part 2. I suspect I'll post it unfinished so I can get Part 3 posted, then make revisions to Part 2 as I work on Parts 4+.
  8. Draconian and Super Cobra Arcade use the CDF bankswitch/coprocessor scheme and require Stella 5.0.2 or newer, per wiki the Flashback is based on Stella 3.9.3 so it doesn't know how to emulate CDF. CDF continues the long tradition of adding extra hardware! inside an Atari cartridge. I have a RetroN 77 which can be upgraded to Stella 6. I haven't kept up with the Flashback so don't know if it can be upgraded as well, but there is an AtGames Flashback and Portable Consoles sub-forum here that you should find helpful in that regard. My RetroN 77 running Draconian
  9. Elon had changed his Twitter name to Elon Tusk back in February.
  10. I fixed the problem with the logo last night. Still trying to figure out what I was doing with the mad bomber routines.
  11. From the Houston Arcade Expo. Talith is not usually parked outside in the cold (low 40s) so hadn't encountered the full-roof glow before.
  12. Just an FYI in case it would be useful for you as well - Nathan needed to be able to sync audio from the AtariVox, so there's an updated build that triggers an AtariVox sound at the end of the blog post.
  13. SpiceWare

    Sync Pop

    Added a new build that also triggers a sound on the AtariVox. Nathan needs this to record a Wizard of Wor Arcade video.
  14. Got to thinking we might want to test if some TIAs have a late color change for Score Mode as well. pf_score_test.zip Use left difficulty switch to select between the 2.
×
×
  • Create New...