3_1_kernel_overview.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <html>
  2. <head>
  3. <link rel="stylesheet" href="style.css"/>
  4. </head>
  5. <body>
  6. <h2>Kernel Overview</h2>
  7. <h3>History</h3>
  8. <p>
  9. The kernel is a throwback to the very first Final Fantasy game for
  10. the Nintendo's original 8 bit system. The NES could only natively
  11. read 32 kilobytes of program ROM. To get around this incredible
  12. limitation, Nintendo developed "memory mappers" that allowed parts
  13. of the program to be switched out, or "banked" and replaced with
  14. other parts stored on the game cartridge.
  15. </p>
  16. <p>
  17. FF1 used Nintendo's "Memory Manager Controller #1" (MMC1) . This
  18. controller split the game into sixteen sections, each 16 kilobytes
  19. long. (The maximum an MMC1 program could be was 256K). This
  20. controller also split the accessible memory from the cartridge into
  21. two 16K sections. The top 16K was bankable. The bottom 16K could
  22. never be switched out and stayed in memory until you removed the
  23. cartridge.
  24. </p>
  25. <p>
  26. The original FF1 kernel was located in this bottom 16K of memory.
  27. </p>
  28. <p>
  29. First and foremost the kernel contained the main program loop. It
  30. handled all the low level functions for the game. Some of these
  31. included controlling interrupts, banking in and out the appropriate
  32. part of the game, jumping control to a particular module, playing
  33. the music, and other tasks.
  34. </p>
  35. <p>
  36. As the Final Fantasy franchise grew, so did the size of the games.
  37. They all still retained the kernel/module system. During the
  38. backporting process, this did cause a few headaches. For example,
  39. Final Fantasy 6 was originally developed for the Super Nintendo.
  40. When it's menu module was banked in, it was done with electronic
  41. bank switching. The later PSX port banked the data from the CD-ROM,
  42. which caused an unexpected lag that one wasn't used to. On the PC
  43. version for FF7, them menu system was simply integrated into the
  44. main executable.
  45. </p>
  46. <h3>Kernel Functionality</h3>
  47. <p>
  48. The Kernel is a threaded multitasking program that manages the
  49. whole system. It uses a simple software based memory manager that
  50. handles both RAM and video memory for all the modules in the game.
  51. Assisting the kernel are many statically linked Psy-Q libraries. In
  52. the case of the PC port, the Psy-Q libs were replaced with a PC
  53. equivalent. For example the SEQ player was replaced with a MIDI
  54. player, Both accomplish the same tasks, just with different formats
  55. and execution strategies. The table below is a generic
  56. representation of how the kernel sits in relation to the other
  57. aspects of the program.
  58. </p>
  59. <p>
  60. <table id='kernel-functionality'>
  61. <tr><td>User</td></tr>
  62. <tr><td>Module</td></tr>
  63. <tr>
  64. <td>
  65. Kernel
  66. <span id='kernel-psyq'>Psy-Q libraries</span>
  67. </td>
  68. </tr>
  69. <tr><td>PSX BIOS</td></tr>
  70. <tr><td>Hardware</td></tr>
  71. </table>
  72. </p>
  73. </body>
  74. </html>