NHMLFixup v10
[jpcrr.git] / org / jpc / output / OutputChannelFM.java
blobb880a90452955946cf8a58808a0f524e34f4826f
1 /*
2 JPC-RR: A x86 PC Hardware Emulator
3 Release 1
5 Copyright (C) 2007-2009 Isis Innovation Limited
6 Copyright (C) 2009-2010 H. Ilari Liusvaara
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License version 2 as published by
10 the Free Software Foundation.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 Based on JPC x86 PC Hardware emulator,
22 A project from the Physics Dept, The University of Oxford
24 Details about original JPC can be found at:
26 www-jpc.physics.ox.ac.uk
30 package org.jpc.output;
32 import java.io.*;
33 import org.jpc.emulator.StatusDumper;
34 import org.jpc.emulator.SRDumpable;
35 import org.jpc.emulator.SRDumper;
36 import org.jpc.emulator.SRLoader;
38 public class OutputChannelFM extends OutputChannel
40 public OutputChannelFM(Output out, String chanName)
42 super(out, (short)2, chanName);
45 public void addFrameVolumeChange(long timestamp, int ln, int ld, int rn, int rd)
47 addFrame(new OutputFrameVolumeChange(timestamp, ln, ld, rn, rd), false);
50 public void addFrameWrite(long timestamp, short reg, byte val)
52 addFrame(new OutputFrameFM(timestamp, reg, val), false);
55 public void addFrameReset(long timestamp)
57 addFrame(new OutputFrameFMReset(timestamp), false);
60 public OutputChannelFM(SRLoader input) throws IOException
62 super(input);
65 public void dumpStatus(StatusDumper output)
67 if(output.dumped(this))
68 return;
70 output.println("#" + output.objectNumber(this) + ": OutputChannelFM:");
71 dumpStatusPartial(output);
72 output.endObject();