Videopac / Odyssey2 forum
October 17, 2021, 04:31:35 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Al lot of attachments from Nov 2011 till april 2012 are damaged. Please ask the original poster to re-upload if you need them.
 
   Home   Help Login Register links videopac.nl  
Pages: 1 2 3 [4] 5   Go Down
  Print  
Author Topic: lowercase i (WIP)  (Read 15215 times)
Rene_G7400
Pedit5
I take the Videopac and leave the Canoli!
*
Posts: 2519



WWW
« Reply #45 on: June 23, 2016, 05:09:21 PM »

Bank 1 can stay empty.
Logged
Chris!
Give this man a Jopac!
******
Posts: 1233



WWW
« Reply #46 on: June 24, 2016, 03:06:42 PM »

Can I change the grid colors mid-bank?
Right now I'm using Rafael's code:
Code:
vsync
stop tcnt
;mov r0,#000h ; (first color: I used black/black here, to keep SELECT GAME screen black)
;mov a,#0a3h
movx @r0,a
mov a,#0ffh ; (Hereīs the size. FF is the smallest trace, the same size of a horizontal bar, at this size it will not visible on screen)
mov t,a
strt cnt
jmp 001ah

timer
sel rb0
mov r5,a ; save accumulator
stop tcnt
mov r0,#030h ; get color data pointer
mov a,@r0
add a,#colordata & 0ffh ; get color data address
mov r2,a
movp a,@a ; get color
mov r1,#0a3h
waitline1
jt1 waitline1 ; wait for end of video line
waitline2
jnt1 waitline2
movx @r1,a ; set color
inc @r0 ; update data pointer
inc r2
mov a,r2
movp a,@a ; get timer data
mov t,a
strt cnt ; start timer
inc @r0 ; update data pointer
inc r2
mov a,r2 ; check if next data = 0
movp a,@a
jnz timerend
mov @r0,a ; reset pointer if end of data
stop tcnt
timerend
mov a,r5 ; restore accumulator
retr





colordata:   ;(2nd color) (itīs size)   (3rdcolor) (itīs size)    ...
   db 01ah,      0e9h,        01ah,          0ech,       01ah,0fdh,018h,0bfh
  db 010h,0fah,010h,0dbh,010h,0d6h,009h,0feh,009h,0feh,000h ;(use 000h to close)




start en tcnti ; enable timer interrupt
mov r0,#030h ; init color register
mov @r0,#0
How would I get it to use a new colordata set, like colordata2?
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Rene_G7400
Pedit5
I take the Videopac and leave the Canoli!
*
Posts: 2519



WWW
« Reply #47 on: June 25, 2016, 12:27:09 AM »


If you haven't used intram register 031h yet, you could do it like this:

Code:
timer
sel rb0
mov r5,a ; save accumulator
stop tcnt
mov r0,#031h ; get color database
mov a,@r0
dec r0
add a,@r0 ; add color data pointer
mov r2,a
movp a,@a ; get color
mov r1,#0a3h
waitline1
jt1 waitline1 ; wait for end of video line
waitline2
jnt1 waitline2
movx @r1,a ; set color
inc @r0 ; update data pointer
inc r2
mov a,r2
movp a,@a ; get timer data
mov t,a
strt cnt ; start timer
inc @r0 ; update data pointer
inc r2
mov a,r2 ; check if next data = 0
movp a,@a
jnz timerend
mov @r0,a ; reset pointer if end of data
stop tcnt
timerend
mov a,r5 ; restore accumulator
retr


colordata:   ;(2nd color) (itīs size)   (3rdcolor) (itīs size)    ...
   db 01ah,      0e9h,        01ah,          0ech,       01ah,0fdh,018h,0bfh
  db 010h,0fah,010h,0dbh,010h,0d6h,009h,0feh,009h,0feh,000h ;(use 000h to close)


start en tcnti ; enable timer interrupt
mov r0,#030h ; init color register
mov @r0,#0
inc r0
mov @r0,#colordata & 0ffh ; set color data address

(Don't forget the initialization of register 031h at the start of the game (bottom of code).)

To load a new set, use:
mov r0,#031h
mov @r0,#colordata2 & 0ffh

Logged
Rafael
Pedit5
I take the Videopac and leave the Canoli!
*
Posts: 2735



« Reply #48 on: June 25, 2016, 02:12:17 PM »

Can I change the grid colors mid-bank?
Right now I'm using Rafael's code:

Give the credits to the right guy: René. Wink
Logged

Chris!
Give this man a Jopac!
******
Posts: 1233



WWW
« Reply #49 on: June 25, 2016, 02:56:15 PM »

How do I initialize 031h?
I tried adding "colordata2  equ 031h" but it didn't seem to help any.
What I have right now is just one color definition on the whole screen. I'm thinking because I didn't initialize 031h.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Chris!
Give this man a Jopac!
******
Posts: 1233



WWW
« Reply #50 on: June 25, 2016, 03:13:29 PM »

Never mind. I figured it out!
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Chris!
Give this man a Jopac!
******
Posts: 1233



WWW
« Reply #51 on: June 26, 2016, 01:58:40 PM »

Here is the latest version. I worked for 8 hours on this dumb thing. 4 before I went to sleep and 4 when I got up this morning at about 12:30am. I don't know why, but it kept doing odd things for no apparent reason. Thus, if you find anything weird going on, please tell me. Screen 10 is implemented, where there's a big brick floating in the sky to shoot down. Part of the problem was on real hardware, it kept doing the collision routine for the grid even though it wasn't supposed to and didn't on O2EM. So the solution was once the brick got shot down, remove the grid part and cover it up with the brick. If you miss, just go back to screen 9 and ahead to screen 10 again.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Chris!
Give this man a Jopac!
******
Posts: 1233



WWW
« Reply #52 on: July 04, 2016, 12:16:38 AM »

Haven't given up on this yet. Just made it 8k after an hour of code wrestling.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Chris!
Give this man a Jopac!
******
Posts: 1233



WWW
« Reply #53 on: July 22, 2016, 03:49:11 AM »

Thought of an idea: Have a race between you and an H. If you touch the H, you go back to the beginning of the screen. The object is to beat the H to the other side of the screen so you don't touch him. This took hours to do. The first attempt didn't go very well, and took up 1,040 or so bytes of code. But I kept doing it and got it down to 865 bytes. That was hard. And hot. I'm hot in here.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Rafael
Pedit5
I take the Videopac and leave the Canoli!
*
Posts: 2735



« Reply #54 on: July 31, 2016, 01:19:49 AM »

I played your game. Thereīs a lot o nice ideas here. But Iīm not sure if all these ideas are from "the same world".
Logged

Chris!
Give this man a Jopac!
******
Posts: 1233



WWW
« Reply #55 on: July 31, 2016, 09:34:51 AM »

What do you mean, "The same world,"?
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Rafael
Pedit5
I take the Videopac and leave the Canoli!
*
Posts: 2735



« Reply #56 on: July 31, 2016, 07:08:58 PM »

Not sure I can explain better.  Perhaps it has to do with the fact that you are using a different action for each screen (I'm not saying this is wrong), but maybe do it seems a junction minigames.
Logged

Chris!
Give this man a Jopac!
******
Posts: 1233



WWW
« Reply #57 on: August 02, 2016, 12:08:36 AM »

So it seems to you like it's a collection of minigames?
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Rafael
Pedit5
I take the Videopac and leave the Canoli!
*
Posts: 2735



« Reply #58 on: August 02, 2016, 01:24:26 AM »

Yes.
Logged

Chris!
Give this man a Jopac!
******
Posts: 1233



WWW
« Reply #59 on: August 08, 2016, 07:18:47 AM »

Well, I suppose that's not a bad thing. I went back to work on this after I found a major bug that took a few hours to kill. Pertaining to the race screen. I also found another bug that I killed where if you touch the wall above the H on the race screen, the race starts. I think I know why the reason some people are having trouble with the game: They're not pressing the I key to start the game. I tried pressing numbers on real hardware and I got weird results.
Logged

All my Odyssey2 projects, now in one place!
http://www.atari2600land.com/odyssey2.html
Pages: 1 2 3 [4] 5   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!