Page 5 of 7 FirstFirst ... 34567 LastLast
Results 41 to 50 of 63
  1. #41
    EmuTalk Member hap's Avatar
    Join Date
    Jan 2005
    Posts
    188
    Mentioned
    0 Post(s)
    Emulating a Z80 sucks, it's just too.. bloated.



    Why I'm really replying, good Z80 documentation:
    - the official one, find it on the smspower link albertwesker posted
    - "The Undocumented Z80 Documented", the one on smspower is outdated, get it from http://www.myquest.nl/z80undocumented/
    - ZEXALL is a very good Z80 emulation test, it's included with YAZE: http://www.mathematik.uni-ulm.de/users/ag/yaze-ag/

  2. #42
    EmuTalk Member
    Join Date
    Jul 2007
    Posts
    4
    Mentioned
    0 Post(s)
    some progress on my sms emulator which I started 2 weeks ago, most of the time was spent on the Z80 (still buggy and incomplete), as of now it's still far away from completion, interrupt handling is broken, scrolling is not implemented, sprite layer is missing, and the bg tiles are flipped.

    screen shots from the nametable area of the VRAM

  3. #43
    EmuTalk Member hap's Avatar
    Join Date
    Jan 2005
    Posts
    188
    Mentioned
    0 Post(s)
    nice results pretty quickly

  4. #44
    EmuTalk Member -indecisive-'s Avatar
    Join Date
    Jun 2004
    Posts
    69
    Mentioned
    0 Post(s)
    Looks great. When I'm not hammered from school I'll give this a try for sure.

  5. #45
    EmuTalk Member JKKDARK's Avatar
    Join Date
    Mar 2006
    Posts
    1,012
    Mentioned
    0 Post(s)
    Quote Originally Posted by krypt100 View Post
    some progress on my sms emulator which I started 2 weeks ago, most of the time was spent on the Z80 (still buggy and incomplete), as of now it's still far away from completion, interrupt handling is broken, scrolling is not implemented, sprite layer is missing, and the bg tiles are flipped.

    screen shots from the nametable area of the VRAM
    Did you do some progress since August?

  6. #46
    EmuTalk Member
    Join Date
    May 2008
    Posts
    42
    Mentioned
    0 Post(s)
    Im having a look at starting a sega master system emulator now I've finished my gamboy emulator. I've had a quick look through the documentation and it looks easier than the gameboy which I didnt think would be the case. The only issue im having so far is I havent found anything related to the reset state of the SMS, like what do the registers get set to on startup and what is the stack pointer initialized to along with the program counter?

    Anyone know of any documentation which explains this?

    I cant see this project taking that long, maybe two months including sound emulation.

    Thanks

    Edit:

    Im guessing that as I cannot find any documentation on this, perhaps the system sets the registers etc to a known state itself on powerup, so I dont need to set them the game will automatically do it... just a thought.
    Last edited by CodeSlinger; August 10th, 2008 at 12:45.

  7. #47
    EmuTalk Member
    Join Date
    Aug 2008
    Posts
    6
    Mentioned
    0 Post(s)
    CodeSlinger - you can always get a BIOS, emulate it correctly, and check the system state after the BIOS turns itself off. As for running the BIOS - you just need to set PC to 0, I believe.

    EDIT : also, interrupts are disabled before running the BIOS, of course. Also, both SP and AF are apparently 0xffff before running the BIOS (other registers are undefined) but I dunno if there are any BIOSes that make use of that - there are only a few, after all. (this is from the "undocumented Z80 documented" document and, again, applies to the machine's state before the BIOS, not before the games)
    Last edited by nameuser; August 13th, 2008 at 02:54.

  8. #48
    EmuTalk Member
    Join Date
    May 2008
    Posts
    42
    Mentioned
    0 Post(s)
    Thats a good idea actually, thanks!

    So far I've programmed about 50% of the Z80 cpu so hopefully by the weekend I can start getting some results.

  9. #49
    EmuTalk Member
    Join Date
    Sep 2007
    Posts
    68
    Mentioned
    0 Post(s)
    Hi,

    @ CodeSlinger:
    If your still wondering why Shadow Dancer doesn't run on your SMS emu, SP should be 0xDFF0 (disasm the bios).

    stay safe,

    AamirM

  10. #50
    EmuTalk Member
    Join Date
    May 2008
    Posts
    42
    Mentioned
    0 Post(s)
    Thanks mate

    I now have one game showing the first screen which isnt bad considering ive only been working on it this weekend.

    One question I do have though is the vcounter on the VDP has 192 active scanlines (default) and a total of 261 scanlines (default). When it goes over 261 it wraps back to 0. This means that an 8 bit variable cannot hold the full vcounter range because it can only hold a range of 0-255 and I need to store a range of 0-261. Now it seems quite obvious to me that I shouldnt be using an 8 bit variable to store vcounter and should be using a 16 bit which means I easily have enough room to store the vcounter range. All this seems fine to me.

    However when the ROM reads from port $7F (mirrored in $7E) it stores the value of the vcounter in one of the 8 bit registers. So how can an 8 bit register store the correct value of vcounter because the vcounter cannot always be represented in an 8 bit number? The opcode responsible for retrieving the vcounter is "IN A, (n)" which doesnt set any flags otherwise I thought thats how it could do it.

    Thanks for any help

Page 5 of 7 FirstFirst ... 34567 LastLast

Similar Threads

  1. Chanka Compatability List
    By Stezo2k in forum Chankast
    Replies: 923
    Last Post: March 4th, 2009, 21:17
  2. Sega Console Influence in Todays world!
    By SegaBOI in forum Chankast
    Replies: 9
    Last Post: October 15th, 2004, 21:21
  3. Sega Master System screenshots on nsx2 !
    By ShadowPrince in forum nSX2
    Replies: 11
    Last Post: February 10th, 2003, 00:08
  4. Interesting debate on existance of god, worth a read
    By sk8bloke22 in forum Talk of the Town
    Replies: 352
    Last Post: January 14th, 2002, 00:20

Posting Permissions

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