You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#361
Re: Insect Combat
Posted on: 2015/10/30 13:54
PVB Elite
Joined 2008/4/26
USA
950 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (12 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I took out the blocking, it makes the game way too easy.
Top

#362
Re: Insect Combat
Posted on: 2016/2/1 2:27
VB Gamer
Joined 2014/12/3
USA
12 Posts
Long Time User (5 Years)10+ Game Ratings
Hey, VirtualChris? Can you post version history for Insect Combat & links for each one?

Thanks in advance.
Top

#363
Re: Insect Combat
Posted on: 2016/2/1 2:35
PVB Elite
Joined 2008/4/26
USA
950 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (12 Years) PVBCC 2010 EntryPVBCC 2013 Entry
That would be a huge undertaking, since I had worked on the game for 6 years and there are probably literally hundreds of versions. I guess I'm not like most people, I like to share even slight modifications to programs.
Top

#364
Re: Insect Combat
Posted on: 2016/2/14 13:24
Newbie
Joined 2008/11/15
1 Posts
Long Time User (11 Years)
Hope this is OK to post here... 122 versions of Insect Combat/Insecticide.

No version history though...

Hope it helps a little...

Attach file:


7z IC.7z Size: 671.41 KB; Hits: 158
Edited by bodkinz on 2016/2/14 14:11
Top

#365
Re: Insect Combat
Posted on: 2016/3/27 1:28
VB Gamer
Joined 2014/12/3
USA
12 Posts
Long Time User (5 Years)10+ Game Ratings
Wow! Thanks bodkinz!

@VirtualChris: I have an idea for a little easter egg for the game. On the character select screen, if you use the other D-Pad and press one of the directions, you can tilt the magnifying glass the other way and "burn" the insect (it dissolves into pixels).
Top

#366
Re: Insect Combat
Posted on: 2016/3/27 22:29
VB Gamer
Joined 2016/1/18
USA
38 Posts
Long Time User (4 Years)
I dont know. this game looks like it was made in MS Paint.
Top

#367
Re: Insect Combat
Posted on: 2016/3/28 0:31
PVB Elite
Joined 2011/3/10
USA
930 Posts
Top10 PosterLong Time User (9 Years) 30+ Game Ratings
Pong had two lines and a square and it started a revolution.
Top

#368
Re: Insect Combat
Posted on: 2017/3/19 0:06
PVB Elite
Joined 2008/4/26
USA
950 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (12 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I got the test cartridge and I have found a few problems. The game itself works fine. It's the part where you turn it off and then turn it back on that is troubling me. You'd think when you turned off the Virtual Boy, everything in the code would reset to 0. But this is not the case for some reason. The trouble I'm having is making stuff reset to 0 by hand. I went through the code and I deleted all the //comments that were actual code. It used to be 3,500 lines. Now it's 2,718, so I have slimmed it by a large margin. And this is something that I can't experiment with on emulation. It must be done with my FlashBoy. And it requires load after load of attempt to fix it so everything resets to 0, and after failing a few times (and with my knee hurting, I hurt it a week ago somehow and it still hurts. I and the VB have to be on the floor for fear the cat may knock over my VB and break it.) I thought if some C & VB coding guru would take a look at my code and reset everything to 0, that it would save me a lot of time since I don't know what I'm doing here. The code is here, and the H files are on the Insecticide website.

Attach file:


c ic20170318.c Size: 103.80 KB; Hits: 114
Top

#369
Re: Insect Combat
Posted on: 2017/3/19 14:53
Nintendoid!
Joined 2006/3/15
Ecuador
239 Posts
PVBCC 3rdCoderLong Time User (14 Years)
Quote:

VirtualChris schrieb:
... The game itself works fine. It's the part where you turn it off and then turn it back on that is troubling me. You'd think when you turned off the Virtual Boy, everything in the code would reset to 0. But this is not the case for some reason. The trouble I'm having is making stuff reset to 0 by hand.


You cannot make that assumption. It is always a best practice to initialize all variables to a suitable value before using their data.

One way to make sure that all global / static non-initialized variables are set to zero when the program starts is to clear the program's bss section (they are allocated in it) in the crt0.s file before the call to the main function is done.

To clear the bss section, you need something like the following code. Take into account that it depends on how the program's sections are defined in the vb.ld script that you're using (that is, there needs to be something similar to __bss_start and __bss_end in it):

/* clear .bss section */
movhi hi(__bss_start), r0, r6
movea lo(__bss_start), r6, r6
movhi hi(__bss_end), r0, r7
movea lo(__bss_end), r7, r7
jr end_init_bss
top_init_bss:
st.h r0, 0[r6]
add 1, r6
end_init_bss:
cmp r7, r6
blt top_init_bss

You will have to recompile the crt0.s file into crt0.o and replace the one most likely present in your compiler's folders (were you should find its source too, the crt0.s file). To recompile it execute the following:

v810-as -o crt0.o crt0.s

For local variables, you're out of luck since they are allocated in the stack and it gets "dirty" during the program's execution. You can clear all work RAM, and hence the stack, in the crt0.s file too. That could make a difference, in your case, when you power off and on the VB since it is already working for you on a cold power up, but it would be kind of hack-ish and still prone to very hard to track down bugs because, eventually, the non initialized local variables will be used and produce undefined behavior. So, you should still properly initialize all the variables before using them.

jorgeche
Top

#370
Re: Insect Combat
Posted on: 2017/3/20 1:06
PVB Elite
Joined 2008/4/26
USA
950 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (12 Years) PVBCC 2010 EntryPVBCC 2013 Entry
'v810-as' is not recognized as an internal or external command, operable program or batch file.

I put a batch file in a whole bunch of different folders and they all came up with this message. I'm afraid you're going to have to dumb it down for me. A lot.
Top

 Top   Previous Topic   Next Topic


Register To Post