Jump to content
IGNORED

bB starfield effect


RevEng

Recommended Posts

  • 3 months later...

A couple more notes from my testing (and I'm happy to have any of these refuted):

 

* This is only compatible with the standard kernel if NO_BLANK_LINES is enabled

 

* There is no way to exploit this trick on the Flashback Portable (I guess this was too much for me to hope for given that it is based on a hardware bug. It worked as expected in Stella, however).

Link to comment
Share on other sites

At work right now, but AFAIK it should work without NO_BLANK_LINES. Since the missile will be under kernel control, you'll need to position the missile vertically and set it's height. The effect should show up where the missle would normally be.

Link to comment
Share on other sites

At work right now, but AFAIK it should work without NO_BLANK_LINES. Since the missile will be under kernel control, you'll need to position the missile vertically and set it's height. The effect should show up where the missle would normally be.

 

Confirmed - thanks!

 

Hopefully this will be my last question, but it looks like this bug only applies to missile 0, and not missile 1? I tried setting ENAM1=2 and positioning missile 1, but no luck. My hope was to be able to use the other missile so that I could use a kernel option that took away missile 1 instead of missile 0 (player1colors) and still retain one working missile.

Link to comment
Share on other sites

The TIA bug applies to all positionable objects. To switch my example over to missile1, just change references in the vblank routine from HMM0 to HMM1. (And change any other missile0*/ENAM0 references to missile1*/ENAM1)

Link to comment
Share on other sites

Here's a slightly different example in case it is useful to anyone. Use the joystick to appear to move the ship in 8 different directions. I commented the code to show what needs to be changed to use a different missile or the ball instead in case anyone else could benefit from that.

 

Now I just need to dream up a space game where 8 directions of movement would be fun. :)

 

spaceflight.bas

spaceflight.bas.bin

  • Like 4
Link to comment
Share on other sites

  • 2 weeks later...

This example uses both missiles on the screen at the same time and with Fixed Point 8.8 variables which can create some nice Parallax effects.

 

I've made them as big as possible and duplicated each 3 times so they cover the majority of the screen,

 

Is it possible to glitch the ball or players in the same way? I've been fiddling around with the variables but cant make them repeat.

 

 

Controls:

Select which missile to edit ↕ Adjust by big amount ↔ Adjust by small amount

Reset: Picks new Preset Difficulty Switches: Toggle missile visibility

 

 

 

Glitch.bas

Glitch.bas.bin

  • Like 1
Link to comment
Share on other sites

This example uses both missiles on the screen at the same time and with Fixed Point 8.8 variables which can create some nice Parallax effects.

 

I've made them as big as possible and duplicated each 3 times so they cover the majority of the screen,

Well done - that is some trippy stuff!

 

 

Is it possible to glitch the ball or players in the same way? I've been fiddling around with the variables but cant make them repeat.

It's technically possible, yes. I'm not sure what the issue is - I'll give it a shot in the next couple days, if you don't beat me to it.

Link to comment
Share on other sites

It's technically possible, yes. I'm not sure what the issue is - I'll give it a shot in the next couple days, if you don't beat me to it.

 

The problem I was having was putting all 5 objects in at the same time, I was able to put one or two in before.

 

-----------------------------------------------------------------------------------------------------------------------

 

This new example uses all 5 objects in the glitch player0,player1,ball,missile0 and missile1.

 

In Visual BB I was able to make it work by keeping all of the horizontal moves on one line and calling WSYNC once

 

You can adjust the direction/speed in the same way but are unable to turn them on or off as before.

Glitch2.bas

Glitch2.bas.bin

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Yeah, looks the HMOVE for the player is getting retriggered. A fairly easy fix is to add this to the beginning of the vblank routine...

 

  sta HMCLR
  sta WSYNC

Thanks for the bug report! :thumbsup: I've already updated the previous examples in this thread.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

I'm trying to use missile1 instead of missile0 for the starfield.

This seems like it would be a simple change in the DPC+ kernal. Change all instances of missile 0 to missile 1 and hmm0 to hmm1.

But I can't seem to get it to work. Am I missing something?

DPCplus.Bb.starfield.all.directions missile1.bas.bin

DPCplus.Bb.starfield.all.directions missile1.bas

Link to comment
Share on other sites

But I can't seem to get it to work. Am I missing something?

 

 

HMOVE cancels out the starfield effect.

  1. Load the ROM in Stella.
  2. hit ` to enter the debugger
  3. make sure the Prompt is active
  4. type trapwrite HMOVE
  5. watch the scanline count as you keep hitting ` to exit debugger

you'll notice that bB's DPC+ Kernel hits HMOVE every-other-scanline.

 

post-3056-0-73954200-1514387792_thumb.png

Link to comment
Share on other sites

I'm trying to use missile1 instead of missile0 for the starfield.

This seems like it would be a simple change in the DPC+ kernal. Change all instances of missile 0 to missile 1 and hmm0 to hmm1.

But I can't seem to get it to work. Am I missing something?

Your attachment works perfectly for me, when I compile it myself. Make sure you're using the latest bB and remove all *.asm files from your build directory - the first version of the bB starfield effect that I released used a custom assembly file, but I incorporated the changes required into my bB dist. When I did that, I recall cleaning the fix up a bit.

 

 

HMOVE cancels out the starfield effect.

Indeed it does. But if you're already hitting HMOVE continuously, you can move some object(s) in large amounts each time, and get pretty much the same visual result as the starfield effect.

 

It's technically not the starfield effect, since it doesn't utilize the TIA bug, but I think the TIA bug version amounts to the same thing - the object keeps getting (automatically) shifted large amounts each scanline.

 

As a bonus, the "hit HMOVE every scanline" version of the effect should be universal and consistent between TIA versions, unlike the TIA bug version.

 

I have a bB DPC+ example near the top of this thread, which includes a binary.

Link to comment
Share on other sites

  • 1 year later...

Hm, I did as you said, and I put it in bank 2, all I get is a red line in the top of the screen following player0, what did I do wrong?

 dim frame=m
 dim effect=n

main

 gosub __Snowbank bank2

drawscreen

 goto main


 bank 2
__Snowbank

  frame=frame+1
  if frame=0 then effect=effect+1
  if effect>6 then effect=0

  ENAM0=2 : rem ** set ENAM0=0 when you want the stars to be gone

  rem ** no adjustment leaves the stars in place
  if effect=0 then score=0

  rem ** Adjusting missile0x by +1 or -1 moves the stars right or left
  if effect=1 then ballx=ballx-1:score=1
 
  rem ** +8 or -8 moves the stars diagonally, and displays them closer together
  if effect=2 then ballx=ballx-8:score=8

  rem ** +16 or -16 moves them diagonally, and displays them farther apart 
  if effect=3 then ballx=ballx+16:score=16

  rem ** +12 or -12 is quick and nearly vertical
  if effect=4 then ballx=ballx-12:score=12

  rem ** +48 or -48 is a slow diagonal effect
  if effect=5 then ballx=ballx-48:score=48

  rem ** +48 or -48 is a slow diagonal effect
  if effect=6 then ballx=ballx+32:score=32

  rem ** You need to ensure the missile0x position ranges from 0-159. 
  rem ** If missile0x is 0 and decreases, then set it to 159. 
  rem ** If missile0x is 159 and increases, set it to 0.
  if ballx>200 then ballx=ballx+160
  if ballx>159 then ballx=ballx-160


  vblank
  rem ** Enable the TIA bug that causes missile0 to be repeated
  asm
 sta HMCLR
 sta WSYNC
 lda #$ff
 sta HMBL
 lda #$c0
 sta WSYNC
 sta HMOVE
 sleep 5
 sta HMBL
end
  return

 drawscreen

 return
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...