返回首页 游戏下载 - 电脑游戏 网络游戏 工具补丁 在线游戏 游戏媒体 精典专区

游戏首页 游戏资讯 - 游戏新闻 游戏文学 游戏攻略 游戏秘技 游戏知识 模拟资讯 游戏专题 金手指区
您的位置:首页-> 游戏频道-> 游戏资讯-> 游戏知识-> DC专栏-> DC的新灵魂—KallistiOS

DC专栏

业界知识
硬软知识
XBOX专栏
NGC专栏
PS2专栏
DC专栏
GBA专栏

本类阅读TOP10

·SFC全部遊戲目祿
·MD模擬器遊戲目祿(2CD版)
·DC全部游戲目録(中文)
·FC全部遊戲目祿
·DC《拳皇2000》完美版制作方法
·BLEEMCAST 下载地址
·DC游戏用引导光盘Dreamcast BootCD 制作手册
·dc翻版质量和伤光头测试报告
·DC用超任模擬器刻録教程
·小心你的DC关机方法

精品推荐
DC的新灵魂—KallistiOS


[ 作者:不详 来源:[我梦传播]=绒毛= 加入时间:2002-3-1 :480 ]

 

  KallistiOS是一班编程爱好者写出来的一个应用在DC上的操作系统(就像我们现在在电脑上使用的Windows和Linux系统一样),KallistiOS主要是负责提供一个友好的函数界面给其他的编程人员使用,是的开发效率更高,(DC上经常使用的Kanata和微软一开始提供给SEGA使用的WinCE等这些系统一样是为了这个才开发的)KallistiOS其实是一个基于BSD版本的Unix的操作系统,所以它使用的语言是Unix上使用最广的C语言,也就是说,只要你熟悉C语言的编程,你就可以为你现在的DC开发游戏,甚至是应用软件,但是好像这个功能大家都不会太在意吧,始终,应用类的软件还是在电脑上使用更加方便和快速。
当然,既然说KallistiOS是DC的新灵魂,当然和多的函数都是就DC的硬件来写的啦,所以你会看到很多在电脑上很少见到的特殊函数(例如关于摇杆按钮信号输入的函数)。总之,有了这个KallistiOS系统之后,喜爱DC这个平台的编程人员就可以更加快速的开发出自己的小游戏了,当然要做出一个像莎木这样的大型游戏,单凭一个两个的认识没有可能开发出来的,有了这个系统,我们的希望就是,可以让我们的DC有更多跟有用的功能出现,到时候,我们的梦幻平台就不再是梦幻的事情了,大家都可以写一些自己的小游戏等等。
  我现在没有认真看过到底KallistiOS可以做出些什么样的功能,我最希望的是它可以做出网络功能,因为如果网络功能完备子后,一定会有很多网络小游戏的,小的游戏并不代表没有吸引力,你看以前的吃豆豆就知道啦!所以有一个网络吃豆豆也不一定没有人玩啊!!
  下面我也不多介绍这个系统了,我一定要好好的研究这个系统,等我也来写一点什么的,呵呵!!其实我很想写一个RM电影的播放器,因为我喜欢看电影,如果看VCD的话又没有那么多的铁去买VCD所以看RM还是我现在最常用的看电影方法。下面的是一个很简单的用在KallistiOS上的程序,如果你有兴趣的话,可以看看。限制到更多的关于这个系统的编程信息,你可以到这个看看。http://www.gungans.de/h11/en/index.html
  如果你需要这个系统的源代码,你也可以到上面的网站看看,他们那里有下载的连接。
  也可以到KallistiOS的官方网站看看,获得更多的信息。http://dcdev.allusion.net/

==========================程序的源代码===================================
/* firstexample.c
* example sourcecode for compiler-testing and first-step tutorial
*/

#include

void display_screen(char *str)
{
     int xpos, ypos, offset;
     char current;

     xpos = 2;
     ypos = 1;

     while(*str)
     {
          // Calculation of Screenoffset from Position
          offset = (xpos*12) + ((ypos* (24+4)) * 640);
          
          // Grab the next Element from the String and increase pointer
          current=*str++;

          // If we have a normal character then print it to screen
          if(current != '\n')
          {
               bfont_draw(vram_s + offset,640, 0, current);
               xpos++;
          }
          // If we have a '\n' then start at a new line
          else
          {
               xpos = 2;
               ypos ++;
          }
     }
}

int main(int argc, char **argv)
{
     cont_cond_t cond;
     char cOutput[] = "Hello World...\n\n"
                " Sorry, couldn't resist. The line above haunts\n"
                "me since the beginning of my programming efforts\n"
                "on the good old Commodore 64.\n\n"
                "But if you are able to see this text you success-\n"
                "fully compiled GCC, BinUtils, Newlib, KOS and this\n"
                "tiny example\n\n"
                "This really serves no purpose except showing that\n"
                "everything worked so far ;)\n\n"
                "Happy coding......";

     // First we initialize KallistiOS with no ROMDISK
     kos_init_all(NONE_ENABLE, ROMDISK_NONE);
     
     // Now we set the 640x480 Videomode on the DC
     vid_set_mode(DM_640x480, PM_RGB565);

     // Now we use the self-written primitive screen displayer
     display_screen(cOutput);

     // Wait for user pressing start
     while(1)
     {
          if (cont_get_cond(maple_first_controller(), &cond) < 0)
               break;
          if (!(cond.buttons & CONT_START))
               break;

          // We have to do *something* in this loop otherwise the compiler
          // will make some crazy things (just terminating because it
          // can't read the condition of the Controlle:w
          timer_spin_sleep(10);
     }

     // Shut down KallistiOS
     kos_shutdown_all();
     return 0;
}
=============================结束=================================