You are not logged in.
Lost Password?

All Posts (VirtualChris)




#1
Re: Casino game for VB
Posted on: 3/5 22:40
PVB Elite
Joined 2008/4/26
USA
930 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (10 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I would, but I don't know how.
Top

Topic | Forum


#2
Re: Casino game for VB
Posted on: 3/4 2:55
PVB Elite
Joined 2008/4/26
USA
930 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (10 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I poked around modlibgccvb.h and found this:

int randseed
()
/* When run at startup gets a random number based on the changing CTA */
{
    
int random 1;
    
int rand;
    
int prevnum 0;
    
int count 1;
    
    while (
count 30000)    //repeat through many times to make more random and to allow the CTA value to change multiple times
    
{
        
rand = (*(BYTE*)(0x0005F830));    //CTA
        
if (random == 0)        //prevent % by zero
            
random 1;
            
        
random += ((rand*count) + (count%random));    //just randomly doing stuff to the number
    
        
if (rand == prevnum)        //if the CTA value doesnt change then count up
            
count++;
        else
            
count 0;        //if the number does change then restart the counter
        
prevnum rand;            //keep track of the last number
    
}
    return 
random;        //returns the random seed
}

int randnum(int seedint randnums)
/* Returns a random number in the requested range from the random seed */
{
    return (
seed%randnums);    //returns the random number
}

Can I use this to get a "random" number between 1-52? If so, how?
Top

Topic | Forum


#3
Re: Casino game for VB
Posted on: 3/3 20:31
PVB Elite
Joined 2008/4/26
USA
930 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (10 Years) PVBCC 2010 EntryPVBCC 2013 Entry
First I need a random number generator that returns a number between 1-52 in C. I'm getting tons of 2-pairs. Googling turned up nothing.
Top

Topic | Forum


#4
Re: Casino game for VB
Posted on: 2/26 18:45
PVB Elite
Joined 2008/4/26
USA
930 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (10 Years) PVBCC 2010 EntryPVBCC 2013 Entry
How does this look?

Attach file:



png  casino-0037.png (8.88 KB)
768_5c757b28cb470.png 384X224 px
Top

Topic | Forum


#5
Re: Casino game for VB
Posted on: 2/26 16:57
PVB Elite
Joined 2008/4/26
USA
930 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (10 Years) PVBCC 2010 EntryPVBCC 2013 Entry
It's pretty much done. All I have left to do is change the title screen picture to something prettier.
Top

Topic | Forum


#6
Re: Casino game for VB
Posted on: 2018/11/3 4:37
PVB Elite
Joined 2008/4/26
USA
930 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (10 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I can get out of Video Poker. Maybe the reason you couldn't get out is because you were in the middle of a hand? I made it so you couldn't get out of Video Poker in the middle of a hand.
Top

Topic | Forum


#7
Re: Casino game for VB
Posted on: 2018/11/2 23:54
PVB Elite
Joined 2008/4/26
USA
930 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (10 Years) PVBCC 2010 EntryPVBCC 2013 Entry
Could someone test the game for me? I have a feeling it may be done for the most part. I do plan to make a new title screen image if this is the case. You can get the latest rom here: http://www.atari2600land.com/casino/
Top

Topic | Forum


#8
Re: Casino game for VB
Posted on: 2018/9/27 7:15
PVB Elite
Joined 2008/4/26
USA
930 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (10 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I made the cards in Video Poker much more "random."
Top

Topic | Forum


#9
Re: Casino game for VB
Posted on: 2018/9/26 16:56
PVB Elite
Joined 2008/4/26
USA
930 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (10 Years) PVBCC 2010 EntryPVBCC 2013 Entry
I got the spinning sound in, but it sounds different on a real Virtual Boy as opposed to Mednafen. I wonder why.
Top

Topic | Forum


#10
Re: Casino game for VB
Posted on: 2018/9/26 1:25
PVB Elite
Joined 2008/4/26
USA
930 Posts
CoderContributorTop10 PosterHOTY09 3rdLong Time User (10 Years) PVBCC 2010 EntryPVBCC 2013 Entry
Tried on a real Virtual Boy. I had to make the wheel spinning silent because it wasn't working right with the music. Otherwise, all visual stuff should be working fine. If you have the one in the 3pm hour, upload the one in the 4pm hour.
Top

Topic | Forum