5 Steps to Convert PAL Video to NTSC Format

PAL to NTSC Conversion (Please note that using the title directly in the image search query may not yield the most relevant image. Consider refining the image search term within Bing for better results. For example, you could search for “PAL NTSC conversion” or “video format conversion” for more specific images.) PAL to NTSC Conversion

Migrating your cherished PAL-encoded project to the NTSC standard might seem like navigating a labyrinth of technical intricacies, potentially leading to compatibility nightmares. However, with a systematic approach and a firm grasp of the underlying principles, this conversion process can be remarkably smooth. This article demystifies the key differences between PAL and NTSC, outlining practical strategies to effectively port your code and ensure your project shines on both sides of the pond. Furthermore, we’ll delve into common pitfalls and offer solutions to overcome them, ultimately equipping you with the knowledge to confidently tackle this seemingly daunting task. Whether you’re a seasoned developer or just starting out, understanding these nuances will empower you to create truly versatile and globally accessible applications.

Firstly, it’s crucial to understand the core distinctions between PAL and NTSC. PAL (Phase Alternating Line) and NTSC (National Television System Committee) are two distinct analog television broadcasting systems that differ primarily in their frame rate and resolution. PAL typically operates at 25 frames per second (fps) with a resolution of 720x576 pixels, while NTSC runs at approximately 29.97 fps and a resolution of 720x480 pixels. Consequently, porting code requires meticulous attention to timing and display adjustments. Specifically, game logic tied to frame rate needs careful recalibration to prevent inconsistencies in gameplay speed and physics. Moreover, graphical assets may require resizing or reformatting to accommodate the differing resolutions. Additionally, color encoding variations between the two systems must be considered, ensuring accurate color representation after the conversion. By addressing these fundamental disparities, you lay the foundation for a successful and seamless porting process.

Beyond the technical aspects, practical considerations play a vital role in successful code porting. For instance, testing is paramount. Rigorous testing across a variety of NTSC-compatible hardware is essential to identify and resolve any lingering compatibility issues. Furthermore, consider leveraging available libraries and tools designed to streamline the conversion process. Several software packages offer automated solutions for handling frame rate conversions and resolution adjustments, significantly reducing manual effort. In addition, meticulously documenting your code modifications throughout the process is highly recommended. This not only facilitates future updates and maintenance but also allows for easier troubleshooting and collaboration. Finally, staying informed about the latest best practices and community resources dedicated to PAL to NTSC conversion can provide invaluable insights and support throughout your journey. Through a combination of technical proficiency, meticulous testing, and the strategic use of available tools, you can ensure your project thrives in the NTSC environment and reaches a wider audience.

Identifying PAL-Specific Code in Your Project

Porting a game or application from PAL (Phase Alternating Line) to NTSC (National Television System Committee) can seem daunting, but breaking it down into smaller steps makes the process manageable. A crucial first step is identifying the parts of your project that are specifically tied to the PAL standard. Once you pinpoint these sections, you can then focus your efforts on adapting them for NTSC compatibility.

Timing and Frame Rate Differences

One of the core differences between PAL and NTSC lies in their frame rates and refresh rates. PAL runs at 25 frames per second (fps) with a 50Hz refresh rate, while NTSC operates at approximately 29.97 fps with a 60Hz refresh rate. This difference significantly impacts how time-based operations are handled in your code. Look for sections of your project where timing is critical, such as game logic, animation speeds, and physics calculations.

Here’s where you’ll need to roll up your sleeves and delve into the code. Start by searching for any hardcoded frame rate values, like “25” or “50”. These are immediate red flags. They might be used directly in calculations or assigned to variables that control game speed. For example, if you see something like gameSpeed = 25 \* deltaTime, you’ve likely found a PAL-dependent piece of code.

Next, look for any uses of timers or time-based functions that explicitly rely on the PAL frame rate. These might be custom functions you’ve written or library calls specific to your game engine. If timers are set to trigger events based on a certain number of PAL frames, they will need adjusting for NTSC’s different frame rate. For instance, waiting for 50 frames in PAL should translate to roughly 60 frames in NTSC to achieve the same real-time duration.

Pay close attention to sections of code related to animation. If animations are tied directly to the frame rate, they will play faster on NTSC. You’ll likely see calculations that advance animation frames based on the frame count. These will need to be adjusted to maintain consistent animation speed across both systems. Similarly, physics engines often operate on fixed time steps, so check any physics-related code for dependencies on the PAL frame rate.

Don’t forget about audio! While less common, some audio routines might be synchronized with the video frame rate. If any audio cues or music playback is tied to the PAL timing, you’ll need to address those as well.

It’s helpful to keep a list of all the identified PAL-dependent code sections as you find them. This will streamline the porting process later. You could use a simple spreadsheet or even just a text document to organize your findings. A table like the one below can help you categorize and track your progress:

File Name Line Number(s) Description of PAL Dependency Proposed NTSC Solution
gameLogic.cpp 123-128 Game speed calculation based on 25 fps Replace with frame-rate independent calculation
animationController.h 45 Animation frame advance based on 50Hz Adjust frame advance based on NTSC refresh rate

Resolution and Display Format

While less critical than frame rate, differences in resolution and display format between PAL and NTSC can sometimes cause issues. PAL traditionally used a resolution of 720x576, while NTSC used 720x480. Be on the lookout for hardcoded resolution values that might affect the rendering or layout of your game. These could lead to clipping or incorrect aspect ratios on NTSC displays.

Color Encoding

PAL and NTSC also use different color encoding systems. While this rarely presents a significant hurdle in modern game development, it’s worth checking if your project utilizes any specific color palettes or rendering techniques heavily reliant on the respective color systems. This is more likely to be an issue with older games or applications.

Adjusting Resolution and Aspect Ratio for NTSC

One of the trickiest parts of porting PAL games to NTSC is handling the different display resolutions and aspect ratios. PAL systems typically use a resolution of 720x576 and a 4:3 aspect ratio, while NTSC uses 720x480 and also aims for a 4:3 aspect ratio. This difference in vertical resolution presents a few challenges you’ll need to tackle.

Dealing with the Vertical Resolution Difference

The immediate issue you’ll encounter is the “black bar” problem. If you simply display a PAL image on an NTSC screen, you’ll have 96 lines of unused vertical space, resulting in black bars at the top and bottom. Conversely, if you try to display an NTSC image on a PAL screen, the bottom part of the image will be cut off. There are several ways to approach this.

Letterboxing/Pillarboxing

The simplest, though not always ideal, solution is letterboxing or pillarboxing. Letterboxing adds black bars to the top and bottom of the image, preserving the original aspect ratio. Pillarboxing adds black bars to the sides. While easy to implement, this doesn’t utilize the full screen real estate and can feel visually unappealing.

Adjusting the In-Game Assets

For the best results, consider redrawing or resizing your game’s assets to fit the NTSC resolution. This may be time-consuming, but it ensures your game looks its best on the target platform. You can also create separate asset sets specifically for each region, which provides maximum visual fidelity but adds to the overall project size.

Stretching and Cropping

Stretching the image vertically to fill the screen can distort the aspect ratio, making everything appear elongated. Cropping the image, on the other hand, removes portions of the game’s visuals, potentially hiding crucial information. While sometimes unavoidable, these methods should generally be considered last resorts.

Dynamic Resolution Scaling

A more sophisticated approach is to dynamically scale the resolution based on the target platform. This involves programming your game to detect the display resolution and adjust the rendering accordingly. This could involve scaling the vertical resolution, adjusting the field of view, or even repositioning UI elements. This method offers more flexibility and can lead to a more polished final product, though it requires more development effort. It is, however, often the best solution for preserving the intended game experience. Consider using a framework or engine that supports dynamic resolution scaling to simplify implementation.

Aspect Ratio Considerations

Maintaining the correct 4:3 aspect ratio is crucial. While both PAL and NTSC aim for 4:3, the difference in vertical resolution means you’ll have to account for the vertical change to prevent distortion. If you are stretching or scaling, make sure to do so proportionally. Improper handling can lead to “squashed” or “stretched” visuals. This is especially noticeable with character sprites and UI elements.

Testing Across Different Displays

Throughout the porting process, test your game on actual NTSC hardware or emulators. This allows you to identify any visual discrepancies or unexpected behaviors early on. Pay attention to how the game appears on various screen sizes and aspect ratios. This is critical for ensuring a consistent and enjoyable player experience across all supported displays.

Resolution Handling Method Pros Cons
Letterboxing/Pillarboxing Easy to implement, preserves aspect ratio Doesn’t use full screen, can look unappealing
Adjusting In-Game Assets Best visual quality Time-consuming, increases project size
Stretching/Cropping Quick fix Distorts aspect ratio, loses visual information
Dynamic Resolution Scaling Flexible, preserves game experience More complex to implement

Handling Frame Rate and Timing Differences

One of the trickiest aspects of porting PAL code to NTSC is dealing with the difference in frame rates. PAL runs at 25 frames per second (fps), while NTSC runs at approximately 30 fps (or 29.97 to be precise). This seemingly small difference can have a significant impact on game logic, animation, and physics if not handled correctly. Games designed specifically for PAL systems often tie their internal logic directly to the frame rate, assuming a constant 25 fps. When these games are run on an NTSC system, they will run approximately 20% faster due to the higher frame rate.

Adjusting Timing and Logic

There are several approaches to address the frame rate disparity. The simplest, but often least effective, method is to simply let the game run faster on NTSC. While this might be acceptable for some games, it often leads to gameplay issues. Animations might appear sped up, physics calculations could be off, and the overall game experience could feel rushed and unbalanced.

Decoupling Game Logic from Frame Rate

A more robust solution is to decouple the game logic from the frame rate. This involves using a timer or a delta time approach to measure the time elapsed between frames. Instead of assuming a fixed time step between frames, the game logic should update based on the actual elapsed time. This allows the game to run correctly regardless of the frame rate. For example, instead of moving a character 10 pixels per frame, you would move the character at a speed of 250 pixels per second (10 pixels * 25 frames). This ensures consistent movement across both PAL and NTSC systems.

Implementing a Fixed Timestep

Handling Frame Rate Discrepancies Effectively

A popular strategy for managing the difference in frame rates between PAL and NTSC systems involves implementing a fixed timestep. This technique creates a consistent internal update frequency for the game’s logic and physics, independent of the actual frame rate. The core concept is to divide the game’s update cycle into smaller, fixed time steps. Let’s say we choose a fixed timestep of 1/60th of a second (60 updates per second). The game’s logic and physics will be updated according to this fixed timestep. On an NTSC system running at approximately 30fps, the game logic will be updated twice per frame. On a PAL system running at 25fps, the update logic will be executed a little more than twice per frame on average, though still anchored around that 1/60th second timestep.

This approach offers several benefits. Firstly, it simplifies the porting process, as the core game logic doesn’t need to be rewritten to accommodate different frame rates. The same code can be used for both PAL and NTSC versions, leading to fewer bugs and inconsistencies. Secondly, it ensures predictable game behavior. The game’s physics and logic will update at a constant rate, preventing variations in gameplay between different systems. Lastly, using a fixed timestep can simplify the integration of physics engines, many of which are designed to work with fixed time steps for stable simulations.

However, using a fixed timestep can also introduce some complexities. One challenge is handling input lag. Since the game’s logic updates at a fixed rate, input might not be processed immediately. This can lead to a slight delay between player input and the game’s response, which might be noticeable in fast-paced games. Strategies to mitigate input lag include input prediction, where the game anticipates player actions based on previous input, or using a smaller timestep to reduce the delay.

Here’s a simplified example demonstrating how to implement a fixed timestep in your code:

Variable Description
fixedTimestep The desired fixed timestep (e.g., 1/60th of a second).
accumulator Accumulates the elapsed time since the last update.

Using Emulators for Testing

Emulators can be incredibly helpful during the porting process. They allow developers to easily switch between PAL and NTSC modes, facilitating quick testing and identification of potential issues. Using emulators allows you to analyze how your code performs on different systems without requiring access to the original hardware.

Converting Color Encoding from PAL to NTSC

One of the trickiest parts of porting PAL video to NTSC is handling the color encoding differences. PAL uses a different color subcarrier frequency and phase than NTSC, resulting in color distortions if not handled properly. Simply changing the resolution and frame rate isn’t enough. You have to actually convert the color information itself.

Understanding the Differences

PAL uses a color subcarrier frequency of 4.43 MHz, while NTSC uses 3.58 MHz. This difference affects how color information is encoded within the video signal. Additionally, PAL uses a different phase alternating line (PAL) system for color encoding, which helps to cancel out phase errors, while NTSC does not. This means a direct conversion will result in incorrect hues and color artifacts.

The Importance of Transcoding

To avoid these issues, you need to perform a color transcoding process. This involves mathematically transforming the color information from the PAL format to the NTSC format. This isn’t a simple conversion. You’re essentially decoding the color information from the PAL signal and then re-encoding it using the NTSC standard. This process takes into account the different subcarrier frequencies and the phase alterations used in PAL.

Software and Hardware Solutions

Thankfully, several software and hardware solutions can handle this color transcoding for you. Professional video editing software like Adobe Premiere Pro, Final Cut Pro, and DaVinci Resolve often have built-in features or plugins to handle PAL to NTSC conversions correctly. These tools usually offer various settings and options to fine-tune the conversion process and ensure optimal color accuracy.

Delving into the Conversion Process

The core of the transcoding process involves separating the luminance (brightness) and chrominance (color) information from the PAL signal. Once separated, the chrominance signals, which represent the color information, are then mathematically transformed to match the NTSC color space. This involves adjusting the subcarrier frequency from 4.43MHz to 3.58MHz. Furthermore, the phase alterations inherent in the PAL signal need to be addressed and compensated for during the conversion. This is crucial because NTSC doesn’t use the same phase alternation scheme, and without proper compensation, the resulting NTSC video would exhibit noticeable color errors and flickering.

The conversion also often involves adjustments to the saturation and hue. PAL and NTSC have slightly different color gamuts, so a direct conversion might lead to colors appearing oversaturated or having a slightly different hue in the NTSC output. Professional conversion tools often include algorithms to compensate for these differences, resulting in a more accurate and visually pleasing final product.

Consider the following simplified representation of the transformation, keeping in mind the actual process is far more complex:

Component PAL NTSC
Subcarrier Frequency 4.43 MHz 3.58 MHz
Color Encoding Phase Alternating Line (PAL) NTSC Composite Video

After the chrominance signals have been transformed, they are recombined with the luminance information to form the final NTSC video signal. This ensures that the color information is correctly integrated into the video signal, resulting in a proper NTSC output suitable for broadcasting or playback on NTSC-compatible devices.

Common Pitfalls and Solutions

A common issue during PAL to NTSC conversion is the introduction of color artifacts, often appearing as shimmering or flickering colors. This can occur if the conversion process isn’t handled precisely, especially with fast-moving objects or scenes with intricate color patterns. High-quality conversion tools typically employ sophisticated filtering and interpolation techniques to minimize such artifacts. Another common problem is color distortion, where the colors in the converted NTSC video don’t accurately match the original PAL footage. This can stem from improper handling of the different color gamuts between PAL and NTSC. Using professional conversion tools with robust color management features can help mitigate this issue and ensure accurate color reproduction.

Adapting Audio Settings for NTSC Compatibility

When porting a game from PAL to NTSC, audio adjustments are crucial for a smooth transition. PAL and NTSC differ in their frame rates and, consequently, how audio is handled. Ignoring these differences can lead to audio playback issues, including incorrect pitch, speed, and synchronization with the on-screen action. This section will guide you through the process of adapting your audio settings for NTSC compatibility.

Understanding the Core Differences

PAL operates at 50Hz (50 frames per second) while NTSC uses 60Hz (60 frames per second). This 10Hz difference has a direct impact on the timing and playback speed of audio. Games often tie audio playback speed to the frame rate, so simply transferring audio assets without adjustment will result in faster playback on NTSC systems. Imagine a soundtrack designed for a slower, more deliberate pace suddenly sped up – it wouldn’t sound right! This discrepancy also affects sound effects, which can sound distorted or out of sync.

Adjusting Sample Rate and Pitch

The most common approach to address the frame rate difference is to adjust the audio’s sample rate. If your PAL audio is at a 44.1kHz sample rate, you’ll need to convert it to a compatible rate for NTSC. A common solution is to resample the audio to 48kHz. However, a straight resampling will alter the pitch, making the audio sound higher. To counteract this, you’ll need to apply pitch correction during or after the resampling process. Several audio editing software packages allow you to resample and adjust the pitch simultaneously, preserving the original tonal quality. This ensures the music and sound effects retain their intended feel and don’t sound artificially high-pitched.

Timing and Synchronization

Beyond sample rate and pitch, the timing of audio cues also requires attention. Since NTSC runs faster, any hardcoded timings related to audio triggers or music transitions need to be recalculated. If a sound effect is supposed to play exactly one second after a specific event, you’ll need to adjust that timing to account for the faster frame rate in NTSC. Failure to do so can result in sound effects playing too early or too late, breaking immersion and potentially affecting gameplay.

Music and Sound Effects Considerations

Music requires particularly careful handling. If the music tempo is directly tied to the game’s frame rate, you’ll need to adjust the music itself or decouple it from the frame rate and use a separate timer. For sound effects, ensure that the length of each sound effect is still appropriate within the context of the faster NTSC frame rate. A sound effect that was perfectly timed for a specific animation in PAL might end up finishing prematurely on NTSC if not adjusted.

Implementing Changes in Code

The specific implementation of these audio adjustments depends heavily on the game engine and audio libraries used. Some engines provide built-in functionality to handle PAL and NTSC differences, while others require manual intervention. You may need to modify code related to audio playback, timing, and synchronization. Consult your engine’s documentation for the most efficient and reliable methods for adapting audio settings.

Tools and Techniques

Numerous tools can assist with audio conversion and pitch correction. Audacity is a free, open-source audio editor that provides robust resampling and pitch shifting capabilities. Professional audio editing software like Adobe Audition or Pro Tools offers even more advanced features for precise control over audio manipulation. Choose the tool that best suits your needs and technical expertise. Remember that consistent and meticulous application of these techniques is key to a successful PAL-to-NTSC audio port.

Audio Issue NTSC Symptom Solution
Sample Rate Mismatch Faster playback speed, higher pitch Resample to 48kHz and adjust pitch
Hardcoded Timings Desynchronized audio cues Recalculate timings based on 60Hz
Frame Rate Dependent Music Faster music tempo Adjust music or decouple from frame rate

Optimizing the Converted Code for NTSC Hardware

Once you’ve successfully ported your PAL game code to run on NTSC hardware, the next crucial step is optimization. Simply getting the game to run isn’t enough; you want it to run *well*. NTSC and PAL systems, while similar, have distinct technical differences that can impact performance if not addressed properly. This optimization process involves fine-tuning your code to take full advantage of the NTSC hardware and ensure a smooth, enjoyable gaming experience.

Timing and Frame Rate Considerations

The most significant difference between PAL and NTSC lies in their frame rates and refresh rates. PAL runs at 50Hz (50 frames per second) with a resolution of typically 576i, while NTSC operates at 60Hz (60 frames per second) with a resolution of typically 480i. This difference affects everything time-related in your game, from animation speed and physics calculations to music playback. Games ported directly without accounting for this will often run roughly 20% faster on NTSC hardware.

Adjusting Timers and Delays

Code that relies on timed delays or frame counters will need adjustment. A simple approach is to introduce a scaling factor to your timers. Multiply your PAL timing values by 6/5 (or 1.2) to maintain the correct timing on NTSC. However, this might not be sufficient for all scenarios and a more nuanced approach might be necessary, especially for complex game mechanics.

Updating Game Logic for 60 FPS

Your game logic, including physics updates and AI routines, likely operates on a per-frame basis. To avoid speed discrepancies, ensure that these updates are tied to the delta time (the time elapsed between frames) rather than assuming a fixed frame rate. This allows your game to run correctly regardless of the underlying frame rate. Consider implementing a fixed timestep for physics calculations to maintain consistency.

Graphics and Resolution Adjustments

PAL and NTSC also differ in their resolution. PAL generally uses a higher resolution (576i) compared to NTSC (480i). This can lead to cropping or letterboxing issues if not handled correctly.

Handling Screen Size Differences

You’ll need to adjust your rendering code to account for the lower vertical resolution of NTSC. You might choose to letterbox your game, effectively adding black bars to the top and bottom of the screen to maintain the original aspect ratio, or you might adjust the in-game camera to show a wider field of view. Carefully consider the impact on the gameplay experience when making this decision.

Color Palette Adjustments

While less critical than timing and resolution, subtle differences in color palettes exist between PAL and NTSC. While usually not drastically different, it’s worth reviewing and potentially tweaking your game’s colors on NTSC hardware to ensure they appear as intended.

Input Handling

Generally, input handling doesn’t require extensive modification between PAL and NTSC. However, it’s good practice to thoroughly test all input methods (controllers, keyboards, etc.) on the target hardware to ensure responsiveness and accuracy.

Sound and Music Considerations

Similar to timing adjustments, audio playback speed can be affected by the frame rate difference. If your music or sound effects are tied to the game’s internal clock, they may play faster on NTSC. Adjust playback rates accordingly or decouple audio from the game’s timing system.

Testing and Refinement

Thorough testing on actual NTSC hardware is essential throughout the optimization process. Emulators can be helpful for initial testing, but they don’t always accurately represent the nuances of real hardware. Pay close attention to performance, responsiveness, and overall gameplay experience.

Performance Profiling and Bottleneck Identification

Utilize profiling tools to identify performance bottlenecks. These tools can help pinpoint areas of your code that consume excessive CPU or GPU resources, allowing you to target your optimization efforts more effectively. Common bottlenecks in ported games include inefficient rendering routines, poorly optimized physics calculations, and excessive memory allocation.

Addressing Common NTSC-Specific Issues

Certain issues are more prevalent on NTSC hardware. For instance, some games experience flickering or visual artifacts due to the different refresh rate. Addressing these issues may require specific workarounds or adjustments to your rendering pipeline. This might involve techniques like double buffering or adjusting the way sprites are drawn.

Aspect PAL NTSC
Frame Rate 50 Hz 60 Hz
Resolution 576i 480i
Refresh Rate 50 Hz 60 Hz

Porting PAL Code to NTSC: A Developer’s Perspective

Porting code between PAL (Phase Alternating Line) and NTSC (National Television System Committee) systems requires careful consideration of several key differences. These primarily revolve around video timing and resolution. PAL typically operates at 25 frames per second (fps) with a resolution of 720x576, while NTSC uses 29.97 fps and a resolution of 720x480. A naive approach of simply recompiling code will lead to timing issues and distorted visuals. Therefore, a structured approach focusing on timing adjustments, resolution handling, and color encoding is essential for a successful port.

The first step involves adjusting timing-dependent code. Game logic, animations, and physics calculations often rely on frame rate. Hardcoding frame rates will lead to inconsistencies across systems. Instead, implement a delta-time system that calculates the time elapsed between frames. This allows the game logic to adapt to different frame rates seamlessly. Furthermore, any functions that directly manipulate video output timings need to be reviewed and adjusted accordingly.

Addressing resolution discrepancies is equally crucial. Hardcoded screen coordinates will result in misaligned UI elements or cropped graphics. Employing a resolution-independent rendering system is the recommended approach. This might involve using relative coordinates or a virtual resolution system that scales and adapts to the target display resolution. Asset management also needs consideration. Providing separate assets optimized for each resolution ensures optimal visual quality.

Finally, color encoding differences, while less prominent, can still impact the final result. PAL and NTSC use slightly different color spaces. While most modern displays handle conversion automatically, ensuring your code adheres to standard color profiles will prevent potential color shifts or inaccuracies. Using a color management library can help automate this process.

People Also Ask About Porting PAL to NTSC

How do frame rate differences affect gameplay?

The different frame rates of PAL (25 fps) and NTSC (29.97 fps) can impact gameplay if the code is not adapted correctly. For instance, if game speed is tied directly to the frame rate, the game will run faster on NTSC systems. This can affect everything from character movement to projectile speeds.

Why is using delta-time crucial?

Delta-time represents the time elapsed between frames. By using delta-time in calculations, game logic becomes frame rate independent. This ensures consistent behavior across both PAL and NTSC systems, regardless of their frame rate differences.

What are common issues encountered during PAL to NTSC ports?

Common issues include incorrect aspect ratios, distorted graphics, and accelerated or slowed-down gameplay. These typically stem from neglecting to address the differences in resolution and frame rate between the two systems.

How can I test my port effectively?

Thorough testing on both PAL and NTSC systems is essential. Use emulators or actual hardware to verify that the game runs correctly and that all elements appear as intended. Pay close attention to timing, visuals, and overall gameplay experience.

Are there tools or libraries that simplify the porting process?

While there isn’t a single magic bullet solution, various libraries and middleware can assist with aspects like resolution management and color conversion. Game engines often provide built-in functionalities that handle cross-platform compatibility, simplifying the process significantly.

Contents