亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? porting.txt

?? DC的SEGA_GG模擬器源代碼
?? TXT
字號:
----------------------------------
- original porting.txt from the --
- smsplus dos source code       --
----------------------------------


 You can check out the DOS and PSX specific code to get an idea of
 how to port SMS Plus.

 0.) Machine dependant issues
 ----------------------------

 Everything should compile fine for big-endian platforms, however
 I'm not sure the 8-bit pixel to 16-bit pixel conversion function
 in 'render.c' is endian safe.

 You need to either define or not define 'LSB_FIRST' in your makefile,
 depending on your needs.

 1.) Graphics
 ------------

 The emulated display can be shown in either 8-bit or 16-bit color.
 The following structure is used by the rendering routines to
 draw the display, and you need to set it up prior to running the
 emulation.

    typedef struct
    {
        unsigned char *data;
        int width;
        int height;
        int pitch;
        int depth;
        struct
        {
            byte color[PALETTE_MAX][3];
            byte dirty[PALETTE_MAX];
            byte update;
        }pal;
    }t_bitmap;

 'data'     - Pointer to a linear chunk of memory. This should be at least
              256x192 pixels in size. You can modify this pointer between
              frames for double buffering (if it's pointed into memory mapped
              video RAM), or point it to system memory so further changes
              can be made. (like special effects, or for converting the
              graphics data to 24 or 32-bit format)
 'width'    - Width of the bitmap, in pixels.
 'height'   - Height of the bitmap, in pixels.
 'pitch'    - Width of the bitmap, in *bytes*.
 'depth'    - Color depth. Must be 8 or 16.
 'color'    - An array of 32 RGB values, each scaled up to eight bits.
 'dirty'    - Each entry is nonzero if the color has been modified.
 'update'   - Nonzero if one or more colors have been modified.

 If you are using 8-bit color, please note that each pixel drawn to
 the bitmap uses some extra unused bits during the rendering process.
 You can either mask out these bits using the PIXEL_MASK constant
 from 'system.h', or set palette ranges 20-3F, 40-5F to the same
 values as 00-1F.

 If you are using 16-bit color, you can ignore the members of the 'pal'
 structure. Remember to adjust the MAKE_PIXEL macro in 'render.h' to
 whatever format your display uses. By default it will make a 16-bit
 pixel in RGB 5:6:5 format.

 The macros BMP_X_OFFSET, BMP_Y_OFFSET, give the offset into the
 bitmap. This is because the SMS display takes up the entire bitmap,
 while the GG display is centered in the middle. These macros provide
 a convenient way to get the right offset.

 The PALETTE_MAX constant returns the size of the palette.
 This is currently set to 32 entries.

 2.) Sound
 ---------

 Sound emulation is handled through the following structure:

    typedef struct
    {
        int enabled;
        int bufsize;
        signed short *buffer[2];    /* Left and right channels */
    }t_snd;

 'enabled'  - Nonzero if the initialization went OK. You can now use
              the 'bufsize' and 'buffer' members.
 'bufsize'  - Size of the sound buffer, in *samples*.
 'buffer'   - Sound buffer. Uses 16-bit, signed, stereo samples.

 You must call 'system_init()' and pass the desired sample rate as an
 parameter to enable sound emulation. You can set the sample rate to
 zero if you do not want sound emulation. Remember that 'snd.enabled'
 will be set afterwards to indicate if any errors occured.

 You also must call 'system_shutdown()' when you are done running
 the virtual console emulation, so some memory used by the sound
 emulation code can be freed.

 3.) Input
 ---------

 Input is handled through the following structure:

    typedef struct
    {
        int pad[2];
        int system;
    }t_input;

 'pad[]'    - Corresponds to joystick one and joystick two.
 'system'   - System buttons, specifically pause, start, and reset.

 During each frame, you should clear members of this structure to zero,
 then update each one using the INPUT_* constants in 'system.h'.

 4.) Game Images
 ---------------

 Game images are handled through the following structure:

    typedef struct
    {
        byte *rom;
        byte pages;
        byte type;
    }t_cart;

 'rom'      - Pointer to the ROM image.
 'pages'    - ROM size divided by 16k.
 'type'     - Set to either TYPE_SMS or TYPE_GG.

 Games can be identified by their extension, which is usually '.sms'
 or '.gg'. Some games have an optional 512-byte header which you must
 remove. Remember to adjust the file size accordingly.

 5.) Battery backed RAM
 ----------------------

 Some game cartridges can have up to 32k of battery backed RAM present.
 There are two variables relating to this:

    typedef struct
    {
        byte sram[0x8000];
        byte save;
    }t_sms;

 'sram'     - This is the data that should be saved and loaded.
 'save'     - This is nonzero if the contents of sram[] should be saved.

 It's impossible to know if a game will use battery backed RAM, so the
 emulation code waits until a game tries to read or write it, and then
 sets the 'save' flag meaning the data needs to be saved.

 The basic way to deal with this is:

 1. Load a game file
 2. If a file with the same name, and the extension .sav exists,
    then load that data into 'sram' and set the 'save' flag.
 3. When exiting, check if the 'save' flag is nonzero, and if so,
    write the contents of sram[] to a file with the extension .sav
    and the same filename as the game file loaded.

 Note that when system_reset() is called, the function 'system_load_sram'
 which has a prototype in 'system.h' will be called. You *must* implement
 this function. All it has to do is see if any saved battery backed RAM
 is present, and update the save/sram[] members accordingly.

 6.) Miscellaneous
 -----------------

 Before running the virtual console emulation, you can set up
 these two variables:

 sms.use_fm         :   0= No YM2413 sound, 1= YM2413 sound
 sms.country        :   Set to TYPE_DOMESTIC (Japan), TYPE_OVERSEAS

 Some games will display different text depending on the country
 setting. The default value is TYPE_OVERSEAS. This is suitable for every
 country but Japan.

 Some games have different music if the YM2413 sound chip is present.
 If the 'fm_enable' value is set to one, then games can detect it.

 If you want to use FM sound, you must ensure that 'use_fm' is nonzero
 before loading a game, since this variable controls if games can detect
 the YM2413 chip as well as actual YM2413 output.

 Some games will only enable YM2413 sound if the country type is
 also set to TYPE_DOMESTIC. One such example is Wonderboy 3.

 Both of these variables are preserved when system_reset() is called.

 You can call load_state/save_state to save and restore the current state
 of the virtual console emulation. You need to pass a file handle as
 a parameter to these functions. Therefore, you are responsible for ensuring
 the file exists, and the file name. The naming convention is that all
 state files are named '.st0' up to '.st9'.

 To log sound, set snd.log=1, and assign the snd.callback() function to
 your own function that writes a byte of data to a disk file (or memory
 buffer, etc.) The naming convention for sound files is that they end
 with the extension '.ssl'.


 7.) Function reference
 ----------------------

    void system_init(int sound_rate);

 You must set up the 'bitmap' and 'cart' structures prior to calling this
 function. If you want sound emulation, pass the desired sample rate
 (8000..44100). Afterwards, check the members of the 'snd' structure to see
 if you can use sound emulation. You can now call sms_frame() and the like.

    void system_shutdown(void);

 Call this when you're done with the emulation. Not terribly important
 as it only frees some memory allocated by the sound emulation routines...

    void system_reset(void)

 Reset the virtual console emulation. This is called internally when
 the INPUT_HARD_RESET flag for 'input.system' is set.

    void system_load_sram(void);

 Refresh the 'sms.sram[]' and 'sms.save' variables.
 You must impelement this function yourself.

    void sms_frame(int skip);

 You need to call this function 60 times a second. Pass zero as the
 parameter to draw the current frame, otherwise pass one to omit
 the drawing process. (ideal for frame skipping) Afterwards,
 the 'bitmap' and 'snd' structures will be updated with the current
 graphics and sound data. You should set up the 'input' structure
 before calling this function.

 8.) Example
 -----------

 Here's a brief overview of how to use all this:

 - do machine dependant initialization (audio, video, init input, etc.)
 - set up bitmap structure
 - set up cart structure (load game)
 - call system_init()
 - if snd.enabled is set, we can use sound
 - load sram data if it exists for the game
 in a loop:
   - update input structure based on gamepad/keyboard
   - call sms_frame()
   - play sound using 'snd.buffer'
   - copy 'bitmap.data' to the video display
   - quit if needed
 - save sram data if the game used it
 - call system_shutdown()

 9.) Other notes on porting
 --------------------------

 - Please read the license first. 

 - You must release the source code to your port in accordance with the GPL.

   If you have made *no* changes to the main source code, meaning everything
   in the root directory, and the /cpu, /dos and /psx directories, then you
   do not have to include those files. No point in wasting space.

   Otherwise, you must include those files with the changes clearly stated.
   If the changes are the kind that could benefit other ports (like a bug
   fix), then just let me know so I can update the main distribution, and
   don't bother releasing those files. But let me know before you release
   your port, however.

   If you are using some commercial libraries to take care of items like
   audio output, or if you have developed some routines which you do not want
   made public (i.e. an assembly optimized blitter, or some custom joypad
   polling functions), then you do not have to include those files.

   I prefer it where anybody can download a port of SMS Plus and compile it
   themselves, but I realize this isn't always possible.

   It would be nice, and is not required, that you could organize the
   source in the same way I have it set up. For instance, maintaining the
   same directory structure, but adding an '/myport' directory with your
   specific files, and an appropriate makefile.

 - You must clearly state in the executable that you are the porter,
   and that I wrote the program. E-mail addresses are required, Web
   site URL's are optional but preferred. This is so users will not ask
   me questions on how to use a specific port, which I know nothing about.

 - You need to provide documentation. Please remember to mention
   the licensing stuff pertaining to SMS Plus and the MAME code that's
   mentioned (for example) in the original 'readme' I wrote. Or just
   include my documentation and make some additions.

   Please link to my website in the documentation, so people will know
   where to get the original source code.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91在线播放网址| 美腿丝袜在线亚洲一区 | 日韩一区二区视频在线观看| 性感美女久久精品| 欧美专区在线观看一区| 亚洲国产aⅴ天堂久久| 欧美系列一区二区| 九色综合狠狠综合久久| 精品久久久久久久久久久久包黑料 | 成人免费的视频| 亚洲婷婷在线视频| 欧洲生活片亚洲生活在线观看| 亚洲青青青在线视频| 欧美在线观看18| 国产一区二区三区电影在线观看 | 色狠狠一区二区| 天天做天天摸天天爽国产一区| 91精品蜜臀在线一区尤物| 久久99国产精品久久99| 国产精品国产精品国产专区不蜜| 日本丶国产丶欧美色综合| 日韩国产高清在线| 亚洲视频在线观看一区| 欧美一区二区三区小说| 丁香桃色午夜亚洲一区二区三区| 亚洲蜜臀av乱码久久精品 | 国产女人aaa级久久久级| 欧美日精品一区视频| 狠狠色丁香婷综合久久| 一区二区三区在线免费播放 | 丁香六月综合激情| 婷婷国产v国产偷v亚洲高清| 中文字幕精品一区二区三区精品| 欧美猛男gaygay网站| 99久久精品免费| 国产精品456| 国产成a人亚洲精| 国产一区二区三区视频在线播放| 亚洲va天堂va国产va久| 亚洲精品你懂的| 国产精品久久久久久久久动漫 | 中文无字幕一区二区三区 | 精品人在线二区三区| 欧美亚洲综合在线| 欧美午夜影院一区| 欧美午夜精品久久久久久孕妇 | 91国产福利在线| 欧美在线观看一区二区| 欧美怡红院视频| 777xxx欧美| 久久精品夜色噜噜亚洲a∨| 精品成人一区二区三区四区| 日韩欧美一级二级三级久久久| 欧美久久久久免费| 日韩免费一区二区三区在线播放| 欧美一区二区在线视频| 91麻豆精品国产自产在线观看一区| 91福利在线免费观看| 欧美日韩精品福利| 精品1区2区在线观看| 午夜免费久久看| 国产黄色精品视频| 91久久一区二区| 欧美电影在哪看比较好| 美女一区二区久久| 不卡视频免费播放| 欧美三级电影网| 国产日韩欧美不卡| 亚洲国产你懂的| 国产成人精品www牛牛影视| 一本色道久久综合狠狠躁的推荐| 欧美精品在线观看播放| 国产视频一区在线观看| 亚洲国产日韩a在线播放性色| 青娱乐精品视频| 91日韩精品一区| 精品国产一区二区三区久久影院 | 有坂深雪av一区二区精品| 日韩不卡手机在线v区| 91极品美女在线| 亚洲国产精品高清| 久久精品噜噜噜成人88aⅴ| 色婷婷av久久久久久久| 国产精品国产三级国产普通话99| 麻豆国产精品一区二区三区| 91久久精品国产91性色tv| 亚洲精品在线免费播放| 日韩精品亚洲专区| 欧美色图激情小说| 一区二区三区不卡视频在线观看| 国产精品中文字幕一区二区三区| 在线不卡一区二区| 免费精品99久久国产综合精品| 一本色道综合亚洲| 亚洲人成人一区二区在线观看| 国产成人激情av| 国产精品卡一卡二| 91麻豆视频网站| 一区二区三区欧美激情| 日本道免费精品一区二区三区| 国产精品人人做人人爽人人添| 国产成人免费xxxxxxxx| 欧美激情综合网| 色噜噜狠狠色综合欧洲selulu| 国产精品素人视频| 色综合久久综合网97色综合 | 国产剧情一区在线| 国产精品久久久久久户外露出| 成人app在线观看| ㊣最新国产の精品bt伙计久久| 99久久精品免费看国产| 亚洲成人在线免费| 欧美mv日韩mv国产| 国产成人精品一区二区三区网站观看| 久久综合久久99| 欧美在线观看视频在线| 精东粉嫩av免费一区二区三区| 欧美成人乱码一区二区三区| 白白色 亚洲乱淫| 日韩专区中文字幕一区二区| 国产精品色呦呦| 日韩视频免费观看高清在线视频| 99久久免费精品高清特色大片| 日韩电影免费在线看| 国产精品久久久久久久久免费樱桃| 欧美日韩dvd在线观看| 91社区在线播放| 成人av网在线| 国产不卡在线视频| 激情图片小说一区| 日本中文字幕不卡| 亚洲一区二区高清| 亚洲免费观看高清完整版在线观看熊 | 91精品免费观看| 色老汉一区二区三区| 国产激情精品久久久第一区二区| 午夜精品久久久久久久| 亚洲高清在线精品| 亚洲影院免费观看| 亚洲精品高清在线| 亚洲国产精品久久久久婷婷884| 国产精品人人做人人爽人人添| 精品国产3级a| www国产精品av| 久久婷婷国产综合国色天香| 日韩一区和二区| 精品国产乱码久久久久久免费| 日韩欧美中文字幕制服| 久久欧美一区二区| 26uuu亚洲综合色欧美| 欧美一区二区啪啪| 欧美一区二区三区四区视频| 日韩小视频在线观看专区| 欧美不卡一区二区三区| 久久精品免费在线观看| 中文字幕亚洲欧美在线不卡| 一区二区三区加勒比av| 日韩国产精品久久久| 国产剧情一区在线| 日本高清无吗v一区| 欧美喷水一区二区| 中文字幕第一页久久| 日韩中文字幕亚洲一区二区va在线 | 久久久久国产精品麻豆ai换脸 | 国产精品丝袜在线| 中文字幕字幕中文在线中不卡视频| 亚洲婷婷综合色高清在线| 午夜伦理一区二区| 国产精品18久久久久久久久久久久| 91麻豆精品91久久久久久清纯| 国产亚洲精品免费| 亚洲制服丝袜av| 成人小视频在线| 精品久久久久久久久久久久久久久久久 | 国产美女精品一区二区三区| 91在线观看一区二区| 欧美电影免费观看高清完整版在| 亚洲欧洲国产日韩| 国产美女精品在线| 91精品国产综合久久久久| 久久精品一二三| 免费观看91视频大全| 91在线观看免费视频| 久久久久九九视频| 午夜视频在线观看一区二区三区| 国产福利精品一区| 精品久久久久久久久久久久久久久久久| 亚洲国产精品人人做人人爽| 91女人视频在线观看| 中文字幕av在线一区二区三区| 免费av成人在线| 777亚洲妇女| 亚洲成在线观看| 欧美日韩亚洲综合在线| 亚洲精品视频在线看| 91福利在线免费观看| 亚洲精品一二三四区| 欧美在线制服丝袜| 亚洲国产日韩精品| 2021中文字幕一区亚洲|