Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Watara SuperVision emulator

                  
   
  1. #11

    Default Re: Watara SuperVision emulator

    Is that code correct? (other than the millis typo in the SDL_GetTicks function)

    When I try this, I get nothing but a blank screen.

    Using Uint32 to initialize the variables gives me an incompatible type warning.

    changing it to int32 gets rid of this warning, but still produces a black screen.

  2. #12
    DCEmu Coder GPF's Avatar
    Join Date
    Apr 2004
    Location
    Texas
    Age
    52
    Posts
    796
    Rep Power
    78

    Default Re: Watara SuperVision emulator

    [quote author=MetaFox link=board=Dev;num=1107769913;start=0#10 date=02/11/05 at 07:29:08]Is that code correct? *(other than the millis typo in the SDL_GetTicks function)

    When I try this, I get nothing but a blank screen.

    Using Uint32 to initialize the variables gives me an incompatible type warning.

    changing it to int32 gets rid of this warning, but still produces a black screen.[/quote]

    Since your using a version of KOS later than 1.2 you can use the following which is similiar to the above code

    Code:
    void SDL_StartTicks(void)
    {
    /* Set first ticks value */
    start = timer_ms_gettime64();//jiffies;
    }
    
    Uint32 SDL_GetTicks(void)
    {
    //return((jiffies-start)*1000/HZ);
    return timer_ms_gettime64()-start;
    }
    Thats what i use in my timer/dc/SDL_systimer.c

    Troy

  3. #13
    DCEmu Coder elefas's Avatar
    Join Date
    Sep 2004
    Location
    GREECE
    Age
    42
    Posts
    76
    Rep Power
    0

    Default Re: Watara SuperVision emulator

    Thanks for the advices. As I can see SDL is only used to create the surfaces and nothing more. No SDL_StartTicks(), nothing more on SDL. It runs quite good with the standard 160x160 resolution but slows down if an enhancement (2xSaI, SuperEagle, etc) is used. For now I try to make a menu for loading roms. As soon as I finish it I will post a binary for you guys to test it.

    I have not implemented sound at all. The windows port uses seal for sound. Is this portable to DC or I'll have to rewrite the sound stuff from scratch?


    - Yeah sure, welcome to the next level!

  4. #14
    Dream Coder
    Join Date
    Apr 2004
    Location
    Miami, FL
    Age
    37
    Posts
    4,675
    Rep Power
    50

    Default Re: Watara SuperVision emulator

    seal isnt portable, but its usually replacable with SDL fairl easy.
    If anyone is looking to buy, sell, trade games and support a developer directly at the same time, consider joining Goozex. Enjoy!

  5. #15
    DCEmu Coder
    Join Date
    Jul 2004
    Location
    Poughkeepsie, NY
    Posts
    60
    Rep Power
    0

    Default Re: Watara SuperVision emulator

    [quote author=MetaFox link=board=Dev;num=1107769913;start=0#10 date=02/11/05 at 07:29:08]Is that code correct? (other than the millis typo in the SDL_GetTicks function)

    When I try this, I get nothing but a blank screen.

    Using Uint32 to initialize the variables gives me an incompatible type warning.

    changing it to int32 gets rid of this warning, but still produces a black screen.[/quote]
    That's probably not exactly what the code is on my system. I was posting from my mac, and looking at the code on the Linux PC next to it so I didn't bother typing stuff that I had commented out and may have inadvertently introduced an error. The SDL_GetTicks function is definitely declared as Uint32, though.

    The only reason I didn't use timer_ms_gettime64() in mine the way Troy did is because SDL_GetTicks() is supposed to return a 32-bit integer, but iirc I essentially did the same thing that timer_ms_gettime64 does - multiply 'secs' by 1000, and add the 'milis' to that, so I have the number of miliseconds since SDL started.

    What I'll do is copy + paste the real code in a few minutes when I dig it up again on my other machine.

    *edit*
    Here's the copy+pasted code.
    Code:
    void SDL_StartTicks(void)
    {
    
    /* Set first ticks value */
    
    /*start = jiffies;*/
     /* 138's hack */
     Uint32 *milis, *secs;
     timer_ms_gettime(secs, milis);
     start = ((Uint32)secs*1000)+(Uint32)milis;
    }
    
    Uint32 SDL_GetTicks(void)
    {
    
    /*return((jiffies-start)*1000/HZ);*/\
      /* 138's hack */
     Uint32 *milis, *secs;
     timer_ms_gettime(secs, milis);
     return ((((Uint32)secs*1000)+(Uint32)milis)-start);
    }
    Sorry, didn't meant to hijack a topic to discuss SDL Timer hacks. :-[

  6. #16
    DCEmu Regular
    Join Date
    May 2004
    Age
    48
    Posts
    421
    Rep Power
    74

    Default Re: Watara SuperVision emulator

    hey, elefas. *so this is in black n white, eh? * I have a question, will the emu on dc be actually black and actually white, or black(?) n beige like now for game boy mono in gnuboy? *hey, i wish i could have this on dcgnuboy, but mybe it can happen on this: *have like a color scheme customizer so, you can select red for black and black for white and make it like a virtual boy, or green = black & black = white to pull of an oldskool mono ibm look. *just a thought, please take no offense and i thank you for yr work.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •